Skip to content

Commit a1bfcef

Browse files
committed
Angular 11 eslint and routing update
1 parent cc52625 commit a1bfcef

33 files changed

+1934
-575
lines changed

Diff for: carrental-web/src/angular/carrental/.eslintrc.json

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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/ng-cli-compat",
20+
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
21+
"plugin:@angular-eslint/template/process-inline-templates"
22+
],
23+
"rules": {
24+
"@angular-eslint/component-selector": [
25+
"error",
26+
{
27+
"type": "element",
28+
"prefix": "app",
29+
"style": "kebab-case"
30+
}
31+
],
32+
"@angular-eslint/directive-selector": [
33+
"error",
34+
{
35+
"type": "attribute",
36+
"prefix": "app",
37+
"style": "camelCase"
38+
}
39+
],
40+
"@typescript-eslint/explicit-member-accessibility": [
41+
"off",
42+
{
43+
"accessibility": "explicit"
44+
}
45+
],
46+
"arrow-parens": [
47+
"off",
48+
"always"
49+
],
50+
"import/order": "off"
51+
}
52+
},
53+
{
54+
"files": [
55+
"*.html"
56+
],
57+
"extends": [
58+
"plugin:@angular-eslint/template/recommended"
59+
],
60+
"rules": {}
61+
}
62+
]
63+
}

Diff for: carrental-web/src/angular/carrental/angular.json

+30-29
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
"projectType": "application",
1010
"prefix": "app",
1111
"i18n": {
12-
"locales": {
12+
"locales": {
1313
"en": "src/locale/messages.en.xlf"
14-
},
15-
"sourceLocale": "de"
16-
},
17-
"schematics": {
14+
},
15+
"sourceLocale": "de"
16+
},
17+
"schematics": {
1818
"@schematics/angular:component": {
1919
"style": "scss"
2020
}
21-
},
21+
},
2222
"architect": {
2323
"build": {
2424
"builder": "@angular-devkit/build-angular:browser",
@@ -28,7 +28,7 @@
2828
"index": "src/index.html",
2929
"main": "src/main.ts",
3030
"polyfills": "src/polyfills.ts",
31-
"tsConfig": "tsconfig.app.json",
31+
"tsConfig": "tsconfig.app.json",
3232
"assets": [
3333
"src/favicon.ico",
3434
"src/assets"
@@ -38,13 +38,17 @@
3838
],
3939
"scripts": []
4040
},
41-
"configurations": {
42-
"de": {
43-
"localize": ["de"]
44-
},
45-
"en": {
46-
"localize": ["en"]
47-
},
41+
"configurations": {
42+
"de": {
43+
"localize": [
44+
"de"
45+
]
46+
},
47+
"en": {
48+
"localize": [
49+
"en"
50+
]
51+
},
4852
"production": {
4953
"budgets": [
5054
{
@@ -75,7 +79,7 @@
7579
"buildOptimizer": true
7680
}
7781
}
78-
},
82+
},
7983
"serve": {
8084
"builder": "@angular-devkit/build-angular:dev-server",
8185
"options": {
@@ -84,10 +88,10 @@
8488
"configurations": {
8589
"production": {
8690
"browserTarget": "testproject:build:production"
87-
},
91+
},
8892
"en": {
8993
"browserTarget": "testproject:build:en"
90-
}
94+
}
9195
}
9296
},
9397
"extract-i18n": {
@@ -114,14 +118,11 @@
114118
}
115119
},
116120
"lint": {
117-
"builder": "@angular-devkit/build-angular:tslint",
121+
"builder": "@angular-eslint/builder:lint",
118122
"options": {
119-
"tsConfig": [
120-
"tsconfig.app.json",
121-
"tsconfig.spec.json"
122-
],
123-
"exclude": [
124-
"**/node_modules/**"
123+
"lintFilePatterns": [
124+
"src/**/*.ts",
125+
"src/**/*.html"
125126
]
126127
}
127128
}
@@ -139,11 +140,11 @@
139140
}
140141
},
141142
"lint": {
142-
"builder": "@angular-devkit/build-angular:tslint",
143+
"builder": "@angular-eslint/builder:lint",
143144
"options": {
144-
"tsConfig": "e2e/tsconfig.e2e.json",
145-
"exclude": [
146-
"**/node_modules/**"
145+
"lintFilePatterns": [
146+
"src/**/*.ts",
147+
"src/**/*.html"
147148
]
148149
}
149150
}
@@ -154,4 +155,4 @@
154155
"cli": {
155156
"analytics": false
156157
}
157-
}
158+
}

0 commit comments

Comments
 (0)