Add lint-staged

This commit is contained in:
2022-07-22 00:20:03 +00:00
parent 10bfccd49f
commit a64758a3f3
3 changed files with 1042 additions and 0 deletions

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx lint-staged

1032
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,6 +12,7 @@
"copyfiles": "copyfiles -u 1 \"src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}\" dist/",
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:types",
"generate:graphQLSchema": "PAYLOAD_CONFIG_PATH=src/payload.config.ts payload generate:graphQLSchema",
"prepare": "husky install",
"lint:check": "eslint .",
"lint:fix": "eslint --fix .",
"lint": "npm run lint:check"
@@ -29,8 +30,13 @@
"copyfiles": "^2.4.1",
"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.1.3"
},
"lint-staged": {
"*.ts": "eslint --cache --fix"
}
}