Skip to content

Commit e942747

Browse files
author
Maxime GRIS
committed
ref/ keep only 1 eslint config
1 parent a98a84a commit e942747

File tree

5 files changed

+62
-75
lines changed

5 files changed

+62
-75
lines changed

.eslintrc.json

+59-55
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,65 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"node": true,
5-
"es6": true,
6-
"es2017": true
7-
},
8-
"overrides": [
9-
{
10-
"files": ["*.ts"],
11-
"extends": [
12-
"eslint:recommended",
13-
"plugin:@typescript-eslint/eslint-recommended",
14-
"plugin:@typescript-eslint/recommended",
15-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
16-
],
17-
"parser": "@typescript-eslint/parser",
18-
"parserOptions": {
19-
"ecmaVersion": 10,
20-
"project": "src/tsconfig.app.json",
21-
"sourceType": "module",
22-
"ecmaFeatures": {
23-
"modules": true
24-
}
25-
},
26-
"plugins": [
27-
"@typescript-eslint",
28-
"@angular-eslint/eslint-plugin"
2+
"env": {
3+
"browser": true,
4+
"node": true,
5+
"es6": true,
6+
"es2017": true
7+
},
8+
"overrides": [
9+
{
10+
"files": ["*.ts"],
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/eslint-recommended",
14+
"plugin:@typescript-eslint/recommended",
15+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
16+
],
17+
"parser": "@typescript-eslint/parser",
18+
"parserOptions": {
19+
"ecmaVersion": 10,
20+
"project": [
21+
"./src/tsconfig.app.json",
22+
"./src/tsconfig.spec.json",
23+
"./e2e/tsconfig.e2e.json"
2924
],
30-
"rules": {
31-
"@typescript-eslint/indent": [
32-
"error", 2, {
33-
"SwitchCase": 1,
34-
"CallExpression": {"arguments": "first"},
35-
"FunctionExpression": {"parameters": "first"},
36-
"FunctionDeclaration": {"parameters": "first"}
37-
}
38-
],
39-
"@typescript-eslint/no-empty-function": 0,
40-
"@typescript-eslint/no-var-requires": 0,
41-
"@typescript-eslint/no-explicit-any": 0,
42-
"@typescript-eslint/no-unsafe-call": 0,
43-
"@typescript-eslint/no-unsafe-member-access": 0,
44-
"@typescript-eslint/no-unsafe-assignment": 0,
45-
"@typescript-eslint/no-unsafe-return": 0,
46-
"@typescript-eslint/no-floating-promises": 0,
47-
"@angular-eslint/use-injectable-provided-in": "error",
48-
"@angular-eslint/no-attribute-decorator": "error"
25+
"sourceType": "module",
26+
"ecmaFeatures": {
27+
"modules": true
4928
}
5029
},
51-
{
52-
"files": ["*.component.html"],
53-
"parser": "@angular-eslint/template-parser",
54-
"plugins": ["@angular-eslint/template"],
55-
"rules": {
56-
"@angular-eslint/template/banana-in-a-box": "error",
57-
"@angular-eslint/template/no-negated-async": "error"
58-
}
30+
"plugins": [
31+
"@typescript-eslint",
32+
"@angular-eslint/eslint-plugin"
33+
],
34+
"rules": {
35+
"@typescript-eslint/indent": [
36+
"error", 2, {
37+
"SwitchCase": 1,
38+
"CallExpression": {"arguments": "first"},
39+
"FunctionExpression": {"parameters": "first"},
40+
"FunctionDeclaration": {"parameters": "first"}
41+
}
42+
],
43+
"@typescript-eslint/no-empty-function": 0,
44+
"@typescript-eslint/no-var-requires": 0,
45+
"@typescript-eslint/no-explicit-any": 0,
46+
"@typescript-eslint/no-unsafe-call": 0,
47+
"@typescript-eslint/no-unsafe-member-access": 0,
48+
"@typescript-eslint/no-unsafe-assignment": 0,
49+
"@typescript-eslint/no-unsafe-return": 0,
50+
"@typescript-eslint/no-floating-promises": 0,
51+
"@angular-eslint/use-injectable-provided-in": "error",
52+
"@angular-eslint/no-attribute-decorator": "error"
53+
}
54+
},
55+
{
56+
"files": ["*.component.html"],
57+
"parser": "@angular-eslint/template-parser",
58+
"plugins": ["@angular-eslint/template"],
59+
"rules": {
60+
"@angular-eslint/template/banana-in-a-box": "error",
61+
"@angular-eslint/template/no-negated-async": "error"
5962
}
60-
]
63+
}
64+
]
6165
}

angular.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"lint": {
128128
"builder": "@angular-eslint/builder:lint",
129129
"options": {
130-
"eslintConfig": "src/eslintrc.app.json",
130+
"eslintConfig": ".eslintrc.json",
131131
"tsConfig": [
132132
"src/tsconfig.app.json",
133133
"src/tsconfig.spec.json"
@@ -146,7 +146,7 @@
146146
"lint": {
147147
"builder": "@angular-eslint/builder:lint",
148148
"options": {
149-
"eslintConfig": "e2e/eslintrc.e2e.json",
149+
"eslintConfig": ".eslintrc.json",
150150
"tsConfig": [
151151
"e2e/tsconfig.e2e.json"
152152
],

e2e/eslintrc.e2e.json

-8
This file was deleted.

e2e/tsconfig.e2e.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
]
99
},
1010
"include": [
11-
"**/*.ts"
11+
"e2e/**/*.ts"
1212
]
1313
}

src/eslintrc.app.json

-9
This file was deleted.

0 commit comments

Comments
 (0)