-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
185 lines (185 loc) · 6.23 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
{
"root": true,
"ignorePatterns": ["**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": [
"plugin:@angular-eslint/recommended",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@angular-eslint/template/process-inline-templates",
"plugin:@nrwl/nx/typescript"
],
"plugins": ["eslint-plugin-no-null", "@nrwl/nx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
],
"@angular-eslint/no-input-rename": "off",
"@typescript-eslint/ban-tslint-comment": "error",
"brace-style": "off",
"@typescript-eslint/brace-style": "off",
"@typescript-eslint/consistent-indexed-object-style": ["error", "record"],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as",
"objectLiteralTypeAssertions": "never"
}
],
"@typescript-eslint/consistent-type-definitions": "error",
"dot-notation": "off",
"@typescript-eslint/dot-notation": ["error"],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowHigherOrderFunctions": false
}
],
"@typescript-eslint/explicit-member-accessibility": [
"warn",
{
"accessibility": "no-public",
"overrides": {
"parameterProperties": "explicit"
}
}
],
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/naming-convention": [
"warn",
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allowSingleOrDouble",
"trailingUnderscore": "forbid"
},
{
"selector": "typeLike",
"format": ["PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "forbid"
},
{
"selector": "enumMember",
"format": ["PascalCase", "UPPER_CASE"],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-confusing-void-expression": "warn",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": [
"error",
{
"allowWithDecorator": true,
"allowStaticOnly": true,
"allowConstructorOnly": true
}
],
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-implicit-any-catch": "warn",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-require-imports": "error",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
"@typescript-eslint/no-unnecessary-condition": [
"warn",
{
"allowConstantLoopConditions": true
}
],
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "warn",
"no-useless-constructor": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^_$",
"caughtErrorsIgnorePattern": "^_$",
"argsIgnorePattern": "^_$",
"args": "after-used"
}
],
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/prefer-as-const": "warn",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-includes": "warn",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
"@typescript-eslint/prefer-ts-expect-error": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": [
"error",
{
"allowNumber": true,
"allowBoolean": true
}
],
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/unbound-method": [
"warn",
{
"ignoreStatic": true
}
],
"@typescript-eslint/unified-signatures": "warn",
"curly": "warn",
"eqeqeq": ["error", "always"],
"guard-for-in": "warn",
"id-blacklist": "off",
"id-match": "off",
"max-len": "off",
"no-bitwise": "warn",
"no-caller": "error",
"no-console": "warn",
"no-debugger": "warn",
"no-restricted-imports": [
"error",
{
"patterns": ["dist/*"]
}
],
"no-new-wrappers": "error",
"no-null/no-null": "off",
"no-param-reassign": "error",
"no-underscore-dangle": "off",
"no-var": "error",
"prefer-arrow/prefer-arrow-functions": "off",
"radix": "warn",
"quotes": "off"
}
}
]
}