Skip to content

Commit 502ad85

Browse files
committed
Migrate to tslint to eslint
1 parent 574ecf3 commit 502ad85

File tree

4 files changed

+1424
-11
lines changed

4 files changed

+1424
-11
lines changed

frontend/.eslintrc.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json", "e2e/tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:@angular-eslint/ng-cli-compat",
13+
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
14+
"plugin:@angular-eslint/template/process-inline-templates"
15+
],
16+
"rules": {
17+
"@angular-eslint/component-selector": [
18+
"error",
19+
{
20+
"type": "element",
21+
"prefix": "", //temporary disable the prefix rule
22+
"style": "kebab-case"
23+
}
24+
],
25+
"@angular-eslint/directive-selector": [
26+
"error",
27+
{
28+
"type": "attribute",
29+
"prefix": "", //temporary disable the prefix rule
30+
"style": "camelCase"
31+
}
32+
],
33+
"@angular-eslint/no-output-on-prefix": "off",
34+
"@typescript-eslint/naming-convention": [
35+
"error",
36+
{
37+
"selector": "default",
38+
"format": ["camelCase"],
39+
"leadingUnderscore": "allow",
40+
"trailingUnderscore": "allow"
41+
},
42+
43+
{
44+
"selector": "variable",
45+
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
46+
"leadingUnderscore": "allow",
47+
"trailingUnderscore": "allow"
48+
},
49+
{
50+
"selector": "typeLike",
51+
"format": ["PascalCase"]
52+
},
53+
{
54+
"selector": "enumMember",
55+
"format": ["camelCase", "PascalCase"]
56+
}
57+
],
58+
"typescript-eslint/quotes": "off",
59+
"no-underscore-dangle": "off",
60+
"radix": "off"
61+
}
62+
},
63+
{
64+
"files": ["*.html"],
65+
"extends": ["plugin:@angular-eslint/template/recommended"],
66+
"rules": {}
67+
}
68+
]
69+
}

frontend/angular.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,11 @@
142142
}
143143
},
144144
"lint": {
145-
"builder": "@angular-devkit/build-angular:tslint",
145+
"builder": "@angular-eslint/builder:lint",
146146
"options": {
147-
"tsConfig": [
148-
"tsconfig.app.json",
149-
"tsconfig.spec.json",
150-
"e2e/tsconfig.json"
151-
],
152-
"exclude": [
153-
"**/node_modules/**"
147+
"lintFilePatterns": [
148+
"src/**/*.ts",
149+
"src/**/*.html"
154150
]
155151
}
156152
},

0 commit comments

Comments
 (0)