Skip to content

Commit

Permalink
chore: add pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
woai3c committed Mar 31, 2024
1 parent ae9c7d0 commit 5967097
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
npx lint-staged
npm run lint-spell
npm run lint-prettier
npm run lint-toml
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"node": ">=18.18.0"
},
"scripts": {
"prepare": "husky",
"lint-code": "oxlint --ignore-path=./.oxlintignore --import-plugin --deny-warnings",
"lint-filename": "echo 'TODO: ls-lint is too slow now'",
"lint-filename:bak": "ls-lint",
Expand Down Expand Up @@ -50,5 +51,11 @@
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,md,yml,yaml,vue}": [
"prettier --write",
"git add"
]
}
}

0 comments on commit 5967097

Please sign in to comment.