Skip to content

Commit fef9153

Browse files
committed
chore(): migration to eslint
1 parent 1ab9513 commit fef9153

File tree

4 files changed

+3314
-240
lines changed

4 files changed

+3314
-240
lines changed

.eslintrc.js

+193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"parser": "@typescript-eslint/parser",
8+
"parserOptions": {
9+
"project": "tsconfig.json",
10+
"sourceType": "module"
11+
},
12+
"plugins": [
13+
"@angular-eslint/eslint-plugin",
14+
"@typescript-eslint",
15+
"@typescript-eslint/tslint"
16+
],
17+
"extends": [
18+
'plugin:@typescript-eslint/eslint-recommended',
19+
'plugin:@typescript-eslint/recommended',
20+
'prettier',
21+
],
22+
"rules": {
23+
"@angular-eslint/component-class-suffix": "error",
24+
"@angular-eslint/component-selector": [
25+
"error",
26+
{
27+
"type": "element",
28+
"prefix": "app",
29+
"style": "kebab-case"
30+
}
31+
],
32+
"@angular-eslint/directive-class-suffix": "error",
33+
"@angular-eslint/directive-selector": [
34+
"error",
35+
{
36+
"type": "attribute",
37+
"prefix": "app",
38+
"style": "camelCase"
39+
}
40+
],
41+
"@angular-eslint/no-host-metadata-property": "error",
42+
"@angular-eslint/no-input-rename": "error",
43+
"@angular-eslint/no-inputs-metadata-property": "error",
44+
"@angular-eslint/no-output-rename": "error",
45+
"@angular-eslint/no-outputs-metadata-property": "error",
46+
"@angular-eslint/use-lifecycle-interface": "error",
47+
"@angular-eslint/use-pipe-transform-interface": "error",
48+
"@typescript-eslint/consistent-type-definitions": "error",
49+
"@typescript-eslint/dot-notation": "off",
50+
"@typescript-eslint/explicit-member-accessibility": [
51+
"off",
52+
{
53+
"accessibility": "explicit"
54+
}
55+
],
56+
"@typescript-eslint/indent": "error",
57+
"@typescript-eslint/member-delimiter-style": [
58+
"error",
59+
{
60+
"multiline": {
61+
"delimiter": "semi",
62+
"requireLast": true
63+
},
64+
"singleline": {
65+
"delimiter": "semi",
66+
"requireLast": false
67+
}
68+
}
69+
],
70+
"@typescript-eslint/member-ordering": "off",
71+
"@typescript-eslint/naming-convention": "error",
72+
"@typescript-eslint/no-empty-function": "off",
73+
"@typescript-eslint/no-empty-interface": "error",
74+
"@typescript-eslint/no-inferrable-types": [
75+
"error",
76+
{
77+
"ignoreParameters": true
78+
}
79+
],
80+
"@typescript-eslint/no-misused-new": "error",
81+
"@typescript-eslint/no-non-null-assertion": "error",
82+
"@typescript-eslint/no-shadow": [
83+
"error",
84+
{
85+
"hoist": "all"
86+
}
87+
],
88+
"@typescript-eslint/no-unused-expressions": "off",
89+
"@typescript-eslint/prefer-function-type": "error",
90+
"@typescript-eslint/quotes": [
91+
"error",
92+
"single"
93+
],
94+
"@typescript-eslint/semi": [
95+
"error",
96+
"always"
97+
],
98+
"@typescript-eslint/type-annotation-spacing": "error",
99+
"@typescript-eslint/unified-signatures": "error",
100+
"arrow-body-style": "error",
101+
"brace-style": [
102+
"error",
103+
"1tbs"
104+
],
105+
"constructor-super": "error",
106+
"curly": "error",
107+
"dot-notation": "off",
108+
"eol-last": "off",
109+
"eqeqeq": [
110+
"error",
111+
"smart"
112+
],
113+
"guard-for-in": "error",
114+
"id-blacklist": "off",
115+
"id-match": "off",
116+
"indent": "error",
117+
"max-len": [
118+
"error",
119+
{
120+
"code": 140
121+
}
122+
],
123+
"no-bitwise": "error",
124+
"no-caller": "error",
125+
"no-console": [
126+
"error",
127+
{
128+
"allow": [
129+
"log",
130+
"warn",
131+
"dir",
132+
"timeLog",
133+
"assert",
134+
"clear",
135+
"count",
136+
"countReset",
137+
"group",
138+
"groupEnd",
139+
"table",
140+
"dirxml",
141+
"error",
142+
"groupCollapsed",
143+
"Console",
144+
"profile",
145+
"profileEnd",
146+
"timeStamp",
147+
"context"
148+
]
149+
}
150+
],
151+
"no-debugger": "error",
152+
"no-empty": "off",
153+
"no-empty-function": "off",
154+
"no-eval": "error",
155+
"no-fallthrough": "error",
156+
"no-new-wrappers": "error",
157+
"no-restricted-imports": "error",
158+
"no-shadow": "error",
159+
"no-throw-literal": "error",
160+
"no-trailing-spaces": "error",
161+
"no-undef-init": "error",
162+
"no-underscore-dangle": "off",
163+
"no-unused-expressions": "off",
164+
"no-unused-labels": "error",
165+
"no-var": "error",
166+
"prefer-const": "error",
167+
"quotes": "error",
168+
"radix": "error",
169+
"semi": "error",
170+
"spaced-comment": [
171+
"error",
172+
"always",
173+
{
174+
"markers": [
175+
"/"
176+
]
177+
}
178+
],
179+
"valid-typeof": "error",
180+
"@typescript-eslint/tslint/config": [
181+
"error",
182+
{
183+
"rules": {
184+
"import-spacing": true,
185+
"invoke-injectable": true,
186+
"no-access-missing-member": true,
187+
"templates-use-public": true,
188+
"whitespace": true
189+
}
190+
}
191+
]
192+
}
193+
};

0 commit comments

Comments
 (0)