Skip to content

Commit 5b2fb5c

Browse files
authored
chore: migrate from TSLint to ESLint (#132)
1 parent c290b43 commit 5b2fb5c

File tree

8 files changed

+2785
-1683
lines changed

8 files changed

+2785
-1683
lines changed

.eslintrc.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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+
],
15+
"createDefaultProgram": true
16+
},
17+
"extends": [
18+
"plugin:@angular-eslint/recommended",
19+
"plugin:@angular-eslint/template/process-inline-templates"
20+
],
21+
"rules": {
22+
"@angular-eslint/component-selector": [
23+
"error",
24+
{
25+
"prefix": "app",
26+
"style": "kebab-case",
27+
"type": "element"
28+
}
29+
],
30+
"@angular-eslint/directive-selector": [
31+
"error",
32+
{
33+
"prefix": "app",
34+
"style": "camelCase",
35+
"type": "attribute"
36+
}
37+
]
38+
}
39+
},
40+
{
41+
"files": [
42+
"*.html"
43+
],
44+
"extends": [
45+
"plugin:@angular-eslint/template/recommended"
46+
],
47+
"rules": {}
48+
}
49+
]
50+
}

angular.json

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,15 @@
111111
"devServerTarget": "angular-material-css-vars:serve:production"
112112
}
113113
}
114+
},
115+
"lint": {
116+
"builder": "@angular-eslint/builder:lint",
117+
"options": {
118+
"lintFilePatterns": [
119+
"src/**/*.ts",
120+
"src/**/*.html"
121+
]
122+
}
114123
}
115124
}
116125
},
@@ -134,6 +143,15 @@
134143
"tsConfig": "projects/material-css-vars/tsconfig.spec.json",
135144
"karmaConfig": "projects/material-css-vars/karma.conf.js"
136145
}
146+
},
147+
"lint": {
148+
"builder": "@angular-eslint/builder:lint",
149+
"options": {
150+
"lintFilePatterns": [
151+
"projects/material-css-vars/**/*.ts",
152+
"projects/material-css-vars/**/*.html"
153+
]
154+
}
137155
}
138156
}
139157
}
@@ -142,6 +160,9 @@
142160
"analytics": false,
143161
"cache": {
144162
"enabled": false
145-
}
163+
},
164+
"schematicCollections": [
165+
"@angular-eslint/schematics"
166+
]
146167
}
147-
}
168+
}

0 commit comments

Comments
 (0)