Skip to content

Commit

Permalink
Update precommit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-rifkin committed Aug 6, 2023
1 parent 53efb91 commit 7af50b8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
. "$(dirname -- "$0")/_/husky.sh"

#tsc --noEmit
npm run format
npx lint-staged
npx lint-staged --verbose
#npm test
5 changes: 5 additions & 0 deletions lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
"*.ts": [() => "npm run ts-check", "npm run format-files --", "npm run lint-files --"],
"*.js": ["npm run format-files --", "npm run lint-files --"],
"*.{html,md}": ["npm run format-files --"],
};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"lint-files": "eslint --color",
"prepare": "husky install",
"test": "tsc && mocha build/test",
"format": "prettier . --write"
"format": "prettier . --write",
"format-files": "prettier --write --ignore-unknown",
"ts-compile": "tsc"
},
"devDependencies": {
"@types/chai": "^4.3.5",
Expand Down

0 comments on commit 7af50b8

Please sign in to comment.