Skip to content

Commit a2541e1

Browse files
committed
chore: add eslint
1 parent c84457c commit a2541e1

File tree

4 files changed

+2008
-109
lines changed

4 files changed

+2008
-109
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/directive-selector": [
24+
"error",
25+
{
26+
"type": "attribute",
27+
"prefix": "",
28+
"style": "camelCase"
29+
}
30+
],
31+
"@angular-eslint/component-selector": [
32+
"error",
33+
{
34+
"type": "element",
35+
"prefix": "app",
36+
"style": "kebab-case"
37+
}
38+
]
39+
}
40+
},
41+
{
42+
"files": [
43+
"*.html"
44+
],
45+
"extends": [
46+
"plugin:@angular-eslint/template/recommended"
47+
],
48+
"rules": {}
49+
}
50+
]
51+
}

angular.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"cli": {
4-
"analytics": "b3f3ba62-4e65-46bd-bee1-642764c1964e"
4+
"analytics": "b3f3ba62-4e65-46bd-bee1-642764c1964e",
5+
"defaultCollection": "@angular-eslint/schematics"
56
},
67
"version": 1,
78
"newProjectRoot": "projects",
@@ -101,6 +102,15 @@
101102
],
102103
"scripts": []
103104
}
105+
},
106+
"lint": {
107+
"builder": "@angular-eslint/builder:lint",
108+
"options": {
109+
"lintFilePatterns": [
110+
"src/**/*.ts",
111+
"src/**/*.html"
112+
]
113+
}
104114
}
105115
}
106116
}

0 commit comments

Comments
 (0)