Skip to content

Commit

Permalink
permissive eslint rules to remove linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegris committed Nov 19, 2019
1 parent db6c0e4 commit 964b57f
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 20 deletions.
3 changes: 0 additions & 3 deletions e2e/common-setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/* eslint "@typescript-eslint/no-var-requires": 0 */
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.
/* eslint "@typescript-eslint/no-var-requires": 0 */
const path = require('path');

export default function setup(): void {
Expand Down
3 changes: 0 additions & 3 deletions e2e/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ import commonSetup from './common-setup';
describe('angular-electron App', function () {
commonSetup.apply(this);

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

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

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


it('creates initial windows', async function () {
const count = await client.getWindowCount();
expect(count).to.equal(1);
Expand Down
7 changes: 6 additions & 1 deletion eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@
"parserOptions": {
"tsconfigRootDir": "."
},
"plugins": ["@typescript-eslint"]
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-explicit-any": 0
}
}
1 change: 0 additions & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function createWindow(): BrowserWindow {
});

if (serve) {
/* eslint "@typescript-eslint/no-var-requires": 0 */
require('electron-reload')(__dirname, {
electron: require(`${__dirname}/node_modules/electron`)
});
Expand Down
14 changes: 8 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-electron",
"version": "6.3.1",
"version": "6.4.0",
"description": "Angular 8 with Electron (Typescript + SASS + Hot Reload)",
"homepage": "https://github.com/maximegris/angular-electron",
"author": {
Expand All @@ -12,6 +12,8 @@
"angular 8",
"electron",
"typescript",
"eslint",
"spectron",
"sass"
],
"main": "main.js",
Expand Down Expand Up @@ -56,22 +58,22 @@
"@types/jasminewd2": "2.0.6",
"@types/mocha": "5.2.7",
"@types/node": "12.6.8",
"@typescript-eslint/eslint-plugin": "^2.7.0",
"@typescript-eslint/parser": "^2.7.0",
"@typescript-eslint/eslint-plugin": "2.8.0",
"@typescript-eslint/parser": "2.8.0",
"chai": "4.2.0",
"codelyzer": "5.1.0",
"conventional-changelog-cli": "2.0.25",
"core-js": "3.1.4",
"electron": "7.1.1",
"electron-builder": "21.2.0",
"electron-reload": "1.5.0",
"eslint": "^6.6.0",
"eslint-plugin-import": "^2.18.2",
"eslint": "6.6.0",
"eslint-plugin-import": "2.18.2",
"jasmine-core": "3.4.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.2.0",
"karma-coverage-istanbul-reporter": "2.1.0",
"karma-electron": "^6.3.0",
"karma-electron": "6.3.0",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.4.2",
"mocha": "6.2.0",
Expand Down
2 changes: 0 additions & 2 deletions src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import { Component, OnInit } from '@angular/core';
})
export class HomeComponent implements OnInit {

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

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

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

/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
ngOnInit(): void {}
}
1 change: 0 additions & 1 deletion src/app/shared/directives/webview/webview.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ import { Directive } from '@angular/core';
selector: 'webview'
})
export class WebviewDirective {
/* eslint "no-empty-function":0, "@typescript-eslint/no-empty-function": 0 */
constructor() {}
}
1 change: 0 additions & 1 deletion src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

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

// First, initialize the Angular testing environment.
Expand Down

0 comments on commit 964b57f

Please sign in to comment.