Skip to content

Commit 04a6118

Browse files
committed
Migration from tslint to eslint
1 parent 0f7c267 commit 04a6118

13 files changed

+1971
-504
lines changed

.eslintrc.json

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

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,4 @@ testem.log
4545
.DS_Store
4646
Thumbs.db
4747
*.iml
48+
*.log

angular.json

+14-18
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,11 @@
3232
}
3333
},
3434
"lint": {
35-
"builder": "@angular-devkit/build-angular:tslint",
35+
"builder": "@angular-eslint/builder:lint",
3636
"options": {
37-
"tsConfig": [
38-
"projects/auto-complete/tsconfig.lib.json",
39-
"projects/auto-complete/tsconfig.spec.json"
40-
],
41-
"exclude": [
42-
"**/node_modules/**"
37+
"lintFilePatterns": [
38+
"projects/auto-complete/**/*.ts",
39+
"projects/auto-complete/**/*.html"
4340
]
4441
}
4542
}
@@ -113,8 +110,7 @@
113110
},
114111
"serve": {
115112
"builder": "@angular-devkit/build-angular:dev-server",
116-
"options": {
117-
},
113+
"options": {},
118114
"configurations": {
119115
"production": {
120116
"browserTarget": "demo:build:production"
@@ -149,15 +145,11 @@
149145
}
150146
},
151147
"lint": {
152-
"builder": "@angular-devkit/build-angular:tslint",
148+
"builder": "@angular-eslint/builder:lint",
153149
"options": {
154-
"tsConfig": [
155-
"projects/demo/tsconfig.app.json",
156-
"projects/demo/tsconfig.spec.json",
157-
"projects/demo/e2e/tsconfig.json"
158-
],
159-
"exclude": [
160-
"**/node_modules/**"
150+
"lintFilePatterns": [
151+
"projects/demo/**/*.ts",
152+
"projects/demo/**/*.html"
161153
]
162154
}
163155
},
@@ -177,5 +169,9 @@
177169
"defaultConfiguration": "development"
178170
}
179171
}
180-
}}
172+
}
173+
},
174+
"cli": {
175+
"defaultCollection": "@angular-eslint/schematics"
176+
}
181177
}

0 commit comments

Comments
 (0)