-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
.eslintrc.js
112 lines (112 loc) · 2.68 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
104
105
106
107
108
109
110
111
112
module.exports = {
ignorePatterns: ['src/**/*.test.ts'],
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['eslint-plugin-no-null', 'eslint-plugin-react', '@typescript-eslint'],
root: true,
rules: {
'@typescript-eslint/array-type': [
'error',
{
default: 'generic',
},
],
'@typescript-eslint/dot-notation': 'error',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/member-delimiter-style': [
'off',
{
multiline: {
delimiter: 'none',
requireLast: true,
},
singleline: {
delimiter: 'semi',
requireLast: false,
},
},
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
leadingUnderscore: 'allow',
trailingUnderscore: 'forbid',
},
],
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/semi': ['off', null],
'@typescript-eslint/type-annotation-spacing': 'off',
'arrow-body-style': 'error',
'arrow-parens': ['off', 'always'],
'brace-style': ['off', 'off'],
'comma-dangle': 'off',
curly: ['error', 'multi-line'],
'dot-notation': 'off',
'eol-last': 'off',
eqeqeq: ['error', 'smart'],
'id-denylist': [
'error',
'any',
'Number',
'number',
'String',
'string',
'Boolean',
'boolean',
'Undefined',
'undefined',
],
'id-match': 'error',
indent: 'off',
'linebreak-style': 'off',
'max-len': 'off',
'new-parens': 'off',
'newline-per-chained-call': 'off',
'no-eval': 'error',
'no-extra-semi': 'off',
'no-irregular-whitespace': 'off',
'no-multiple-empty-lines': 'error',
'no-null/no-null': 'error',
'no-redeclare': 'error',
'no-trailing-spaces': 'off',
'no-underscore-dangle': 'off',
'no-var': 'error',
'one-var': ['error', 'never'],
'padded-blocks': [
'off',
{
blocks: 'never',
},
{
allowSingleLineBlocks: true,
},
],
'prefer-const': 'error',
'quote-props': 'off',
quotes: 'off',
radix: 'error',
'react/jsx-curly-spacing': 'off',
'react/jsx-equals-spacing': 'off',
'react/jsx-tag-spacing': [
'off',
{
afterOpening: 'allow',
closingSlash: 'allow',
},
],
'react/jsx-wrap-multilines': 'off',
semi: 'off',
'space-before-function-paren': 'off',
'space-in-parens': ['off', 'never'],
},
};