Skip to content

Commit

Permalink
Merge pull request #5 from jdevelop-io/feature/husky_lint-staged
Browse files Browse the repository at this point in the history
✨ feat(husky x lint-staged): add husky and lint-staged
  • Loading branch information
jh3ady authored Oct 6, 2024
2 parents 55ced03 + 324c26d commit bdab468
Show file tree
Hide file tree
Showing 4 changed files with 309 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 lint-staged && pnpm test:coverage --verbose
9 changes: 9 additions & 0 deletions lint-staged.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @type {import('lint-staged').Config}
*/
const config = {
'*.{ts,mjs}': 'pnpm lint',
'*': 'pnpm format',
}

export default config
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"pnpm": ">=9.12.0"
},
"scripts": {
"prepare": "husky",
"prebuild": "rimraf dist",
"build": "pnpm prebuild && tsc",
"build:watch": "pnpm build --watch",
Expand All @@ -32,7 +33,9 @@
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.10.0",
"husky": "^9.1.6",
"jest": "^29.7.0",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.2.5",
Expand Down
Loading

0 comments on commit bdab468

Please sign in to comment.