Skip to content

Commit 0771e12

Browse files
chore: improve DX
1 parent 4934a89 commit 0771e12

File tree

4 files changed

+282
-4
lines changed

4 files changed

+282
-4
lines changed

husky.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
hooks: {
3+
"pre-commit": "lint-staged",
4+
},
5+
};

lint-staged.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
"*.js": ["eslint --fix", "prettier --write"],
3+
"*.{json,md,yml,css,ts}": ["prettier --write"],
4+
};

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
},
4141
"devDependencies": {
4242
"eslint": "^7.9.0",
43+
"husky": "^4.3.0",
4344
"jest": "^26.4.2",
45+
"lint-staged": "^10.4.0",
4446
"postcss": "^8.0.7",
4547
"prettier": "^2.1.2"
4648
},

0 commit comments

Comments
 (0)