Skip to content

Commit 2a0db21

Browse files
author
bcsik
committed
add ng lint
1 parent 9077460 commit 2a0db21

File tree

5 files changed

+2472
-193
lines changed

5 files changed

+2472
-193
lines changed

.eslintrc.json

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

.vscode/launch.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
33
"version": "0.2.0",
44
"configurations": [
5+
{
6+
"name": "ng lint",
7+
"type": "node",
8+
"request": "launch",
9+
"preLaunchTask": "npm: lint"
10+
},
511
{
612
"name": "ng build",
713
"request": "launch",

angular.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,22 @@
8888
],
8989
"scripts": []
9090
}
91+
},
92+
"lint": {
93+
"builder": "@angular-eslint/builder:lint",
94+
"options": {
95+
"lintFilePatterns": [
96+
"src/**/*.ts",
97+
"src/**/*.html"
98+
]
99+
}
91100
}
92101
}
93102
}
103+
},
104+
"cli": {
105+
"schematicCollections": [
106+
"@angular-eslint/schematics"
107+
]
94108
}
95109
}

0 commit comments

Comments
 (0)