-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
70 lines (66 loc) · 1.93 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import ts from '@typescript-eslint/eslint-plugin';
import * as parser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import globals from 'globals';
export default [
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
ignores: ['**/node_modules/**', '**/dist/**', '**/build/**'],
plugins: {
'@typescript-eslint': ts,
'react': react,
'react-hooks': reactHooks,
},
languageOptions: {
parser: parser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.node,
},
},
settings: {
react: {
version: 'detect',
},
},
rules: {
// Disable rules that are causing issues in the codebase
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-empty': 'warn',
'no-prototype-builtins': 'off',
'no-constant-condition': 'warn',
'no-case-declarations': 'off',
'no-func-assign': 'warn',
'no-redeclare': 'warn',
'react-hooks/rules-of-hooks': 'warn',
'react-hooks/exhaustive-deps': 'warn',
'no-cond-assign': 'warn',
'no-fallthrough': 'warn',
'valid-typeof': 'warn',
'no-control-regex': 'off',
'no-useless-escape': 'warn',
// Core ESLint rules
'no-var': 'error',
'prefer-const': 'error',
'eqeqeq': ['error', 'always'],
// React specific rules
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-uses-vars': 'error',
// TypeScript specific rules
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-non-null-assertion': 'warn',
},
},
];