eslint-migration - disable warnings/errors
Disable warnings and errors on initial code empty functions/require remove transations stub from spec test
This commit is contained in:
@@ -1,8 +1,11 @@
|
|||||||
|
/* eslint "@typescript-eslint/no-var-requires": 0 */
|
||||||
const Application = require('spectron').Application;
|
const Application = require('spectron').Application;
|
||||||
|
/* eslint "@typescript-eslint/no-var-requires": 0 */
|
||||||
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules.
|
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules.
|
||||||
|
/* eslint "@typescript-eslint/no-var-requires": 0 */
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
export default function setup() {
|
export default function setup(): void {
|
||||||
beforeEach(async function () {
|
beforeEach(async function () {
|
||||||
this.app = new Application({
|
this.app = new Application({
|
||||||
// Your electron path can be any binary
|
// Your electron path can be any binary
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {expect, assert} from 'chai';
|
import {expect} from 'chai';
|
||||||
import {SpectronClient} from 'spectron';
|
import {SpectronClient} from 'spectron';
|
||||||
|
|
||||||
import commonSetup from './common-setup';
|
import commonSetup from './common-setup';
|
||||||
@@ -6,11 +6,13 @@ import commonSetup from './common-setup';
|
|||||||
describe('angular-electron App', function () {
|
describe('angular-electron App', function () {
|
||||||
commonSetup.apply(this);
|
commonSetup.apply(this);
|
||||||
|
|
||||||
|
/* eslint "@typescript-eslint/no-explicit-any": 0 */
|
||||||
let browser: any;
|
let browser: any;
|
||||||
let client: SpectronClient;
|
let client: SpectronClient;
|
||||||
|
|
||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
client = this.app.client;
|
client = this.app.client;
|
||||||
|
/* eslint "@typescript-eslint/no-explicit-any": 0 */
|
||||||
browser = client as any;
|
browser = client as any;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -15,10 +15,5 @@
|
|||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"tsconfigRootDir": "."
|
"tsconfigRootDir": "."
|
||||||
},
|
},
|
||||||
"plugins": ["@typescript-eslint"],
|
"plugins": ["@typescript-eslint"]
|
||||||
"rules": {
|
|
||||||
"no-empty-function": ["warn"],
|
|
||||||
"@typescript-eslint/no-empty-function": ["warn"],
|
|
||||||
"@typescript-eslint/no-var-requires": ["warn"]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
1
main.ts
1
main.ts
@@ -24,6 +24,7 @@ function createWindow(): BrowserWindow {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (serve) {
|
if (serve) {
|
||||||
|
/* eslint "@typescript-eslint/no-var-requires": 0 */
|
||||||
require('electron-reload')(__dirname, {
|
require('electron-reload')(__dirname, {
|
||||||
electron: require(`${__dirname}/node_modules/electron`)
|
electron: require(`${__dirname}/node_modules/electron`)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { TestBed, async } from '@angular/core/testing';
|
import { TestBed, async } from '@angular/core/testing';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
import { ElectronService } from './core/services';
|
import { ElectronService } from './core/services';
|
||||||
|
|
||||||
describe('AppComponent', () => {
|
describe('AppComponent', () => {
|
||||||
@@ -19,7 +18,3 @@ describe('AppComponent', () => {
|
|||||||
expect(app).toBeTruthy();
|
expect(app).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
class TranslateServiceStub {
|
|
||||||
setDefaultLang(lang: string): void {}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -7,9 +7,10 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class HomeComponent implements OnInit {
|
export class HomeComponent implements OnInit {
|
||||||
|
|
||||||
|
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
ngOnInit() {
|
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
|
||||||
}
|
ngOnInit(): void { }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
styleUrls: ['./page-not-found.component.scss']
|
styleUrls: ['./page-not-found.component.scss']
|
||||||
})
|
})
|
||||||
export class PageNotFoundComponent implements OnInit {
|
export class PageNotFoundComponent implements OnInit {
|
||||||
|
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
|
||||||
constructor() {}
|
constructor() {}
|
||||||
|
|
||||||
ngOnInit() {}
|
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
|
||||||
|
ngOnInit(): void {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ import { Directive } from '@angular/core';
|
|||||||
selector: '[webview]'
|
selector: '[webview]'
|
||||||
})
|
})
|
||||||
export class WebviewDirective {
|
export class WebviewDirective {
|
||||||
|
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
|
||||||
constructor() {}
|
constructor() {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
platformBrowserDynamicTesting
|
platformBrowserDynamicTesting
|
||||||
} from '@angular/platform-browser-dynamic/testing';
|
} from '@angular/platform-browser-dynamic/testing';
|
||||||
|
|
||||||
|
/* eslint "@typescript-eslint/no-explicit-any":0 */
|
||||||
declare const require: any;
|
declare const require: any;
|
||||||
|
|
||||||
// First, initialize the Angular testing environment.
|
// First, initialize the Angular testing environment.
|
||||||
|
|||||||
Reference in New Issue
Block a user