-
Notifications
You must be signed in to change notification settings - Fork 17
/
.eslintrc.js
99 lines (98 loc) · 2.49 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,
es6: true,
node: true,
jest: true,
},
extends: ['eslint:recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
rules: {
'prefer-arrow-callback': 'error',
'no-new-func': 'error',
'no-else-return': 'error',
'arrow-parens': 'off', // taken care of by prettier
'brace-style': ['off', 'off'],
'comma-dangle': 'off',
curly: ['error', 'multi-line'],
'eol-last': 'off',
eqeqeq: ['error', 'smart'],
'id-denylist': 'off',
'id-match': 'off',
indent: 'off',
'linebreak-style': 'off',
'max-len': 'off',
'new-parens': 'off',
'newline-per-chained-call': 'off',
'no-array-constructor': 'error',
'no-eval': 'error',
'no-extra-semi': 'off',
'no-irregular-whitespace': 'off',
'no-multiple-empty-lines': 'off',
'no-new-wrappers': 'error',
'no-param-reassign': 'error',
'no-trailing-spaces': 'off',
'no-underscore-dangle': 'off',
'no-var': 'error',
'object-shorthand': 'error',
'one-var': ['error', 'never'],
'padded-blocks': [
'off',
{
blocks: 'never',
},
{
allowSingleLineBlocks: true,
},
],
'prefer-const': 'error',
'prefer-template': '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',
'react/display-name': 'off',
semi: 'off',
'space-before-function-paren': 'off',
'space-in-parens': ['off', 'never'],
'spaced-comment': [
'error',
'always',
{
markers: ['/'],
},
],
'@typescript-eslint/naming-convention': [
'error',
{
selector: ['function'],
format: ['camelCase', 'PascalCase'],
},
{
selector: ['method'],
format: ['camelCase'],
leadingUnderscore: 'allow',
},
{
selector: ['typeLike'],
format: ['PascalCase'],
},
],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'off',
'@typescript-eslint/quotes': 'off',
'@typescript-eslint/semi': ['off', null],
'@typescript-eslint/type-annotation-spacing': 'off',
},
}