Skip to content

Commit 7fa88fc

Browse files
committed
chore: add lint-staged
1 parent cf0e6cb commit 7fa88fc

File tree

2 files changed

+255
-1
lines changed

2 files changed

+255
-1
lines changed

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"prepack": "pnpm run build",
3434
"typecheck": "tsc --noEmit",
3535
"release": "pnpm test && changelogen --release && npm publish && git push --follow-tags",
36-
"test": "pnpm lint && vitest run --coverage"
36+
"test": "vitest"
3737
},
3838
"dependencies": {
3939
"@babel/parser": "^7.21.4",
@@ -47,10 +47,18 @@
4747
"changelogen": "^0.5.3",
4848
"eslint": "^8.38.0",
4949
"eslint-config-unjs": "^0.1.0",
50+
"lint-staged": "^13.2.1",
5051
"prettier": "^2.8.7",
52+
"simple-git-hooks": "^2.8.1",
5153
"typescript": "^5.0.4",
5254
"unbuild": "^1.2.1",
5355
"vitest": "^0.30.1"
5456
},
57+
"simple-git-hooks": {
58+
"pre-commit": "pnpm lint-staged"
59+
},
60+
"lint-staged": {
61+
"*.{ts,js,mjs,cjs}": "eslint --fix && prettier -c -w"
62+
},
5563
"packageManager": "pnpm@8.3.1"
5664
}

0 commit comments

Comments
 (0)