38 lines
1000 B
JavaScript
38 lines
1000 B
JavaScript
import { defineConfig } from "eslint/config";
|
|
import eslint from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import eslintPluginReact from "eslint-plugin-react";
|
|
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
|
|
import pluginRouter from '@tanstack/eslint-plugin-router';
|
|
|
|
// noinspection JSCheckFunctionSignatures
|
|
export default defineConfig([
|
|
eslint.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...pluginRouter.configs['flat/recommended'],
|
|
{
|
|
settings: {
|
|
react: {
|
|
version: "detect",
|
|
},
|
|
},
|
|
plugins: {
|
|
react: eslintPluginReact,
|
|
reactHooks: eslintPluginReactHooks,
|
|
},
|
|
rules: {
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
"varsIgnorePattern": "^_",
|
|
"argsIgnorePattern": "^_"
|
|
}
|
|
]
|
|
},
|
|
},
|
|
eslintPluginReact.configs.flat.recommended,
|
|
eslintPluginReact.configs.flat['jsx-runtime'],
|
|
eslintPluginReactHooks.configs['recommended-latest'],
|
|
|
|
]);
|