refactor: update ESLint configuration and improve lint command with cache
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,3 +10,4 @@ scripts/_env.sh
|
|||||||
.tool-versions
|
.tool-versions
|
||||||
.idea
|
.idea
|
||||||
.old
|
.old
|
||||||
|
.eslintcache
|
||||||
|
|||||||
@@ -12,13 +12,13 @@ export default defineConfig([
|
|||||||
js,
|
js,
|
||||||
"react-hooks": pluginReactHooks,
|
"react-hooks": pluginReactHooks,
|
||||||
},
|
},
|
||||||
extends: ["js/recommended"],
|
extends: ["js/recommended", tseslint.configs.recommended],
|
||||||
languageOptions: { globals: globals.browser },
|
languageOptions: { globals: globals.browser },
|
||||||
rules: {
|
rules: {
|
||||||
"react-hooks/rules-of-hooks": "error",
|
"react-hooks/rules-of-hooks": "error",
|
||||||
"react-hooks/exhaustive-deps": "error",
|
"react-hooks/exhaustive-deps": "error",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tseslint.configs.recommended,
|
|
||||||
pluginReact.configs.flat["jsx-runtime"],
|
pluginReact.configs.flat["jsx-runtime"],
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
"publish-version": "node scripts/publish-version.mjs",
|
"publish-version": "node scripts/publish-version.mjs",
|
||||||
"fmt": "cargo fmt --manifest-path ./src-tauri/Cargo.toml",
|
"fmt": "cargo fmt --manifest-path ./src-tauri/Cargo.toml",
|
||||||
"clippy": "cargo clippy --manifest-path ./src-tauri/Cargo.toml",
|
"clippy": "cargo clippy --manifest-path ./src-tauri/Cargo.toml",
|
||||||
"lint": "eslint src",
|
"lint": "eslint -c eslint.config.ts --cache src",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"format:check": "prettier --check ."
|
"format:check": "prettier --check ."
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user