parent
8bec2442ef
commit
242063dc74
3 changed files with 11 additions and 7 deletions
|
@ -7,5 +7,4 @@ if [ ! -f "$FILE" ]; then
|
|||
exit 0;
|
||||
fi
|
||||
|
||||
cd js
|
||||
pnpm exec lint-staged
|
||||
ESLINT_USE_FLAT_CONFIG=true pnpm exec lint-staged
|
||||
|
|
8
js/lint-staged.config.js
Normal file
8
js/lint-staged.config.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
import path from "node:path";
|
||||
|
||||
const CONFIG_PATH = path.resolve(import.meta.dirname, "eslint.config.js");
|
||||
|
||||
export default {
|
||||
"*.{js,jsx,mjs,ts,tsx}": (filenames) =>
|
||||
`eslint --config ${CONFIG_PATH} --cache --fix ${filenames.join(" ")}`,
|
||||
};
|
|
@ -2,7 +2,7 @@
|
|||
"name": "root",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"prepare": "cd .. && husky js/.husky"
|
||||
"prepare": "husky js/.husky"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.0.2",
|
||||
|
@ -24,8 +24,5 @@
|
|||
"typescript-eslint": "^7.6.0",
|
||||
"wireit": "^0.14.4"
|
||||
},
|
||||
"packageManager": "pnpm@8.15.5",
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix"
|
||||
}
|
||||
"packageManager": "pnpm@8.15.5"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue