Use lint-staged with Husky to only lint changed files
This commit is contained in:
@ -24,7 +24,7 @@
|
||||
"test": "${npm_execpath} run test:lint && ${npm_execpath} run test:jest",
|
||||
"test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass",
|
||||
"test:lint:js": "npx eslint --ext=js . --cache",
|
||||
"test:lint:sass": "npx stylelint app/styles/**.scss app/styles/**/*.scss",
|
||||
"test:lint:sass": "npx stylelint app/styles/**/*.scss",
|
||||
"test:jest": "npx jest --coverage",
|
||||
"prepare": "husky install"
|
||||
},
|
||||
@ -173,6 +173,7 @@
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
"husky": "^7.0.2",
|
||||
"jest": "^27.1.0",
|
||||
"lint-staged": ">=10",
|
||||
"raf": "^3.4.1",
|
||||
"react-intl-translations-manager": "^5.0.3",
|
||||
"react-test-renderer": "^16.13.1",
|
||||
@ -182,5 +183,9 @@
|
||||
"stylelint-scss": "^3.18.0",
|
||||
"webpack-dev-server": "^4.1.0",
|
||||
"yargs": "^16.0.3"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.js": "eslint --cache",
|
||||
"app/styles/**/*.scss": "stylelint"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user