Skip to content

Commit 6e37bd4

Browse files
committed
fix(electron): fix broken TSLint config, update index.ts to match correctly applied rules
1 parent d656e48 commit 6e37bd4

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

electron-wrapper/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
"eslint-plugin-react": "^7",
9999
"standard-version": "^4.3.0",
100100
"tslint": "^5.9.1",
101+
"tslint-config-prettier": "^1.13.0",
101102
"typescript": "^2.8.1"
102103
}
103104
}

electron-wrapper/src/index.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as isDev from 'electron-is-dev';
99
import { argv } from 'yargs';
1010

1111
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
12-
if (require('electron-squirrel-startup')) {
12+
if (require('electron-squirrel-startup')) { // tslint:disable-line no-var-requires
1313
app.quit();
1414
}
1515

@@ -37,7 +37,7 @@ const urls = {
3737
};
3838

3939
if (argv.dev) {
40-
require('electron-debug')({
40+
require('electron-debug')({ // tslint:disable-line no-var-requires
4141
showDevTools: 'undocked',
4242
enabled: true,
4343
});
@@ -73,6 +73,7 @@ const createWindow = async () => {
7373
});
7474

7575
// initialize global shortcuts
76+
/* tslint:disable no-unused-expression */
7677
globalShortcut.register('CmdOrCtrl+Shift+Plus', () => {
7778
mainWindow && mainWindow.webContents.send('accelerator-plus');
7879
});
@@ -82,6 +83,7 @@ const createWindow = async () => {
8283
globalShortcut.register('CmdOrCtrl+Shift+R', () => {
8384
mainWindow && mainWindow.webContents.send('accelerator-reset');
8485
});
86+
/* tslint:enable */
8587
};
8688

8789
// This method will be called when Electron has finished
@@ -121,7 +123,9 @@ autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => {
121123
};
122124

123125
dialog.showMessageBox(dialogOpts, (response) => {
124-
if (response === 0) autoUpdater.quitAndInstall();
126+
if (response === 0) {
127+
autoUpdater.quitAndInstall();
128+
}
125129
});
126130
});
127131

electron-wrapper/tslint.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": ["tslint:recommended", "tslint-react", "tslint-config-prettier"],
2+
"extends": ["tslint:recommended", "tslint-config-prettier"],
33
"linterOptions": {
44
"exclude": [
55
"config/**/*.js",

electron-wrapper/yarn.lock

+4
Original file line numberDiff line numberDiff line change
@@ -5976,6 +5976,10 @@ tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0:
59765976
version "1.9.0"
59775977
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
59785978

5979+
tslint-config-prettier@^1.13.0:
5980+
version "1.13.0"
5981+
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.13.0.tgz#189e821931ad89e0364e4e292d5c44a14e90ecd6"
5982+
59795983
tslint@^5.9.1:
59805984
version "5.9.1"
59815985
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"

0 commit comments

Comments
 (0)