Skip to content

Commit

Permalink
Add lint pre-commit hook using husky & lint-staged
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Oct 31, 2024
1 parent 0986096 commit 5819b3b
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --concurrent false
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*": "prettier --write",
"*.(ts|tsx)": ["eslint --fix"]
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@
"eslint-plugin-n": "^17.12.0",
"eslint-plugin-unicorn": "^56.0.0",
"glob": "^11.0.0",
"husky": "^9.1.6",
"knip": "^5.0.0",
"lint-staged": "^15.2.10",
"matrix-web-i18n": "^3.2.1",
"mkdirp": "^3.0.0",
"pacote": "^20.0.0",
Expand Down
Loading

0 comments on commit 5819b3b

Please sign in to comment.