-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
.eslintrc.json
executable file
·177 lines (177 loc) · 5.82 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
{
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json"],
"createDefaultProgram": true
},
"plugins": [
"eslint-comments",
"import",
"optimize-regex",
"promise",
"security",
"sonarjs",
"rxjs-angular"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:eslint-comments/recommended",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:optimize-regex/all",
"plugin:sonarjs/recommended",
"plugin:prettier/recommended",
"plugin:promise/recommended",
"plugin:regexp/recommended",
"plugin:security/recommended",
"plugin:@angular-eslint/recommended"
],
"rules": {
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"String": {
"message": "Use string instead",
"fixWith": "string"
},
"Boolean": {
"message": "Use boolean instead",
"fixWith": "boolean"
},
"Number": {
"message": "Use number instead",
"fixWith": "number"
}
}
}
],
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-member-accessibility": [
"off",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/require-array-sort-compare": [
"error",
{
"ignoreStringArrays": true
}
],
"@typescript-eslint/quotes": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-unused-expressions": "off",
"brace-style": [
"error",
"1tbs",
{
"allowSingleLine": true
}
],
"default-case-last": "error",
"dot-notation": "off",
"id-denylist": "off",
"id-match": "off",
"complexity": [
"error",
{
"max": 8
}
],
"max-len": [
"error",
{
"code": 600
}
],
"max-lines-per-function": [
"error",
{
"max": 30
}
],
"max-params": [
"error",
{
"max": 3
}
],
"@angular-eslint/directive-selector": "error",
"@angular-eslint/use-injectable-provided-in": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/no-pipe-impure": "error",
"@angular-eslint/prefer-on-push-component-change-detection": "error",
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-forward-ref": "error",
"@angular-eslint/no-input-prefix": "error",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/prefer-output-readonly": "error",
"@angular-eslint/relative-url-prefix": "error",
"@angular-eslint/use-component-selector": "error",
"@angular-eslint/use-component-view-encapsulation": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/no-host-metadata-property": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/no-queries-metadata-property": "error",
"@angular-eslint/pipe-prefix": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
],
"rxjs-angular/prefer-takeuntil": [
"error",
{
"alias": ["untilDestroyed"],
"checkComplete": true,
"checkDecorators": ["Component"],
"checkDestroy": false
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {
"@angular-eslint/template/no-call-expression": "error",
"@angular-eslint/template/no-any": "error",
"@angular-eslint/template/no-autofocus": "error",
"@angular-eslint/template/no-distracting-elements": "error",
"@angular-eslint/template/no-positive-tabindex": "error",
"@angular-eslint/template/no-negated-async": "error",
"@angular-eslint/template/click-events-have-key-events": "error",
"@angular-eslint/template/mouse-events-have-key-events": "error",
"@angular-eslint/template/conditional-complexity": "error",
"@angular-eslint/template/use-track-by-function": "error",
"@angular-eslint/template/i18n": "off",
"@angular-eslint/template/alt-text": "error",
"@angular-eslint/template/valid-aria": "error",
"@angular-eslint/template/elements-content": "error",
"@angular-eslint/template/table-scope": "error"
}
}
]
}