-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
99 lines (98 loc) · 2.61 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
module.exports = {
root: true,
env: {
browser: true,
es6: true,
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
extends: ['plugin:react/recommended', 'airbnb'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'react-hooks'],
rules: {
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['draft'] }],
semi: ['error', 'never'],
'arrow-parens': 0,
'react/jsx-one-expression-per-line': 0,
'padded-blocks': 0,
'jsx-a11y/mouse-events-have-key-events': 0,
'react/no-array-index-key': 0,
'jsx-filename-extension': 0,
indent: 'off',
curly: [2, 'all'],
'object-curly-newline': 0,
'react/prop-types': 0,
'no-restricted-syntax': 0,
'no-unused-expressions': 'off',
'no-unused-vars': 0,
'@typescript-eslint/no-unused-vars': 'warn',
'no-trailing-spaces': 1,
'no-multiple-empty-lines': 1,
'no-use-before-define': 'off',
'implicit-arrow-linebreak': 0,
'linebreak-style': ['error', 'unix'],
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-unused-expressions': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'max-len': 0,
'jsx-a11y/click-events-have-key-events': 0,
'jsx-a11y/no-static-element-interactions': 0,
'guard-for-in': 0,
'default-case': 0,
'prefer-template': 0,
'react/require-default-props': 0,
'react/jsx-props-no-spreading': 'off',
'react/jsx-indent': 1,
'arrow-body-style': 0,
'react/no-unused-prop-types': 0,
'import/prefer-default-export': 0,
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{
blankLine: 'any',
prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var'],
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
'react/jsx-filename-extension': [
2,
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
],
radix: 0,
},
}