Skip to content

Commit

Permalink
Add husky and add pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
rubengees committed Feb 26, 2024
1 parent ea107a3 commit 81d0327
Show file tree
Hide file tree
Showing 4 changed files with 228 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm pre-commit
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
"*.{js,mjs,cjs,ts}": ["prettier --write", "eslint --max-warnings 0 --fix"],
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"node": ">=20"
},
"scripts": {
"prepare": "husky",
"pre-commit": "lint-staged",
"start": "tsx src/index.ts",
"build": "ncc build src/index.ts --license LICENSE.txt --minify",
"lint": "eslint --max-warnings 0 .",
Expand All @@ -42,6 +44,8 @@
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"tsx": "^4.7.1",
"typescript": "^5.3.3",
Expand Down
Loading

0 comments on commit 81d0327

Please sign in to comment.