-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
200 lines (200 loc) · 6.47 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
{
"root": true,
"ignorePatterns": ["projects/**/*", "**/*.spec.ts"],
"parser": "@typescript-eslint/parser",
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"]
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"arrow-parens": ["error", "always"],
"complexity": ["error", 8],
"indent": ["error", 2],
"no-console": "error",
"no-else-return": "error",
"no-nested-ternary": "error",
"no-param-reassign": "error",
"max-depth": ["error", 2],
"max-nested-callbacks": ["error", 3],
"newline-before-return": "error",
"prefer-const": "error",
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Component", "Page"]
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"@angular-eslint/contextual-decorator": "error",
"@angular-eslint/contextual-lifecycle": "error",
"@angular-eslint/directive-class-suffix": [
"error",
{
"suffixes": ["Directive"]
}
],
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/no-attribute-decorator": "off",
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-empty-lifecycle-method": "error",
"@angular-eslint/no-input-prefix": "error",
"@angular-eslint/no-input-rename": "warn",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-lifecycle-call": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/no-queries-metadata-property": "error",
"@angular-eslint/relative-url-prefix": "error",
"@angular-eslint/use-lifecycle-interface": "warn",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-tslint-comment": "error",
"@typescript-eslint/class-literal-property-style": ["error", "fields"],
"@typescript-eslint/consistent-type-definitions": [
"error",
"interface"
],
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowHigherOrderFunctions": true
}
],
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": [
"error",
{
"allowArgumentsExplicitlyTypedAsAny": true
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": ["strictCamelCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
},
{
"selector": [
"function",
"classProperty",
"typeProperty",
"parameterProperty",
"classMethod",
"objectLiteralMethod",
"typeMethod",
"accessor"
],
"format": ["strictCamelCase", "StrictPascalCase", "UPPER_CASE"]
},
{
"selector": "enumMember",
"format": ["UPPER_CASE"]
},
{
"selector": [
"class",
"enum",
"interface",
"typeAlias",
"typeParameter"
],
"format": ["StrictPascalCase"]
}
],
"@typescript-eslint/no-empty-interface": "warn",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-useless-empty-export": "warn",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-return-this-type": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": [
"error",
{
"checkArrowFunctions": false
}
],
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/sort-type-union-intersection-members": "error",
"@typescript-eslint/type-annotation-spacing": [
"error",
{
"before": false,
"after": true,
"overrides": {
"arrow": {
"before": true,
"after": true
}
}
}
],
"@typescript-eslint/typedef": [
"error",
{
"arrowParameter": true,
"variableDeclaration": true,
"memberVariableDeclaration": true,
"arrayDestructuring": false,
"parameter": true,
"propertyDeclaration": true,
"variableDeclarationIgnoreFunction": true,
"objectDestructuring": true
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}