Skip to content

Commit 8933877

Browse files
committed
style: added eslint configuration
1 parent 719e6d4 commit 8933877

File tree

10 files changed

+2495
-238
lines changed

10 files changed

+2495
-238
lines changed

.eslintrc.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:@angular-eslint/recommended",
11+
"plugin:@angular-eslint/template/process-inline-templates",
12+
"prettier"
13+
],
14+
"rules": {
15+
"@typescript-eslint/ban-types": "off",
16+
"@typescript-eslint/no-explicit-any": "off",
17+
"prefer-const": "off",
18+
"@angular-eslint/directive-selector": [
19+
"error",
20+
{
21+
"type": "attribute",
22+
"prefix": "lib",
23+
"style": "camelCase"
24+
}
25+
],
26+
"@angular-eslint/component-selector": [
27+
"error",
28+
{
29+
"type": "element",
30+
"prefix": "lib",
31+
"style": "kebab-case"
32+
}
33+
]
34+
}
35+
},
36+
{
37+
"files": ["*.html"],
38+
"extends": [
39+
"plugin:@angular-eslint/template/recommended",
40+
"plugin:@angular-eslint/template/accessibility"
41+
],
42+
"rules": {}
43+
}
44+
]
45+
}

angular.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,22 @@
2828
"builder": "@angular-devkit/build-angular:karma",
2929
"options": {
3030
"tsConfig": "projects/openapi-fetch-angular/tsconfig.spec.json",
31-
"polyfills": [
32-
"zone.js",
33-
"zone.js/testing"
31+
"polyfills": ["zone.js", "zone.js/testing"]
32+
}
33+
},
34+
"lint": {
35+
"builder": "@angular-eslint/builder:lint",
36+
"options": {
37+
"lintFilePatterns": [
38+
"projects/openapi-fetch-angular/**/*.ts",
39+
"projects/openapi-fetch-angular/**/*.html"
3440
]
3541
}
3642
}
3743
}
3844
}
45+
},
46+
"cli": {
47+
"schematicCollections": ["@angular-eslint/schematics"]
3948
}
4049
}

0 commit comments

Comments
 (0)