Skip to content

Commit 39de8a5

Browse files
Sheik Althafllorenspujol
authored andcommitted
build: update angular to 13
feat: migrate from tslint to eslint Angula13 upgrade some fixes Added @katoid/prefix-exported-code eslint plugin Upgraded Angular v13 deps to it's current latest fix: minor change fix: revert the changes
1 parent 1d9bbe4 commit 39de8a5

29 files changed

+13510
-49471
lines changed

.eslintrc.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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+
"plugins": [
19+
"@katoid"
20+
],
21+
"extends": [
22+
"plugin:@angular-eslint/recommended",
23+
"plugin:@angular-eslint/template/process-inline-templates"
24+
],
25+
"rules": {
26+
"@katoid/prefix-exported-code": [
27+
"error",
28+
{
29+
"prefix": "ktd",
30+
"types": ["class", "interface", "function"]
31+
}
32+
],
33+
"@angular-eslint/component-selector": [
34+
"error",
35+
{
36+
"prefix": "ktd",
37+
"style": "kebab-case",
38+
"type": "element"
39+
}
40+
],
41+
"@angular-eslint/directive-selector": [
42+
"error",
43+
{
44+
"prefix": "ktd",
45+
"style": "camelCase",
46+
"type": "attribute"
47+
}
48+
],
49+
"@typescript-eslint/ban-ts-comment": "error",
50+
"@typescript-eslint/no-this-alias": "error",
51+
"no-invalid-this": "error",
52+
"no-sequences": "error",
53+
"prefer-object-spread": "error"
54+
}
55+
},
56+
{
57+
"files": [
58+
"*.html"
59+
],
60+
"extends": [
61+
"plugin:@angular-eslint/template/recommended"
62+
],
63+
"rules": {}
64+
}
65+
]
66+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ speed-measure-plugin*.json
3232
.history/*
3333

3434
# misc
35+
/.angular/cache
3536
/.sass-cache
3637
/connect.lock
3738
/coverage

angular.json

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,11 @@
3333
}
3434
},
3535
"lint": {
36-
"builder": "@angular-devkit/build-angular:tslint",
36+
"builder": "@angular-eslint/builder:lint",
3737
"options": {
38-
"tsConfig": [
39-
"projects/angular-grid-layout/tsconfig.lib.json",
40-
"projects/angular-grid-layout/tsconfig.spec.json"
41-
],
42-
"exclude": [
43-
"**/node_modules/**"
38+
"lintFilePatterns": [
39+
"projects/angular-grid-layout/**/*.ts",
40+
"projects/angular-grid-layout/**/*.html"
4441
]
4542
}
4643
}
@@ -77,12 +74,12 @@
7774
},
7875
"configurations": {
7976
"development": {
80-
"buildOptimizer": false,
81-
"optimization": false,
82-
"vendorChunk": true,
83-
"extractLicenses": false,
84-
"sourceMap": true,
85-
"namedChunks": true
77+
"buildOptimizer": false,
78+
"optimization": false,
79+
"vendorChunk": true,
80+
"extractLicenses": false,
81+
"sourceMap": true,
82+
"namedChunks": true
8683
},
8784
"production": {
8885
"fileReplacements": [
@@ -149,19 +146,6 @@
149146
"scripts": []
150147
}
151148
},
152-
"lint": {
153-
"builder": "@angular-devkit/build-angular:tslint",
154-
"options": {
155-
"tsConfig": [
156-
"projects/demo-app/tsconfig.app.json",
157-
"projects/demo-app/tsconfig.spec.json",
158-
"projects/demo-app/e2e/tsconfig.json"
159-
],
160-
"exclude": [
161-
"**/node_modules/**"
162-
]
163-
}
164-
},
165149
"e2e": {
166150
"builder": "@angular-devkit/build-angular:protractor",
167151
"options": {
@@ -177,12 +161,22 @@
177161
"deploy": {
178162
"builder": "angular-cli-ghpages:deploy",
179163
"options": {}
164+
},
165+
"lint": {
166+
"builder": "@angular-eslint/builder:lint",
167+
"options": {
168+
"lintFilePatterns": [
169+
"projects/demo-app/**/*.ts",
170+
"projects/demo-app/**/*.html"
171+
]
172+
}
180173
}
181174
}
182175
}
183176
},
184177
"cli": {
185-
"analytics": false
178+
"analytics": false,
179+
"defaultCollection": "@angular-eslint/schematics"
186180
},
187181
"defaultProject": "demo-app"
188182
}

0 commit comments

Comments
 (0)