Skip to content

Commit 1f03c11

Browse files
committed
chore: add lint-staged config
1 parent d337f07 commit 1f03c11

File tree

3 files changed

+256
-9
lines changed

3 files changed

+256
-9
lines changed
-4.22 MB
Binary file not shown.

package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"eslint-plugin-standard": "^4.0.0",
6868
"husky": "^2.4.1",
6969
"jest": "^24.8.0",
70+
"lint-staged": "^9.2.1",
7071
"prettier": "^1.18.2",
7172
"react": "16.8.3",
7273
"react-dom": "16.8.3",
@@ -81,9 +82,19 @@
8182
"husky": {
8283
"hooks": {
8384
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
84-
"pre-commit": "yarn lint && yarn typescript"
85+
"pre-commit": "lint-staged"
8586
}
8687
},
88+
"lint-staged": {
89+
"*.{js,ts,tsx}": [
90+
"yarn eslint --fix",
91+
"git add"
92+
],
93+
"*.java": [
94+
"cd android && ./graldew spotlessApply",
95+
"git add"
96+
]
97+
},
8798
"jest": {
8899
"preset": "react-native",
89100
"modulePathIgnorePatterns": [

0 commit comments

Comments
 (0)