ref/ keep only 1 eslint config
This commit is contained in:
114
.eslintrc.json
114
.eslintrc.json
@@ -1,61 +1,65 @@
|
|||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
"es6": true,
|
"es6": true,
|
||||||
"es2017": true
|
"es2017": true
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["*.ts"],
|
"files": ["*.ts"],
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:@typescript-eslint/eslint-recommended",
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||||
|
],
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 10,
|
||||||
|
"project": [
|
||||||
|
"./src/tsconfig.app.json",
|
||||||
|
"./src/tsconfig.spec.json",
|
||||||
|
"./e2e/tsconfig.e2e.json"
|
||||||
],
|
],
|
||||||
"parser": "@typescript-eslint/parser",
|
"sourceType": "module",
|
||||||
"parserOptions": {
|
"ecmaFeatures": {
|
||||||
"ecmaVersion": 10,
|
"modules": true
|
||||||
"project": "src/tsconfig.app.json",
|
|
||||||
"sourceType": "module",
|
|
||||||
"ecmaFeatures": {
|
|
||||||
"modules": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
"@typescript-eslint",
|
|
||||||
"@angular-eslint/eslint-plugin"
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/indent": [
|
|
||||||
"error", 2, {
|
|
||||||
"SwitchCase": 1,
|
|
||||||
"CallExpression": {"arguments": "first"},
|
|
||||||
"FunctionExpression": {"parameters": "first"},
|
|
||||||
"FunctionDeclaration": {"parameters": "first"}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@typescript-eslint/no-empty-function": 0,
|
|
||||||
"@typescript-eslint/no-var-requires": 0,
|
|
||||||
"@typescript-eslint/no-explicit-any": 0,
|
|
||||||
"@typescript-eslint/no-unsafe-call": 0,
|
|
||||||
"@typescript-eslint/no-unsafe-member-access": 0,
|
|
||||||
"@typescript-eslint/no-unsafe-assignment": 0,
|
|
||||||
"@typescript-eslint/no-unsafe-return": 0,
|
|
||||||
"@typescript-eslint/no-floating-promises": 0,
|
|
||||||
"@angular-eslint/use-injectable-provided-in": "error",
|
|
||||||
"@angular-eslint/no-attribute-decorator": "error"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
"plugins": [
|
||||||
"files": ["*.component.html"],
|
"@typescript-eslint",
|
||||||
"parser": "@angular-eslint/template-parser",
|
"@angular-eslint/eslint-plugin"
|
||||||
"plugins": ["@angular-eslint/template"],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"@angular-eslint/template/banana-in-a-box": "error",
|
"@typescript-eslint/indent": [
|
||||||
"@angular-eslint/template/no-negated-async": "error"
|
"error", 2, {
|
||||||
}
|
"SwitchCase": 1,
|
||||||
|
"CallExpression": {"arguments": "first"},
|
||||||
|
"FunctionExpression": {"parameters": "first"},
|
||||||
|
"FunctionDeclaration": {"parameters": "first"}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"@typescript-eslint/no-empty-function": 0,
|
||||||
|
"@typescript-eslint/no-var-requires": 0,
|
||||||
|
"@typescript-eslint/no-explicit-any": 0,
|
||||||
|
"@typescript-eslint/no-unsafe-call": 0,
|
||||||
|
"@typescript-eslint/no-unsafe-member-access": 0,
|
||||||
|
"@typescript-eslint/no-unsafe-assignment": 0,
|
||||||
|
"@typescript-eslint/no-unsafe-return": 0,
|
||||||
|
"@typescript-eslint/no-floating-promises": 0,
|
||||||
|
"@angular-eslint/use-injectable-provided-in": "error",
|
||||||
|
"@angular-eslint/no-attribute-decorator": "error"
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
|
{
|
||||||
|
"files": ["*.component.html"],
|
||||||
|
"parser": "@angular-eslint/template-parser",
|
||||||
|
"plugins": ["@angular-eslint/template"],
|
||||||
|
"rules": {
|
||||||
|
"@angular-eslint/template/banana-in-a-box": "error",
|
||||||
|
"@angular-eslint/template/no-negated-async": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
"lint": {
|
"lint": {
|
||||||
"builder": "@angular-eslint/builder:lint",
|
"builder": "@angular-eslint/builder:lint",
|
||||||
"options": {
|
"options": {
|
||||||
"eslintConfig": "src/eslintrc.app.json",
|
"eslintConfig": ".eslintrc.json",
|
||||||
"tsConfig": [
|
"tsConfig": [
|
||||||
"src/tsconfig.app.json",
|
"src/tsconfig.app.json",
|
||||||
"src/tsconfig.spec.json"
|
"src/tsconfig.spec.json"
|
||||||
@@ -146,7 +146,7 @@
|
|||||||
"lint": {
|
"lint": {
|
||||||
"builder": "@angular-eslint/builder:lint",
|
"builder": "@angular-eslint/builder:lint",
|
||||||
"options": {
|
"options": {
|
||||||
"eslintConfig": "e2e/eslintrc.e2e.json",
|
"eslintConfig": ".eslintrc.json",
|
||||||
"tsConfig": [
|
"tsConfig": [
|
||||||
"e2e/tsconfig.e2e.json"
|
"e2e/tsconfig.e2e.json"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../.eslintrc.json",
|
|
||||||
"parserOptions": {
|
|
||||||
"project": [
|
|
||||||
"e2e/tsconfig.e2e.json"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,6 +8,6 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"**/*.ts"
|
"e2e/**/*.ts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../.eslintrc.json",
|
|
||||||
"parserOptions": {
|
|
||||||
"project": [
|
|
||||||
"src/tsconfig.app.json",
|
|
||||||
"src/tsconfig.spec.json"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user