-
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy path.eslintrc.json
172 lines (172 loc) · 5.45 KB
/
.eslintrc.json
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
{
"extends": ["plugin:@typescript-eslint/base", "plugin:import/typescript"],
"plugins": ["import"],
"ignorePatterns": [
"coverage/**",
"dist/**",
"node_modules/**",
"*.json",
"*.lock",
"*.md",
"*.svg"
],
"rules": {
"@typescript-eslint/consistent-type-assertions": "warn",
"@typescript-eslint/no-array-constructor": "warn",
"@typescript-eslint/no-redeclare": "warn",
"@typescript-eslint/no-unused-expressions": [
"error",
{
"allowShortCircuit": true,
"allowTaggedTemplates": true,
"allowTernary": true
}
],
"@typescript-eslint/no-unused-vars": [
"warn",
{
"args": "none",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-use-before-define": [
"warn",
{
"classes": false,
"functions": false,
"typedefs": false,
"variables": false
}
],
"@typescript-eslint/no-useless-constructor": "warn",
"array-callback-return": "warn",
"dot-location": ["warn", "property"],
"eqeqeq": ["warn", "smart"],
"getter-return": "warn",
"import/first": "error",
"import/no-default-export": "warn",
"import/no-named-as-default": "warn",
"import/no-named-as-default-member": "warn",
"import/no-duplicates": "warn",
"import/order": [
"warn",
{
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
"newlines-between": "always"
}
],
"new-parens": "warn",
"no-caller": "warn",
"no-cond-assign": ["warn", "except-parens"],
"no-console": "warn",
"no-const-assign": "warn",
"no-control-regex": "warn",
"no-delete-var": "warn",
"no-dupe-args": "warn",
"no-dupe-keys": "warn",
"no-duplicate-case": "warn",
"no-empty-character-class": "warn",
"no-empty-pattern": "warn",
"no-eval": "warn",
"no-ex-assign": "warn",
"no-extend-native": "warn",
"no-extra-bind": "warn",
"no-extra-label": "warn",
"no-fallthrough": "warn",
"no-func-assign": "warn",
"no-implied-eval": "warn",
"no-invalid-regexp": "warn",
"no-iterator": "warn",
"no-label-var": "warn",
"no-labels": [
"warn",
{
"allowLoop": true,
"allowSwitch": false
}
],
"no-lone-blocks": "warn",
"no-loop-func": "warn",
"no-mixed-operators": [
"warn",
{
"allowSamePrecedence": false,
"groups": [
["&", "|", "^", "~", "<<", ">>", ">>>"],
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
]
}
],
"no-multi-str": "warn",
"no-native-reassign": "warn",
"no-negated-in-lhs": "warn",
"no-new-func": "warn",
"no-new-object": "warn",
"no-new-symbol": "warn",
"no-new-wrappers": "warn",
"no-obj-calls": "warn",
"no-octal": "warn",
"no-octal-escape": "warn",
"no-regex-spaces": "warn",
"no-restricted-properties": [
"error",
{
"message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting",
"object": "require",
"property": "ensure"
},
{
"message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting",
"object": "System",
"property": "import"
}
],
"no-restricted-syntax": ["warn", "WithStatement"],
"no-script-url": "warn",
"no-self-assign": "warn",
"no-self-compare": "warn",
"no-sequences": "warn",
"no-shadow-restricted-names": "warn",
"no-sparse-arrays": "warn",
"no-template-curly-in-string": "warn",
"no-this-before-super": "warn",
"no-throw-literal": "warn",
"no-unreachable": "warn",
"no-unused-labels": "warn",
"no-useless-computed-key": "warn",
"no-useless-concat": "warn",
"no-useless-escape": "warn",
"no-useless-rename": [
"warn",
{
"ignoreDestructuring": false,
"ignoreExport": false,
"ignoreImport": false
}
],
"no-whitespace-before-property": "warn",
"no-with": "warn",
"require-yield": "warn",
"rest-spread-spacing": ["warn", "never"],
"strict": ["warn", "never"],
"unicode-bom": ["warn", "never"],
"use-isnan": "warn",
"valid-typeof": "warn"
},
"overrides": [
{
"files": ["./*.config.?(m|c)@(t|j)s", "./scripts/**/*.config.?(m|c)@(t|j)s"],
"rules": {
"import/no-default-export": "off"
}
},
{
"files": ["scripts/**/*.?(m|c)@(t|j)s"],
"rules": {
"no-console": "off"
}
}
]
}