Skip to content

Commit

Permalink
add husky precommit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
adryd325 committed Dec 9, 2023
1 parent c075b59 commit 1687a05
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@
},
"rules": {
"indent": "off",
"eqeqeq": ["error", "always", {
"null": "ignore"
}],
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"quotes": [
"error",
"double",
Expand Down
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"

pnpm run check
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yml
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"lint": "eslint packages",
"lint:fix": "eslint packages",
"lint:report": "eslint --output-file eslint_report.json --format json packages",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"check": "pnpm run lint && pnpm run typecheck",
"prepare": "husky install"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.13.2",
Expand All @@ -27,6 +29,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-react": "^7.33.2",
"husky": "^8.0.3",
"prettier": "^3.1.0",
"typescript": "^5.3.2"
}
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1687a05

Please sign in to comment.