Add lint staged
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,5 @@ node_modules/
|
||||
dist/
|
||||
build/
|
||||
.env
|
||||
src/media
|
||||
src/media
|
||||
.eslintcache
|
||||
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
npx lint-staged
|
||||
1035
package-lock.json
generated
1035
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,8 @@
|
||||
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
|
||||
"lint": "npm run lint:check",
|
||||
"lint:fix": "eslint --fix .",
|
||||
"lint:check": "eslint ."
|
||||
"lint:check": "eslint .",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^8.2.0",
|
||||
@@ -27,8 +28,13 @@
|
||||
"@typescript-eslint/parser": "^5.30.7",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.20.0",
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^13.0.3",
|
||||
"nodemon": "^2.0.6",
|
||||
"ts-node": "^9.1.1",
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.ts": "eslint --cache --fix"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user