Skip to content

Commit 94c12e9

Browse files
committed
fix: add eslint to docs
1 parent 594347d commit 94c12e9

File tree

4 files changed

+5725
-9880
lines changed

4 files changed

+5725
-9880
lines changed

angular.json

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,12 @@
274274
}
275275
},
276276
"lint": {
277-
"builder": "@angular-devkit/build-angular:tslint",
277+
"builder": "@angular-eslint/builder:lint",
278278
"options": {
279-
"tsConfig": [
280-
"docs/tsconfig.spec.json",
281-
"docs/tsconfig.app.json"
282-
],
283-
"exclude": []
279+
"lintFilePatterns": [
280+
"docs/**/*.ts",
281+
"docs/**/*.html"
282+
]
284283
}
285284
}
286285
}
@@ -296,14 +295,6 @@
296295
"protractorConfig": "./protractor.conf.js",
297296
"devServerTarget": "docs:serve"
298297
}
299-
},
300-
"lint": {
301-
"builder": "@angular-devkit/build-angular:tslint",
302-
"options": {
303-
"tsConfig": [
304-
"e2e/tsconfig.e2e.json"],
305-
"exclude": []
306-
}
307298
}
308299
}
309300
}

docs/.eslintrc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"extends": "../.eslintrc.json",
3+
"ignorePatterns": [
4+
"!**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"docs/tsconfig.app.json",
14+
"docs/tsconfig.spec.json"
15+
],
16+
"createDefaultProgram": true
17+
},
18+
"rules": {
19+
"@angular-eslint/directive-selector": [
20+
"error",
21+
{
22+
"type": "attribute",
23+
"style": "camelCase"
24+
}
25+
],
26+
"@angular-eslint/component-selector": [
27+
"error",
28+
{
29+
"type": "element",
30+
"style": "kebab-case"
31+
}
32+
]
33+
}
34+
},
35+
{
36+
"files": [
37+
"*.html"
38+
],
39+
"rules": {}
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)