make eslint 9 compliant
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:
52
src/index.js
52
src/index.js
@@ -1,6 +1,5 @@
|
||||
import js from "@eslint/js";
|
||||
import tseslint from "@typescript-eslint/eslint-plugin";
|
||||
import tsParser from "@typescript-eslint/parser";
|
||||
import tseslint from "typescript-eslint";
|
||||
import react from "eslint-plugin-react";
|
||||
import reactHooks from "eslint-plugin-react-hooks";
|
||||
import a11y from "eslint-plugin-jsx-a11y";
|
||||
@@ -11,54 +10,37 @@ export default [
|
||||
/* Core ESLint recommended rules */
|
||||
js.configs.recommended,
|
||||
|
||||
/* TypeScript recommended */
|
||||
{
|
||||
files: ["**/*.ts", "**/*.tsx"],
|
||||
languageOptions: {
|
||||
parser: tsParser,
|
||||
parserOptions: {
|
||||
project: true
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
"@typescript-eslint": tseslint
|
||||
},
|
||||
/* TypeScript (flat, type-checked) */
|
||||
...tseslint.configs.recommendedTypeChecked,
|
||||
|
||||
...tseslint.configs["recommended-type-checked"]
|
||||
},
|
||||
|
||||
/* React recommended */
|
||||
/* React */
|
||||
react.configs.flat.recommended,
|
||||
|
||||
/* React Hooks recommended */
|
||||
/* React Hooks */
|
||||
{
|
||||
plugins: { "react-hooks": reactHooks },
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules
|
||||
}
|
||||
plugins: {
|
||||
"react-hooks": reactHooks,
|
||||
},
|
||||
rules: reactHooks.configs.recommended.rules,
|
||||
},
|
||||
|
||||
|
||||
/* JSX Accessibility recommended */
|
||||
/* JSX Accessibility */
|
||||
a11y.flatConfigs.recommended,
|
||||
|
||||
/* Import validation rules */
|
||||
/* Import rules */
|
||||
importPlugin.flatConfigs.recommended,
|
||||
|
||||
/* Unused imports */
|
||||
{
|
||||
plugins: { "unused-imports": unusedImports },
|
||||
plugins: {
|
||||
"unused-imports": unusedImports,
|
||||
},
|
||||
rules: {
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"warn",
|
||||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" }
|
||||
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
|
||||
],
|
||||
'@stylistic/indent': ['error', 4],
|
||||
'@stylistic/semi': ['error', 'always'],
|
||||
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
|
||||
'@stylistic/no-trailing-spaces': 'error',
|
||||
'@stylistic/no-multiple-empty-lines': 'error',
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user