mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-14 06:58:59 +00:00
Add format script to pre-commit hook (#2146)
* Add format script to pre-commit hook * build: add husky prepare step * build: add lint-staged * build: add lint-staged Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
_
|
||||
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npm test
|
||||
npx lint-staged
|
||||
Generated
+876
-383
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -13,8 +13,9 @@
|
||||
"preview-theme": "node scripts/preview-theme",
|
||||
"close-stale-theme-prs": "node scripts/close-stale-theme-prs",
|
||||
"generate-langs-json": "node scripts/generate-langs-json",
|
||||
"format": "./node_modules/.bin/prettier --write .",
|
||||
"format:check": "./node_modules/.bin/prettier --check ."
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"author": "Anurag Hazra",
|
||||
"license": "MIT",
|
||||
@@ -27,10 +28,11 @@
|
||||
"axios-mock-adapter": "^1.18.1",
|
||||
"color-contrast-checker": "^2.1.0",
|
||||
"hjson": "^3.2.2",
|
||||
"husky": "^4.2.5",
|
||||
"husky": "^8.0.0",
|
||||
"jest": "^29.0.3",
|
||||
"jest-environment-jsdom": "^29.0.3",
|
||||
"js-yaml": "^4.1.0",
|
||||
"lint-staged": "^13.0.3",
|
||||
"lodash.snakecase": "^4.1.1",
|
||||
"parse-diff": "^0.7.0",
|
||||
"prettier": "^2.1.2"
|
||||
@@ -43,9 +45,7 @@
|
||||
"upgrade": "^1.1.0",
|
||||
"word-wrap": "^1.2.3"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "npm test"
|
||||
}
|
||||
"lint-staged": {
|
||||
"*.{js,css,md}": "prettier --write"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user