Skip to content

Commit 1fb3df9

Browse files
committed
Add pre-commit hook
1 parent d00e1d7 commit 1fb3df9

File tree

2 files changed

+222
-8
lines changed

2 files changed

+222
-8
lines changed

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@
4242
"eslint-plugin-security": "^1.4.0",
4343
"eslint-plugin-standard": "^4.0.1",
4444
"eslint-plugin-unicorn": "^21.0.0",
45+
"husky": "^4.3.0",
4546
"jest": "^26.4.2",
47+
"lint-staged": "^10.3.0",
4648
"postcss": "^7.0.32",
4749
"typescript": "^4.0.2"
4850
},
@@ -56,5 +58,13 @@
5658
}
5759
}
5860
]
61+
},
62+
"husky": {
63+
"hooks": {
64+
"pre-commit": "lint-staged"
65+
}
66+
},
67+
"lint-staged": {
68+
"*.js": "eslint --fix"
5969
}
6070
}

0 commit comments

Comments
 (0)