Skip to content

Commit 0420399

Browse files
committed
adds eslint
1 parent 4691275 commit 0420399

File tree

7 files changed

+786
-202
lines changed

7 files changed

+786
-202
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/directive-selector": [
23+
"error",
24+
{
25+
"type": "attribute",
26+
"prefix": "lib",
27+
"style": "camelCase"
28+
}
29+
],
30+
"@angular-eslint/component-selector": [
31+
"error",
32+
{
33+
"type": "element",
34+
"prefix": "lib",
35+
"style": "kebab-case"
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: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"prefix": "lib",
1111
"architect": {
1212
"build": {
13-
"builder": "@angular-devkit/build-ng-packagr:build",
13+
"builder": "@angular-devkit/build-angular:ng-packagr",
1414
"options": {
1515
"tsConfig": "tsconfig.lib.json",
1616
"project": "ng-package.json"
@@ -28,11 +28,23 @@
2828
"tsConfig": "tsconfig.spec.json",
2929
"karmaConfig": "karma.conf.js"
3030
}
31+
},
32+
"lint": {
33+
"builder": "@angular-eslint/builder:lint",
34+
"options": {
35+
"lintFilePatterns": [
36+
"src/**/*.ts",
37+
"src/**/*.html"
38+
]
39+
}
3140
}
3241
}
3342
}
3443
},
3544
"cli": {
36-
"analytics": "28ebfb91-5472-49c3-86dc-4a108bc48fc9"
45+
"analytics": "28ebfb91-5472-49c3-86dc-4a108bc48fc9",
46+
"schematicCollections": [
47+
"@angular-eslint/schematics"
48+
]
3749
}
38-
}
50+
}

0 commit comments

Comments
 (0)