-
Notifications
You must be signed in to change notification settings - Fork 14
/
eslint.config.js
37 lines (36 loc) · 1.38 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { fixupPluginRules } from '@eslint/compat';
import pluginJs from '@eslint/js';
import eslintPluginJsxA11y from 'eslint-plugin-jsx-a11y';
import eslintPluginPrettier from 'eslint-plugin-prettier/recommended';
import eslintPluginReact from 'eslint-plugin-react/configs/recommended.js';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import eslintPluginSimpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } } },
{ languageOptions: { globals: globals.browser } },
{
plugins: {
'jsx-a11y': eslintPluginJsxA11y,
prettier: eslintPluginPrettier,
react: eslintPluginReact,
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
'simple-import-sort': eslintPluginSimpleImportSort,
},
},
{
rules: {
...eslintPluginReactHooks.configs.recommended.rules,
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
},
];