fix/ ng lint with eslint
This commit is contained in:
61
.eslintrc.json
Normal file
61
.eslintrc.json
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"es2017": true
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 10,
|
||||
"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"
|
||||
}
|
||||
},
|
||||
{
|
||||
"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": {
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"eslintConfig": "src/eslintrc.config.json",
|
||||
"eslintConfig": "src/eslintrc.app.json",
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{
|
||||
"extends": "../eslintrc.json",
|
||||
"extends": "../.eslintrc.json",
|
||||
"parserOptions": {
|
||||
"project": ["e2e/tsconfig.e2e.json"]
|
||||
"project": [
|
||||
"e2e/tsconfig.e2e.json"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"es2017": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
||||
],
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"tsconfigRootDir": "."
|
||||
},
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"rules": {
|
||||
"@typescript-eslint/no-empty-function": 0,
|
||||
"@typescript-eslint/no-var-requires": 0,
|
||||
"@typescript-eslint/no-explicit-any": 0
|
||||
}
|
||||
}
|
||||
1
main.ts
1
main.ts
@@ -25,7 +25,6 @@ function createWindow(): BrowserWindow {
|
||||
|
||||
if (serve) {
|
||||
|
||||
require('devtron').install();
|
||||
win.webContents.openDevTools();
|
||||
|
||||
require('electron-reload')(__dirname, {
|
||||
|
||||
16
package.json
16
package.json
@@ -40,7 +40,10 @@
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "9.1.0",
|
||||
"@angular-devkit/build-angular": "0.901.9",
|
||||
"@angular-eslint/builder": "0.0.1-alpha.18",
|
||||
"@angular-eslint/builder": "0.0.1-alpha.32",
|
||||
"@angular-eslint/eslint-plugin": "0.0.1-alpha.32",
|
||||
"@angular-eslint/eslint-plugin-template": "0.0.1-alpha.32",
|
||||
"@angular-eslint/template-parser": "0.0.1-alpha.32",
|
||||
"@angular/cli": "9.1.9",
|
||||
"@angular/common": "9.1.11",
|
||||
"@angular/compiler": "9.1.11",
|
||||
@@ -57,19 +60,18 @@
|
||||
"@types/jasminewd2": "2.0.8",
|
||||
"@types/mocha": "7.0.2",
|
||||
"@types/node": "12.11.1",
|
||||
"@typescript-eslint/eslint-plugin": "2.27.0",
|
||||