Skip to content

Commit

Permalink
feat(automations): add husky && lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
hywax committed Dec 29, 2023
1 parent 92d78d7 commit 35a7e7b
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 1 deletion.
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
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,23 @@
"build": "tsc && vite build",
"lint": "eslint . --fix",
"test": "vitest",
"test:coverage": "vitest --coverage"
"test:coverage": "vitest --coverage",
"prepare": "husky install"
},
"devDependencies": {
"@antfu/eslint-config": "^2.6.1",
"@types/node": "^20.10.5",
"@vitest/coverage-v8": "^1.1.0",
"camelcase": "^8.0.0",
"eslint": "^8.56.0",
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.0",
"vitest": "^1.1.0"
},
"lint-staged": {
"*.ts": "pnpm run lint"
}
}
Loading

0 comments on commit 35a7e7b

Please sign in to comment.