We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 55c636d commit 20bdbfdCopy full SHA for 20bdbfd
.husky/pre-commit
@@ -4,6 +4,3 @@
4
set -eu
5
6
npx lint-staged
7
-
8
-npm run build
9
-git add :/dist
.lintstagedrc.js
@@ -0,0 +1,12 @@
1
+module.exports = {
2
+ "src/*.js": [
3
+ "eslint --fix",
+ "prettier --write",
+
+ // Build staged changes
+ () => "git stash push --keep-index --include-untracked :/src",
+ () => "npm run build",
+ () => "git add :/dist",
10
+ () => "git stash drop",
11
+ ],
12
+};
package.json
@@ -33,8 +33,5 @@
33
"husky": "^7.0.2",
34
"lint-staged": "^11.1.2",
35
"prettier": "2.4.0"
36
- },
37
- "lint-staged": {
38
- "src/*.js": ["eslint --fix", "prettier --write"]
39
}
40
0 commit comments