Skip to content

Commit b1caef8

Browse files
fix(console): migrate from tslint to eslint, project delete from table (zitadel#2490)
* es lint * modify tsconfig, auto lint some stuff * lint * lint * lint * lint * html ts lint * lint * lint, tsconfig * fix project delete, state table * eslint config, remove cnslHint directive * mfa selector, info row fixes * lint * fix login policy, granted orgs table state, lint Co-authored-by: Florian Forster <[email protected]>
1 parent bdf6380 commit b1caef8

File tree

233 files changed

+7202
-4982
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+7202
-4982
lines changed

console/.eslintrc.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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-conflicting-lifecycle": "off",
24+
"@angular-eslint/no-host-metadata-property": "off",
25+
"@angular-eslint/component-selector": [
26+
"error",
27+
{
28+
"prefix": "cnsl",
29+
"style": "kebab-case",
30+
"type": "element"
31+
}
32+
],
33+
"@angular-eslint/directive-selector": [
34+
"error",
35+
{
36+
"prefix": "cnsl",
37+
"style": "camelCase",
38+
"type": "attribute"
39+
}
40+
]
41+
}
42+
},
43+
{
44+
"files": [
45+
"*.html"
46+
],
47+
"extends": [
48+
"plugin:@angular-eslint/template/recommended"
49+
],
50+
"rules": {}
51+
}
52+
]
53+
}

console/angular.json

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
"src/manifest.webmanifest"
2929
],
3030
"styles": [
31-
"src/styles.scss"
31+
"src/styles.scss"
3232
],
3333
"scripts": [
3434
"./node_modules/tinycolor2/dist/tinycolor-min.js"
3535
],
3636
"allowedCommonJsDependencies": [
37-
"@angular/common/locales/de",
38-
"src/app/proto/generated/zitadel/admin_pb",
39-
"src/app/proto/generated/zitadel/management_pb",
40-
"src/app/proto/generated/**",
41-
"file-saver",
42-
"qrcode"
43-
],
37+
"@angular/common/locales/de",
38+
"src/app/proto/generated/zitadel/admin_pb",
39+
"src/app/proto/generated/zitadel/management_pb",
40+
"src/app/proto/generated/**",
41+
"file-saver",
42+
"qrcode"
43+
],
4444
"vendorChunk": true,
4545
"extractLicenses": false,
4646
"buildOptimizer": false,
@@ -84,8 +84,8 @@
8484
"budgets": [
8585
{
8686
"type": "initial",
87-
"maximumWarning": "4mb",
88-
"maximumError": "5mb"
87+
"maximumWarning": "5mb",
88+
"maximumError": "6mb"
8989
},
9090
{
9191
"type": "anyComponentStyle",
@@ -102,8 +102,7 @@
102102
},
103103
"serve": {
104104
"builder": "@angular-devkit/build-angular:dev-server",
105-
"options": {
106-
},
105+
"options": {},
107106
"configurations": {
108107
"production": {
109108
"browserTarget": "console:build:production"
@@ -142,15 +141,11 @@
142141
}
143142
},
144143
"lint": {
145-
"builder": "@angular-devkit/build-angular:tslint",
144+
"builder": "@angular-eslint/builder:lint",
146145
"options": {
147-
"tsConfig": [
148-
"tsconfig.app.json",
149-
"tsconfig.spec.json"
150-
],
151-
"exclude": [
152-
"**/node_modules/**",
153-
"**/proto/generated/**"
146+
"lintFilePatterns": [
147+
"src/**/*.ts",
148+
"src/**/*.html"
154149
]
155150
}
156151
},
@@ -174,6 +169,7 @@
174169
},
175170
"defaultProject": "console",
176171
"cli": {
177-
"analytics": "2b4e8e6c-f053-4562-b7a6-00c6c06a6791"
172+
"analytics": "2b4e8e6c-f053-4562-b7a6-00c6c06a6791",
173+
"defaultCollection": "@angular-eslint/schematics"
178174
}
179-
}
175+
}

console/e2e/src/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export class AppPage {
66
}
77

88
getTitleText() {
9-
return element(by.css('app-root .content span')).getText() as Promise<string>;
9+
return element(by.css('cnsl-root .content span')).getText() as Promise<string>;
1010
}
1111
}

0 commit comments

Comments
 (0)