mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-10-22 23:32:03 +00:00
chore: add lefthook commit hook
This commit is contained in:
13
README.md
13
README.md
@@ -177,14 +177,19 @@ We welcome contributions from the community! Here's how you can get involved:
|
||||
git checkout -b fix/your-bug-fix
|
||||
```
|
||||
|
||||
4. **Install Dependencies and Setup Hooks**
|
||||
```bash
|
||||
npm install
|
||||
npm run prepare
|
||||
```
|
||||
|
||||
4. **Make Your Changes**
|
||||
5. **Make Your Changes**
|
||||
- Write clean, well-documented code
|
||||
- Follow existing code style and patterns
|
||||
- Add tests for new functionality
|
||||
- Update documentation as needed
|
||||
|
||||
5. **Test Your Changes**
|
||||
6. **Test Your Changes**
|
||||
```bash
|
||||
# Run backend tests
|
||||
cd backend
|
||||
@@ -195,14 +200,14 @@ We welcome contributions from the community! Here's how you can get involved:
|
||||
npm test
|
||||
```
|
||||
|
||||
6. **Commit and Push**
|
||||
7. **Commit and Push**
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "Add: descriptive commit message"
|
||||
git push origin feature/your-feature-name
|
||||
```
|
||||
|
||||
7. **Create a Pull Request**
|
||||
8. **Create a Pull Request**
|
||||
- Go to your fork on GitHub
|
||||
- Click "New Pull Request"
|
||||
- Provide a clear description of your changes
|
||||
|
12
lefthook.yml
Normal file
12
lefthook.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
pre-commit:
|
||||
commands:
|
||||
check:
|
||||
glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}"
|
||||
run: >-
|
||||
npx @biomejs/biome check
|
||||
--write
|
||||
--no-errors-on-unmatched
|
||||
--files-ignore-unknown=true
|
||||
--colors=off
|
||||
{staged_files}
|
||||
stage_fixed: true
|
16461
package-lock.json
generated
16461
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@@ -11,6 +11,7 @@
|
||||
"install:all": "npm install && npm run install:backend && npm run install:frontend",
|
||||
"install:backend": "cd backend && npm install",
|
||||
"install:frontend": "cd frontend && npm install",
|
||||
"prepare": "lefthook install",
|
||||
"dev:backend": "cd backend && npm run dev",
|
||||
"dev:frontend": "cd frontend && npm run dev",
|
||||
"dev": "concurrently \"npm run dev:backend\" \"npm run dev:frontend\"",
|
||||
@@ -27,7 +28,7 @@
|
||||
"@commitlint/cli": "^20.0.0",
|
||||
"@commitlint/config-conventional": "^20.0.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"husky": "^9.1.6",
|
||||
"lefthook": "^1.13.4",
|
||||
"lint-staged": "^15.2.10",
|
||||
"markdownlint-cli": "^0.41.0",
|
||||
"prettier": "^3.3.3",
|
||||
@@ -35,13 +36,5 @@
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx,json}": [
|
||||
"npx @biomejs/biome check --write"
|
||||
],
|
||||
"*.{md,yml,yaml,css,scss}": [
|
||||
"npx @biomejs/biome format --write"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user