Skip to content

Commit ec68f5e

Browse files
authored
feat: update to Angular 13, move from tslint to eslint (#5957)
* feat: update to Angular 13 * feat: update to Angular 13, move from tslint to eslint
1 parent fd95769 commit ec68f5e

File tree

12 files changed

+11984
-11131
lines changed

12 files changed

+11984
-11131
lines changed

.eslintrc.json

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": [
4+
"projects/**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"tsconfig.json",
14+
"e2e/tsconfig.json"
15+
],
16+
"createDefaultProgram": true
17+
},
18+
"extends": [
19+
"plugin:@angular-eslint/recommended",
20+
"plugin:@angular-eslint/template/process-inline-templates"
21+
],
22+
"rules": {
23+
"@angular-eslint/no-input-rename": [
24+
"warn",
25+
{
26+
"allowedNames": ["name"]
27+
}
28+
],
29+
"@angular-eslint/component-selector": [
30+
"error",
31+
{
32+
"prefix": "ngx",
33+
"style": "kebab-case",
34+
"type": "element"
35+
}
36+
],
37+
"@angular-eslint/directive-selector": [
38+
"error",
39+
{
40+
"prefix": "ngx",
41+
"style": "camelCase",
42+
"type": "attribute"
43+
}
44+
]
45+
}
46+
},
47+
{
48+
"files": [
49+
"*.html"
50+
],
51+
"extends": [
52+
"plugin:@angular-eslint/template/recommended"
53+
],
54+
"rules": {}
55+
}
56+
]
57+
}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
!.vscode/extensions.json
2424

2525
# misc
26+
/.angular/cache
2627
/.sass-cache
2728
/connect.lock
2829
/coverage

angular.json

+6-17
Original file line numberDiff line numberDiff line change
@@ -148,20 +148,18 @@
148148
}
149149
},
150150
"lint": {
151-
"builder": "@angular-devkit/build-angular:tslint",
151+
"builder": "@angular-eslint/builder:lint",
152152
"options": {
153-
"tsConfig": [
154-
"src/tsconfig.app.json",
155-
"src/tsconfig.spec.json"
156-
],
157-
"typeCheck": true,
158-
"exclude": []
153+
"lintFilePatterns": [
154+
"src/**/*.ts",
155+
"src/**/*.html"
156+
]
159157
}
160158
}
161159
}
162160
},
163161
"ngx-admin-demo-e2e": {
164-
"root": "",
162+
"root": "e2e",
165163
"sourceRoot": "",
166164
"projectType": "application",
167165
"architect": {
@@ -171,15 +169,6 @@
171169
"protractorConfig": "./protractor.conf.js",
172170
"devServerTarget": "ngx-admin-demo:serve"
173171
}
174-
},
175-
"lint": {
176-
"builder": "@angular-devkit/build-angular:tslint",
177-
"options": {
178-
"tsConfig": [
179-
"e2e/tsconfig.e2e.json"
180-
],
181-
"exclude": []
182-
}
183172
}
184173
}
185174
}

e2e/.eslintrc.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"extends": "../.eslintrc.json",
3+
"ignorePatterns": [
4+
"!**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"e2e/tsconfig.app.json",
14+
"e2e/tsconfig.spec.json",
15+
"e2e/e2e/tsconfig.json"
16+
],
17+
"createDefaultProgram": true
18+
},
19+
"rules": {
20+
"@angular-eslint/directive-selector": [
21+
"error",
22+
{
23+
"type": "attribute",
24+
"style": "camelCase"
25+
}
26+
],
27+
"@angular-eslint/component-selector": [
28+
"error",
29+
{
30+
"type": "element",
31+
"style": "kebab-case"
32+
}
33+
]
34+
}
35+
},
36+
{
37+
"files": [
38+
"*.html"
39+
],
40+
"rules": {}
41+
}
42+
]
43+
}

0 commit comments

Comments
 (0)