Add lint-staged
This prevents unstaged files and unstaged changes to staged files from being checked.
This commit is contained in:
parent
18985caab8
commit
e241fa7491
@ -1,9 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm run format
|
||||
npm run lint
|
||||
|
||||
# THIS PART is generated by pre-commit: https://pre-commit.com
|
||||
|
||||
# start templated
|
||||
@ -24,5 +21,6 @@ else
|
||||
fi
|
||||
### End of pre-commit py part
|
||||
|
||||
npx lint-staged
|
||||
npm test
|
||||
npm run compile
|
||||
|
||||
1229
package-lock.json
generated
1229
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,10 +8,16 @@
|
||||
"type": "git",
|
||||
"url": "https://git.verdigado.com/NB-Public/rocketchat2matrix"
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.ts": [
|
||||
"prettier --check",
|
||||
"eslint --max-warnings 0"
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"format": "prettier 'src/**/*.ts' --check",
|
||||
"format-fix": "prettier 'src/**/*.ts' --write",
|
||||
"lint": "eslint src/ --ext .ts",
|
||||
"lint": "eslint src/ --ext .ts --max-warnings 0",
|
||||
"lint-fix": "eslint src/ --fix --ext .ts",
|
||||
"prefix": "npm run format-fix",
|
||||
"fix": "npm run lint-fix",
|
||||
@ -33,6 +39,7 @@
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-promise": "^6.1.1",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^13.2.2",
|
||||
"prettier": "2.8.8",
|
||||
"typescript": "^5.0.4"
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user