-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
205 lines (205 loc) · 8.24 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.mjs", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": ["off"]
}
},
{
"files": ["*.ts", "*.tsx"],
"plugins": ["import", "@stylistic"],
"extends": ["plugin:@nx/typescript"],
"parserOptions": {
"ecmaVersion": 2020,
"project": "tsconfig.base.json",
"sourceType": "module"
},
"rules": {
"arrow-body-style": "off",
"object-shorthand": "error",
"max-classes-per-file": "error",
"no-prototype-builtins": "error",
"no-console": ["error", {"allow": ["warn", "error"]}],
"@stylistic/array-bracket-newline": ["error", "consistent"],
"@stylistic/array-bracket-spacing": ["error", "never"],
"@stylistic/array-element-newline": ["error", "consistent"],
"@stylistic/arrow-parens": ["error", "as-needed"],
"@stylistic/arrow-spacing": ["error", {"before": true, "after": true}],
"@stylistic/block-spacing": ["error", "never"],
"@stylistic/brace-style": ["error", "1tbs"],
"@stylistic/comma-dangle": ["error", "always-multiline"],
"@stylistic/comma-spacing": ["error", {"before": false, "after": true}],
"@stylistic/comma-style": ["error", "last"],
"@stylistic/computed-property-spacing": ["error", "never"],
"@stylistic/dot-location": ["error", "property"],
"@stylistic/eol-last": ["error", "always"],
"@stylistic/function-call-argument-newline": ["error", "consistent"],
"@stylistic/function-call-spacing": ["error", "never"],
"@stylistic/function-paren-newline": ["error", "consistent"],
"@stylistic/generator-star-spacing": ["error", "after"],
"@stylistic/implicit-arrow-linebreak": ["error", "beside"],
"@stylistic/indent": ["error", 2],
"@stylistic/indent-binary-ops": "off",
"@stylistic/key-spacing": ["error", {"beforeColon": false, "afterColon": true}],
"@stylistic/keyword-spacing": ["error", {"before": true, "after": true}],
"@stylistic/line-comment-position": "off",
"@stylistic/linebreak-style": "off",
"@stylistic/lines-around-comment": "off",
"@stylistic/lines-between-class-members": [
"error",
{
"enforce": [
{
"blankLine": "always",
"prev": "method",
"next": "method"
}
]
},
{"exceptAfterOverload": true}
],
"@stylistic/max-len": ["error", 120],
"@stylistic/max-statements-per-line": "off",
"@stylistic/member-delimiter-style": [
"error",
{
"multiline": {"delimiter": "semi", "requireLast": true},
"singleline": {"delimiter": "semi", "requireLast": false},
"multilineDetection": "brackets"
}
],
"@stylistic/multiline-ternary": ["error", "always-multiline"],
"@stylistic/new-parens": ["error", "always"],
"@stylistic/newline-per-chained-call": "off",
"@stylistic/no-confusing-arrow": [
"error",
{"allowParens": true, "onlyOneSimpleParam": false}
],
"@stylistic/no-extra-parens": "off",
"@stylistic/no-extra-semi": "error",
"@stylistic/no-floating-decimal": "error",
"@stylistic/no-mixed-operators": "error",
"@stylistic/no-mixed-spaces-and-tabs": "error",
"@stylistic/no-multi-spaces": "error",
"@stylistic/no-multiple-empty-lines": ["error", {"max": 1, "maxEOF": 0, "maxBOF": 0}],
"@stylistic/no-tabs": "off",
"@stylistic/no-trailing-spaces": "warn",
"@stylistic/no-whitespace-before-property": "error",
"@stylistic/nonblock-statement-body-position": ["error", "beside"],
"@stylistic/object-curly-newline": ["error", {"consistent": true}],
"@stylistic/object-curly-spacing": ["error", "never"],
"@stylistic/object-property-newline": "off",
"@stylistic/one-var-declaration-per-line": ["error", "always"],
"@stylistic/operator-linebreak": ["error", "before"],
"@stylistic/padded-blocks": ["error", "never"],
"@stylistic/padding-line-between-statements": "off",
"@stylistic/quote-props": ["error", "as-needed"],
"@stylistic/quotes": ["error", "single"],
"@stylistic/rest-spread-spacing": ["error", "never"],
"@stylistic/semi": ["error", "always"],
"@stylistic/semi-spacing": ["error", {"before": false, "after": true}],
"@stylistic/semi-style": ["error", "last"],
"@stylistic/space-before-blocks": ["error", "always"],
"@stylistic/space-before-function-paren": [
"error",
{"anonymous": "always", "named": "never", "asyncArrow": "always"}
],
"@stylistic/space-in-parens": ["error", "never"],
"@stylistic/space-infix-ops": "error",
"@stylistic/space-unary-ops": ["error", {"words": true, "nonwords": false}],
"@stylistic/spaced-comment": ["error", "always"],
"@stylistic/switch-colon-spacing": ["error", {"before": false, "after": true}],
"@stylistic/template-curly-spacing": ["error", "never"],
"@stylistic/template-tag-spacing": ["error", "always"],
"@stylistic/type-annotation-spacing": [
"error",
{
"before": false,
"after": true,
"overrides": {"arrow": {"before": true, "after": true}}
}
],
"@stylistic/type-generic-spacing": ["error"],
"@stylistic/type-named-tuple-spacing": ["error"],
"@stylistic/wrap-iife": ["error", "outside"],
"@stylistic/wrap-regex": "off",
"@stylistic/yield-star-spacing": ["error", "after"],
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "memberLike",
"modifiers": ["public"],
"format": ["camelCase"],
"leadingUnderscore": "forbid"
},
{
"selector": "memberLike",
"modifiers": ["protected", "private"],
"format": ["camelCase"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/member-ordering": [
"warn",
{
"default": [
"signature",
"readonly-signature",
["field", "readonly-field", "get", "set"],
"static-initialization",
"constructor",
"public-static-method",
"public-abstract-method",
"public-decorated-method",
"public-instance-method",
"protected-static-method",
"protected-abstract-method",
"protected-decorated-method",
"protected-instance-method",
"private-static-method",
"#private-static-method",
"private-decorated-method",
"private-instance-method",
"#private-instance-method"
]
}
],
"import/order": [
"error",
{
"pathGroupsExcludedImportTypes": [],
"pathGroups": [{"pattern": "@{environments,core,libs}/**", "group": "internal"}],
"groups": ["external", ["internal", "parent", "sibling", "index"]],
"newlines-between": "always"
}
],
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.mjs", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.mjs", "*.spec.jsx"],
"env": {"jest": true},
"rules": {}
}
]
}