Browse Source

fix(lints): Manually fix some trivial lints

renovate/lint-staged-8.x
Ben Woosley 7 years ago
parent
commit
acbf786c0a
No known key found for this signature in database GPG Key ID: 6EE5F3785F78B345
  1. 2
      app/components/Form/PayForm.js
  2. 12
      app/menu.js
  3. 4
      internals/scripts/CheckNodeEnv.js
  4. 13
      test/e2e/e2e.spec.js
  5. 4
      webpack.config.renderer.dev.js

2
app/components/Form/PayForm.js

@ -55,7 +55,7 @@ class PayForm extends Component {
<input
type='number'
min='0'
ref={input => this.amountInput = input}
ref={(input) => { this.amountInput = input }}
size=''
style={
isLn ?

12
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 = {

4
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)
}
}

13
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

4
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')
}

Loading…
Cancel
Save