fix tseslint configuration
All checks were successful
Build ESLint Config and Release / build-and-release (push) Successful in 3s
All checks were successful
Build ESLint Config and Release / build-and-release (push) Successful in 3s
This commit is contained in:
23
src/index.js
23
src/index.js
@@ -7,14 +7,14 @@ import importPlugin from "eslint-plugin-import";
|
||||
import unusedImports from "eslint-plugin-unused-imports";
|
||||
|
||||
export default [
|
||||
/* JS (all files, no type info) */
|
||||
/* Base JS rules (all files) */
|
||||
js.configs.recommended,
|
||||
|
||||
/* TypeScript with type checking (ONLY TS files) */
|
||||
{
|
||||
/* TypeScript – typed, scoped, flat-config correct */
|
||||
...tseslint.configs.recommendedTypeChecked.map(config => ({
|
||||
...config,
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
...tseslint.configs.recommendedTypeChecked,
|
||||
},
|
||||
})),
|
||||
|
||||
/* React */
|
||||
react.configs.flat.recommended,
|
||||
@@ -27,10 +27,10 @@ export default [
|
||||
rules: reactHooks.configs.recommended.rules,
|
||||
},
|
||||
|
||||
/* JSX a11y */
|
||||
/* JSX Accessibility */
|
||||
a11y.flatConfigs.recommended,
|
||||
|
||||
/* Imports */
|
||||
/* Import rules */
|
||||
importPlugin.flatConfigs.recommended,
|
||||
|
||||
/* Unused imports */
|
||||
@@ -46,4 +46,13 @@ export default [
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
/* React version detection */
|
||||
{
|
||||
settings: {
|
||||
react: {
|
||||
version: "detect",
|
||||
},
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user