aboutsummaryrefslogtreecommitdiff
path: root/eslint.config.mjs
blob: 04655ce13b2782a77e2c5a9959049629ca9c34cb (plain)
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
38
39
40
41
42
43
44
45
46
47
48
49
import pluginJs from '@eslint/js';
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
import globals from 'globals';
import tseslint from 'typescript-eslint';

export default [
    {
        languageOptions: { globals: { ...globals.browser, ...globals.node } },
    },
    pluginJs.configs.recommended,
    ...tseslint.configs.recommended,
    {
        rules: {
            'node/no-missing-import': 0,
            'no-console': 'off',
            'func-names': 'off',
            'no-process-exit': 'off',
            'object-shorthand': 'off',
            'class-methods-use-this': 'off',
            'single-quote': 'off',
            'max-classes-per-file': 0,

            'react/jsx-filename-extension': [
                2,
                {
                    extensions: ['.js', '.jsx', '.ts', '.tsx'],
                },
            ],

            'import/prefer-default-export': 'off',
            'no-unused-expressions': 'off',
            'prefer-template': 'off',
            'no-inner-declarations': 'off',
            'no-plusplus': 'off',
            'no-multi-assign': 'off',
            'no-underscore-dangle': 'off',
            'no-nested-ternary': 'off',
            'lines-between-class-members': 'off',
            'no-shadow': 'off',
            '@typescript-eslint/no-shadow': 'warn',
            'no-unused-vars': 'off',
            '@typescript-eslint/no-unused-vars': 'error',
            '@typescript-eslint/no-namespace': 'off',
            'react/destructuring-assignment': 0,
            'no-restricted-globals': ['error', 'event'],
        },
    },
    pluginReactConfig,
];