-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
99 lines (99 loc) · 2.77 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 = {
env: {
browser: true,
es2021: true,
node: true,
jest: true,
},
'extends': [
'google',
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:jsdoc/recommended',
],
parserOptions: {
babelOptions: {
plugins: [
'@babel/syntax-import-assertions',
],
},
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'import',
'react',
'jsx-a11y',
'jsdoc',
],
rules: {
'arrow-parens': ['error', 'always'],
'arrow-spacing': ['error', {before: true, after: true}],
'block-spacing': 'error',
'brace-style': 'error',
'comma-style': ['error', 'last'],
'curly': ['error', 'all'],
'default-case': 'error',
'default-param-last': ['error'],
'eol-last': ['error', 'always'],
'eqeqeq': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'import/newline-after-import': ['error', {count: 2}],
'jsdoc/check-param-names': 'off',
'jsdoc/check-types': 'error',
// 'jsdoc/newline-after-description': ['error', {count: 1}],
'jsdoc/require-param': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/tag-lines': ['error', 'any', {startLines: 1}],
'max-len': ['error', 140],
'no-alert': 'error',
'no-empty-function': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-irregular-whitespace': ['error'],
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-mixed-operators': 'error',
'no-multi-assign': ['error', {ignoreNonDeclaration: true}],
'no-multiple-empty-lines': ['error', {max: 2, maxEOF: 1}],
'no-return-assign': 'error',
'no-shadow': 'error',
'no-trailing-spaces': ['error'],
'no-undef-init': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-return': 'error',
'prefer-const': 'error',
'prefer-rest-params': 'off',
'prefer-template': 'error',
'quote-props': ['error', 'consistent-as-needed'],
'react/jsx-closing-bracket-location': 'error',
'react/jsx-equals-spacing': [2, 'never'],
'react/prop-types': 'off',
'require-await': 'error',
'semi': ['error', 'never'],
'space-infix-ops': ['error'],
'valid-jsdoc': 'off',
'yoda': 'error',
},
settings: {
react: {
version: '17.0.2',
},
},
reportUnusedDisableDirectives: true,
}