Run ESLint for staged files on pre-commit (#20040)
* upgrade packages, setup lint-staged * add tsc-files
... | ... | @@ -216,12 +216,12 @@ |
"glob": "^7.1.1", | ||
"html-webpack-harddisk-plugin": "^2.0.0", | ||
"html-webpack-plugin": "^5.3.1", | ||
"husky": "^6.0.0", | ||
"husky": "^7.0.4", | ||
"jest": "^27.0.6", | ||
"jest-localstorage-mock": "^2.2.0", | ||
"jest-watch-typeahead": "^0.6.4", | ||
"jsonwebtoken": "^7.2.1", | ||
"lint-staged": "^3.3.1", | ||
"lint-staged": "^12.3.2", | ||
"mini-css-extract-plugin": "^1.6.0", | ||
"mockdate": "^2.0.2", | ||
"mutationobserver-shim": "^0.3.7", | ||
... | ... | @@ -236,6 +236,7 @@ |
"raf": "^3.4.0", | ||
"shadow-cljs": "2.11.20", | ||
"style-loader": "^0.19.0", | ||
"tsc-files": "^1.1.3", | ||
"typescript": "^4.4.3", | ||
"webpack": "^5.37.0", | ||
"webpack-cli": "^4.7.0", | ||
... | ... | @@ -308,9 +309,14 @@ |
"chromatic": "chromatic" | ||
}, | ||
"lint-staged": { | ||
"frontend/**/*.{js,jsx,ts,tsx,css}": [ | ||
"+(enterprise|frontend)/**/*.css": [ | ||
"prettier --write" | ||
] | ||
], | ||
"+(enterprise|frontend)/**/*.{js,jsx,ts,tsx}": [ | ||
"eslint --rulesdir frontend/lint/eslint-rules --max-warnings 0", | ||
"prettier --write" | ||
], | ||
"+(enterprise|frontend)/**/*.{ts,tsx}": "tsc-files --noEmit" | ||
}, | ||
"browserslist": [ | ||
"defaults" | ||
... | ... |
This diff is collapsed.
Please register or sign in to comment