Skip to content

Commit 8c373b5

Browse files
committed
chore(package): Move to ESLint
1 parent 28ca9df commit 8c373b5

16 files changed

+3660
-1359
lines changed

.eslintrc.json

Lines changed: 51 additions & 0 deletions
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": "ym",
27+
"style": "kebab-case",
28+
"type": "element"
29+
}
30+
],
31+
"@angular-eslint/directive-selector": [
32+
"error",
33+
{
34+
"prefix": "ym",
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ testem.log
4444
# System Files
4545
.DS_Store
4646
Thumbs.db
47+
48+
/.angular

angular.json

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@
3535
}
3636
},
3737
"lint": {
38-
"builder": "@angular-devkit/build-angular:tslint",
38+
"builder": "@angular-eslint/builder:lint",
3939
"options": {
40-
"tsConfig": [
41-
"projects/ngx-metrika/tsconfig.lib.json",
42-
"projects/ngx-metrika/tsconfig.spec.json"
43-
],
44-
"exclude": [
45-
"**/node_modules/**"
40+
"lintFilePatterns": [
41+
"projects/ngx-metrika/**/*.ts",
42+
"projects/ngx-metrika/**/*.html"
4643
]
4744
}
4845
}
@@ -146,15 +143,11 @@
146143
}
147144
},
148145
"lint": {
149-
"builder": "@angular-devkit/build-angular:tslint",
146+
"builder": "@angular-eslint/builder:lint",
150147
"options": {
151-
"tsConfig": [
152-
"projects/ngx-metrika-app/tsconfig.app.json",
153-
"projects/ngx-metrika-app/tsconfig.spec.json",
154-
"projects/ngx-metrika-app/e2e/tsconfig.json"
155-
],
156-
"exclude": [
157-
"**/node_modules/**"
148+
"lintFilePatterns": [
149+
"projects/ngx-metrika-app/**/*.ts",
150+
"projects/ngx-metrika-app/**/*.html"
158151
]
159152
}
160153
},
@@ -175,6 +168,7 @@
175168
},
176169
"defaultProject": "ngx-metrika-app",
177170
"cli": {
178-
"analytics": "a406fc73-39f8-4f9d-b4a2-c47a90e4b7fc"
171+
"analytics": "a406fc73-39f8-4f9d-b4a2-c47a90e4b7fc",
172+
"defaultCollection": "@angular-eslint/schematics"
179173
}
180-
}
174+
}

0 commit comments

Comments
 (0)