Skip to content

Commit 3d0d723

Browse files
committed
Added ESlint linter
1 parent 55f3aa2 commit 3d0d723

File tree

4 files changed

+1042
-80
lines changed

4 files changed

+1042
-80
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": "app",
27+
"style": "camelCase"
28+
}
29+
],
30+
"@angular-eslint/component-selector": [
31+
"error",
32+
{
33+
"type": "element",
34+
"prefix": "app",
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: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,21 @@
129129
"firebaseProject": "sapython-f016a",
130130
"firebaseHostingSite": "sapython-f016a"
131131
}
132+
},
133+
"lint": {
134+
"builder": "@angular-eslint/builder:lint",
135+
"options": {
136+
"lintFilePatterns": [
137+
"src/**/*.ts",
138+
"src/**/*.html"
139+
]
140+
}
132141
}
133142
}
134143
}
135144
},
136-
"defaultProject": "SapythonBlog"
137-
}
145+
"defaultProject": "SapythonBlog",
146+
"cli": {
147+
"defaultCollection": "@angular-eslint/schematics"
148+
}
149+
}

0 commit comments

Comments
 (0)