Skip to content

Commit

Permalink
chore: pre commit hook (#3)
Browse files Browse the repository at this point in the history
* chore: add pre-commit hook

* chore: update eslint config

* chore: add eslint to pre-commit
  • Loading branch information
dominikg authored Dec 11, 2022
1 parent 10128c2 commit c96c87c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
14 changes: 2 additions & 12 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,8 @@
"allowModules": ["node-conditions"]
}
],
"n/no-missing-require": [
"error",
{
"allowModules": ["node-conditions"]
}
],
"n/no-missing-import": [
"error",
{
"allowModules": ["node-conditions"]
}
],
"n/no-missing-require": ["error"],
"n/no-missing-import": ["error"],
"n/exports-style": ["error", "module.exports"],
"n/prefer-global/buffer": ["error", "always"],
"n/prefer-global/console": ["error", "always"],
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 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

pnpm lint-staged --concurrent false
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"uvu": "^0.5.6"
},
"lint-staged": {
"*": "prettier --ignore-unknown --write"
"*": "prettier --ignore-unknown --write",
"*.{js,cjs,mjs}": "eslint --fix"
},
"pnpm": {
"overrides": {
Expand Down

0 comments on commit c96c87c

Please sign in to comment.