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_lint-staged): add husky with lint-staged
  • Loading branch information
jh3ady authored Aug 9, 2024
2 parents afaed64 + ec52e7b commit 0571b90
Show file tree
Hide file tree
Showing 4 changed files with 13 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 @@
bunx lint-staged && bun run test:coverage --verbose
Binary file modified bun.lockb
Binary file not shown.
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 @@ -14,6 +14,7 @@
},
"main": "src/add.ts",
"scripts": {
"prepare": "husky",
"prebuild": "rimraf build",
"build": "bun build src/add.ts --outdir ./build",
"test": "jest",
Expand All @@ -34,7 +35,9 @@
"eslint-plugin-jest": "^28.8.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.9.0",
"husky": "^9.1.4",
"jest": "^29.7.0",
"lint-staged": "^15.2.8",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"ts-jest": "^29.2.4",
Expand Down

0 comments on commit 0571b90

Please sign in to comment.