mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
Configure husky to run prettier via lint-staged
This commit is contained in:
parent
017b45d87e
commit
105b041255
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
_
|
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
npx lint-staged
|
826
package-lock.json
generated
826
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
|||||||
"test": "jest",
|
"test": "jest",
|
||||||
"build": "npm run build -ws",
|
"build": "npm run build -ws",
|
||||||
"build:archive": "gulp createDistArchive",
|
"build:archive": "gulp createDistArchive",
|
||||||
"prepare": "npm run build",
|
"prepare": "husky install && npm run build",
|
||||||
"tsc": "npm run tsc -ws"
|
"tsc": "npm run tsc -ws"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -26,9 +26,11 @@
|
|||||||
"gulp-rename": "^2.0.0",
|
"gulp-rename": "^2.0.0",
|
||||||
"gulp-replace": "^1.1.3",
|
"gulp-replace": "^1.1.3",
|
||||||
"gulp-zip": "^5.1.0",
|
"gulp-zip": "^5.1.0",
|
||||||
|
"husky": "^7.0.1",
|
||||||
"import-sort-style-module": "^6.0.0",
|
"import-sort-style-module": "^6.0.0",
|
||||||
"jest": "^27.0.6",
|
"jest": "^27.0.6",
|
||||||
"jest-environment-jsdom": "^27.0.6",
|
"jest-environment-jsdom": "^27.0.6",
|
||||||
|
"lint-staged": "^11.1.2",
|
||||||
"merge-stream": "^2.0.0",
|
"merge-stream": "^2.0.0",
|
||||||
"prettier": "^2.3.2",
|
"prettier": "^2.3.2",
|
||||||
"prettier-plugin-import-sort": "^0.0.7",
|
"prettier-plugin-import-sort": "^0.0.7",
|
||||||
@ -47,5 +49,8 @@
|
|||||||
"style": "module",
|
"style": "module",
|
||||||
"parser": "typescript"
|
"parser": "typescript"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"lint-staged": {
|
||||||
|
"*.{ts,js,mjs,cjs}": "prettier --write"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user