-
Notifications
You must be signed in to change notification settings - Fork 6
/
.eslintrc.cjs
89 lines (88 loc) · 2.34 KB
/
.eslintrc.cjs
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
root: true,
env: { browser: true, es2020: true, node: true, mocha: true, jest: true },
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true,
modules: true,
experimentalObjectRestSpread: true,
},
},
plugins: ['react-refresh','jsx-a11y', 'import', 'react-hooks', '@typescript-eslint', 'prettier'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/label-has-for': 0,
'react/jsx-one-expression-per-line': 0,
'react/prop-types': 0,
'react/forbid-prop-types': 0,
'react/destructuring-assignment': 0,
'react/no-array-index-key': 0,
'react/display-name': 0,
'react/jsx-props-no-spreading': [0],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'jsx-quotes': ['error', 'prefer-double'],
'@typescript-eslint/no-empty-interface': 'off',
'comma-dangle': 0,
'object-curly-newline': 0,
'no-prototype-builtins': 0,
'no-plusplus': 0,
'no-underscore-dangle': 0,
'use-isnan': 'off',
'no-restricted-globals': ['off', 'isNaN'],
'implicit-arrow-linebreak': [0, 'below'],
quotes: [2, 'single', 'avoid-escape'],
'object-curly-spacing': ['error', 'always'],
'keyword-spacing': 'off',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/keyword-spacing': [
'error',
{
before: true,
after: true,
},
],
semi: 'off',
'@typescript-eslint/semi': 'error',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
singleQuote: true,
arrowParens: 'always',
trailingComma: 'all',
useTabs: false,
tabWidth: 2,
semi: true,
printWidth: 100,
},
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
globals: {
__base: true,
global: true,
isNaN: true,
},
}