aboutsummaryrefslogtreecommitdiff
path: root/eslint.config.mjs
blob: f7063caa5ebb5455aa6b69464824d1cf3dfc1c5c (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
50
51
52
53
54
55
56
57
58
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',
            '@typescript-eslint/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',
            'no-param-reassign': 'error',
            '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,
            'prefer-arrow-callback': 'error',
            'no-return-assign': 'error',
            'no-await-in-loop': 'error',
            'no-loop-func': 'error',
            'no-cond-assign': 'error',
            'no-use-before-define': 'error',
            '@typescript-eslint/no-explicit-any': 'error',
            'no-restricted-globals': ['error', 'event'],
        },
    },
    pluginReactConfig,
];