Skip to content

Commit 3dbcbb2

Browse files
ISSUE-114: Change from tslint to eslint (mathisGarberg#117)
1 parent 0869065 commit 3dbcbb2

File tree

7 files changed

+1822
-217
lines changed

7 files changed

+1822
-217
lines changed

.eslintrc.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
"@typescript-eslint/consistent-type-definitions": "error",
25+
"@typescript-eslint/dot-notation": "off",
26+
"@typescript-eslint/explicit-member-accessibility": [
27+
"off",
28+
{
29+
"accessibility": "explicit"
30+
}
31+
],
32+
"id-blacklist": "off",
33+
"id-match": "off",
34+
"no-underscore-dangle": "off"
35+
}
36+
},
37+
{
38+
"files": [
39+
"*.html"
40+
],
41+
"extends": [
42+
"plugin:@angular-eslint/template/recommended"
43+
],
44+
"rules": {}
45+
}
46+
]
47+
}

angular.json

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"build": {
1919
"builder": "@angular-devkit/build-angular:browser",
2020
"options": {
21-
"allowedCommonJsDependencies": ["rxjs-compat"],
21+
"allowedCommonJsDependencies": [
22+
"rxjs-compat"
23+
],
2224
"aot": true,
2325
"outputPath": "dist",
2426
"index": "src/index.html",
@@ -44,7 +46,9 @@
4446
}
4547
],
4648
"stylePreprocessorOptions": {
47-
"includePaths": ["./src/styles"]
49+
"includePaths": [
50+
"./src/styles"
51+
]
4852
},
4953
"scripts": []
5054
},
@@ -132,7 +136,9 @@
132136
}
133137
],
134138
"stylePreprocessorOptions": {
135-
"includePaths": ["./src/styles"]
139+
"includePaths": [
140+
"./src/styles"
141+
]
136142
},
137143
"scripts": [],
138144
"assets": [
@@ -160,10 +166,12 @@
160166
}
161167
},
162168
"lint": {
163-
"builder": "@angular-devkit/build-angular:tslint",
169+
"builder": "@angular-eslint/builder:lint",
164170
"options": {
165-
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
166-
"exclude": ["**/node_modules/**", "src/app/data/service/json/*"]
171+
"lintFilePatterns": [
172+
"src/**/*.ts",
173+
"src/**/*.html"
174+
]
167175
}
168176
}
169177
}
@@ -188,7 +196,10 @@
188196
"builder": "@angular-devkit/build-angular:tslint",
189197
"options": {
190198
"tsConfig": "e2e/tsconfig.e2e.json",
191-
"exclude": ["**/node_modules/**", "src/app/data/service/json/*"]
199+
"exclude": [
200+
"**/node_modules/**",
201+
"src/app/data/service/json/*"
202+
]
192203
}
193204
}
194205
}

0 commit comments

Comments
 (0)