Skip to content

Commit 20bdbfd

Browse files
committed
🔧 Configure build in lint-staged
1 parent 55c636d commit 20bdbfd

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@
44
set -eu
55

66
npx lint-staged
7-
8-
npm run build
9-
git add :/dist

.lintstagedrc.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
"src/*.js": [
3+
"eslint --fix",
4+
"prettier --write",
5+
6+
// Build staged changes
7+
() => "git stash push --keep-index --include-untracked :/src",
8+
() => "npm run build",
9+
() => "git add :/dist",
10+
() => "git stash drop",
11+
],
12+
};

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,5 @@
3333
"husky": "^7.0.2",
3434
"lint-staged": "^11.1.2",
3535
"prettier": "2.4.0"
36-
},
37-
"lint-staged": {
38-
"src/*.js": ["eslint --fix", "prettier --write"]
3936
}
4037
}

0 commit comments

Comments
 (0)