From acbf786c0af0b52275a098a416d3dcfb6090cea3 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Fri, 12 Jan 2018 16:55:10 -0800 Subject: [PATCH] fix(lints): Manually fix some trivial lints --- app/components/Form/PayForm.js | 2 +- app/menu.js | 12 ++++++++++-- internals/scripts/CheckNodeEnv.js | 4 +--- test/e2e/e2e.spec.js | 13 +------------ webpack.config.renderer.dev.js | 4 +--- 5 files changed, 14 insertions(+), 21 deletions(-) diff --git a/app/components/Form/PayForm.js b/app/components/Form/PayForm.js index c8e06cca..83ca3733 100644 --- a/app/components/Form/PayForm.js +++ b/app/components/Form/PayForm.js @@ -55,7 +55,7 @@ class PayForm extends Component { this.amountInput = input} + ref={(input) => { this.amountInput = input }} size='' style={ isLn ? diff --git a/app/menu.js b/app/menu.js index e7f6339a..0b31d242 100644 --- a/app/menu.js +++ b/app/menu.js @@ -74,14 +74,22 @@ export default class MenuBuilder { label: 'View', submenu: [ { label: 'Reload', accelerator: 'Command+R', click: () => { this.mainWindow.webContents.reload() } }, - { label: 'Toggle Full Screen', accelerator: 'Ctrl+Command+F', click: () => { this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen()) } }, + { + label: 'Toggle Full Screen', + accelerator: 'Ctrl+Command+F', + click: () => { this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen()) } + }, { label: 'Toggle Developer Tools', accelerator: 'Alt+Command+I', click: () => { this.mainWindow.toggleDevTools() } } ] } const subMenuViewProd = { label: 'View', submenu: [ - { label: 'Toggle Full Screen', accelerator: 'Ctrl+Command+F', click: () => { this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen()) } } + { + label: 'Toggle Full Screen', + accelerator: 'Ctrl+Command+F', + click: () => { this.mainWindow.setFullScreen(!this.mainWindow.isFullScreen()) } + } ] } const subMenuWindow = { diff --git a/internals/scripts/CheckNodeEnv.js b/internals/scripts/CheckNodeEnv.js index 7a6d6d50..62bda0c8 100644 --- a/internals/scripts/CheckNodeEnv.js +++ b/internals/scripts/CheckNodeEnv.js @@ -7,9 +7,7 @@ export default function CheckNodeEnv(expectedEnv: string) { } if (process.env.NODE_ENV !== expectedEnv) { - console.log(chalk.whiteBright.bgRed.bold( - `"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config` - )) + console.log(chalk.whiteBright.bgRed.bold(`"process.env.NODE_ENV" must be "${expectedEnv}" to use this webpack config`)) process.exit(2) } } diff --git a/test/e2e/e2e.spec.js b/test/e2e/e2e.spec.js index e67bc094..b0cf0be0 100644 --- a/test/e2e/e2e.spec.js +++ b/test/e2e/e2e.spec.js @@ -16,18 +16,7 @@ describe('main window', function spec() { return this.app.start() }) - afterAll(() => { - if (this.app && this.app.isRunning()) { - return this.app.stop() - } - }) - - const findCounter = () => this.app.client.element('[data-tid="counter"]') - - const findButtons = async () => { - const { value } = await this.app.client.elements('[data-tclass="btn"]') - return value.map(btn => btn.ELEMENT) - } + afterAll(() => this.app && this.app.isRunning() && this.app.stop()) it('should open window', async () => { const { client, browserWindow } = this.app diff --git a/webpack.config.renderer.dev.js b/webpack.config.renderer.dev.js index 7549d793..a8ab8717 100644 --- a/webpack.config.renderer.dev.js +++ b/webpack.config.renderer.dev.js @@ -28,9 +28,7 @@ const manifest = path.resolve(dll, 'renderer.json') * Warn if the DLL is not built */ if (!(fs.existsSync(dll) && fs.existsSync(manifest))) { - console.log(chalk.black.bgYellow.bold( - 'The DLL files are missing. Sit back while we build them for you with "npm run build-dll"' - )) + console.log(chalk.black.bgYellow.bold('The DLL files are missing. Sit back while we build them for you with "npm run build-dll"')) execSync('npm run build-dll') }