Setup Husky and lint-stage for commit fixing (#23308)
This commit is contained in:
parent
63a6808ee1
commit
34225d7199
4 changed files with 285 additions and 6 deletions
10
package.json
10
package.json
|
@ -16,7 +16,8 @@
|
|||
"test:lint:sass": "stylelint \"**/*.{css,scss}\" && prettier --check \"**/*.{css,scss}\"",
|
||||
"test:jest": "cross-env NODE_ENV=test jest",
|
||||
"format": "prettier --write .",
|
||||
"format-check": "prettier --check ."
|
||||
"format-check": "prettier --check .",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -148,8 +149,10 @@
|
|||
"eslint-plugin-jsx-a11y": "~6.7.1",
|
||||
"eslint-plugin-promise": "~6.1.1",
|
||||
"eslint-plugin-react": "~7.32.2",
|
||||
"husky": "^8.0.3",
|
||||
"jest": "^29.5.0",
|
||||
"jest-environment-jsdom": "^29.5.0",
|
||||
"lint-staged": "^13.1.2",
|
||||
"postcss-scss": "^4.0.6",
|
||||
"prettier": "^2.8.5",
|
||||
"raf": "^3.4.1",
|
||||
|
@ -166,5 +169,10 @@
|
|||
"optionalDependencies": {
|
||||
"bufferutil": "^4.0.7",
|
||||
"utf-8-validate": "^6.0.3"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": "prettier --ignore-unknown --write",
|
||||
"*.{js,jsx}": "eslint --fix",
|
||||
"*.{css,scss}": "stylelint --fix"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue