Skip to content

Commit 964b57f

Browse files
committed
permissive eslint rules to remove linter warnings
1 parent db6c0e4 commit 964b57f

File tree

9 files changed

+14
-20
lines changed

9 files changed

+14
-20
lines changed

Diff for: e2e/common-setup.ts

-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
/* eslint "@typescript-eslint/no-var-requires": 0 */
21
const Application = require('spectron').Application;
3-
/* eslint "@typescript-eslint/no-var-requires": 0 */
42
const electronPath = require('electron'); // Require Electron from the binaries included in node_modules.
5-
/* eslint "@typescript-eslint/no-var-requires": 0 */
63
const path = require('path');
74

85
export default function setup(): void {

Diff for: e2e/main.spec.ts

-3
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ import commonSetup from './common-setup';
66
describe('angular-electron App', function () {
77
commonSetup.apply(this);
88

9-
/* eslint "@typescript-eslint/no-explicit-any": 0 */
109
let browser: any;
1110
let client: SpectronClient;
1211

1312
beforeEach(function () {
1413
client = this.app.client;
15-
/* eslint "@typescript-eslint/no-explicit-any": 0 */
1614
browser = client as any;
1715
});
1816

@@ -21,7 +19,6 @@ describe('angular-electron App', function () {
2119
expect(text).to.equal('App works !');
2220
});
2321

24-
2522
it('creates initial windows', async function () {
2623
const count = await client.getWindowCount();
2724
expect(count).to.equal(1);

Diff for: eslintrc.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@
1515
"parserOptions": {
1616
"tsconfigRootDir": "."
1717
},
18-
"plugins": ["@typescript-eslint"]
18+
"plugins": ["@typescript-eslint"],
19+
"rules": {
20+
"@typescript-eslint/no-empty-function": 0,
21+
"@typescript-eslint/no-var-requires": 0,
22+
"@typescript-eslint/no-explicit-any": 0
23+
}
1924
}

Diff for: main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ function createWindow(): BrowserWindow {
2424
});
2525

2626
if (serve) {
27-
/* eslint "@typescript-eslint/no-var-requires": 0 */
2827
require('electron-reload')(__dirname, {
2928
electron: require(`${__dirname}/node_modules/electron`)
3029
});

Diff for: package.json

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-electron",
3-
"version": "6.3.1",
3+
"version": "6.4.0",
44
"description": "Angular 8 with Electron (Typescript + SASS + Hot Reload)",
55
"homepage": "https://github.com/maximegris/angular-electron",
66
"author": {
@@ -12,6 +12,8 @@
1212
"angular 8",
1313
"electron",
1414
"typescript",
15+
"eslint",
16+
"spectron",
1517
"sass"
1618
],
1719
"main": "main.js",
@@ -56,22 +58,22 @@
5658
"@types/jasminewd2": "2.0.6",
5759
"@types/mocha": "5.2.7",
5860
"@types/node": "12.6.8",
59-
"@typescript-eslint/eslint-plugin": "^2.7.0",
60-
"@typescript-eslint/parser": "^2.7.0",
61+
"@typescript-eslint/eslint-plugin": "2.8.0",
62+
"@typescript-eslint/parser": "2.8.0",
6163
"chai": "4.2.0",
6264
"codelyzer": "5.1.0",
6365
"conventional-changelog-cli": "2.0.25",
6466
"core-js": "3.1.4",
6567
"electron": "7.1.1",
6668
"electron-builder": "21.2.0",
6769
"electron-reload": "1.5.0",
68-
"eslint": "^6.6.0",
69-
"eslint-plugin-import": "^2.18.2",
70+
"eslint": "6.6.0",
71+
"eslint-plugin-import": "2.18.2",
7072
"jasmine-core": "3.4.0",
7173
"jasmine-spec-reporter": "4.2.1",
7274
"karma": "4.2.0",
7375
"karma-coverage-istanbul-reporter": "2.1.0",
74-
"karma-electron": "^6.3.0",
76+
"karma-electron": "6.3.0",
7577
"karma-jasmine": "2.0.1",
7678
"karma-jasmine-html-reporter": "1.4.2",
7779
"mocha": "6.2.0",

Diff for: src/app/home/home.component.ts

-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ import { Component, OnInit } from '@angular/core';
77
})
88
export class HomeComponent implements OnInit {
99

10-
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
1110
constructor() { }
1211

13-
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
1412
ngOnInit(): void { }
1513

1614
}

Diff for: src/app/shared/components/page-not-found/page-not-found.component.ts

-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import { Component, OnInit } from '@angular/core';
66
styleUrls: ['./page-not-found.component.scss']
77
})
88
export class PageNotFoundComponent implements OnInit {
9-
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
109
constructor() {}
1110

12-
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
1311
ngOnInit(): void {}
1412
}

Diff for: src/app/shared/directives/webview/webview.directive.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ import { Directive } from '@angular/core';
44
selector: 'webview'
55
})
66
export class WebviewDirective {
7-
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
87
constructor() {}
98
}

Diff for: src/test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
/* eslint "@typescript-eslint/no-explicit-any":0 */
1110
declare const require: any;
1211

1312
// First, initialize the Angular testing environment.

0 commit comments

Comments
 (0)