-
Notifications
You must be signed in to change notification settings - Fork 111
/
.eslintrc.js
103 lines (103 loc) · 2.94 KB
/
.eslintrc.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 12,
sourceType: 'module',
},
ignorePatterns: [
'src/language/*.json'
],
plugins: [
'react',
'react-hooks',
'@typescript-eslint',
],
rules: {
indent: [
'warn',
2,
{ SwitchCase: 1 },
],
'linebreak-style': [
'warn',
'unix',
],
quotes: [
'warn',
'single',
],
semi: [
'warn',
'always',
],
'@typescript-eslint/indent': ['warn', 2],
'@typescript-eslint/object-curly-spacing': 'off',
'jsx-a11y/accessible-emoji': 'off',
'no-new-wrappers': 'off',
'no-extra-boolean-cast': 'off',
'react/no-array-index-key': 'off',
'no-plusplus': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-shadow': 'off',
'react/prefer-stateless-function': 'off',
'no-param-reassign': 'off', // used redux-immer for simplification
'prefer-object-spread': 'off',
'max-classes-per-file': ['error', 3],
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/method-signature-style': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/type-annotation-spacing': 'off',
'@typescript-eslint/array-type': 'off',
'@typescript-eslint/return-await': 'off',
'@typescript-eslint/parser': 'off',
'react-hooks/rules-of-hooks': 'error',
'import/no-unresolved': 'off',
'prefer-promise-reject-errors': 'off',
'no-return-await': 'off',
'no-console': 'off',
'no-continue': 'off',
'react-hooks/exhaustive-deps': [
'off',
{
additionalHooks: 'useRecoilCallback',
},
],
'import/prefer-default-export': 'off',
'no-shadow': 'off',
'no-use-before-define': 'off',
'import/extensions': 'off',
'arrow-body-style': 'off',
'react/jsx-filename-extension': 'off',
'arrow-parens': 'off',
'max-len': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/destructuring-assignment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'operator-linebreak': 'off',
'react/require-default-props': 'off',
'react/display-name': 'off',
'object-curly-newline': 'off',
'react/prop-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
'react/jsx-key': 'off',
'object-curly-spacing': ['error', 'always'],
'function-call-argument-newline': ['error', 'consistent'],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
};