build: update eslint + eslint plugins (#22777)

* build: run eslint --fix

* chore: manually fix all hasOwnProperty errors

* chore: manually fix all void 0 vs undefined errors

* chore: manually fix all async-in-promise errors

* chore: manually fix lexical declaration in case block
This commit is contained in:
Samuel Attard 2020-03-20 08:12:18 -07:00 committed by GitHub
parent 42f138282f
commit b87b501161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 280 additions and 280 deletions

View file

@ -241,7 +241,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
const { id } = await customSession.loadExtension(path.join(fixtures, 'extensions', 'lazy-background-page'))
const w = new BrowserWindow({ show: false, webPreferences: { session: customSession } })
await w.loadURL(`chrome-extension://${id}/page-get-background.html`)
const receivedMessage = await w.webContents.executeJavaScript(`window.completionPromise`)
const receivedMessage = await w.webContents.executeJavaScript('window.completionPromise')
expect(receivedMessage).to.deep.equal({ some: 'message' })
})
@ -250,7 +250,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
const { id } = await customSession.loadExtension(path.join(fixtures, 'extensions', 'lazy-background-page'))
const w = new BrowserWindow({ show: false, webPreferences: { session: customSession } })
await w.loadURL(`chrome-extension://${id}/page-get-background.html`)
const receivedMessage = await w.webContents.executeJavaScript(`window.completionPromise`)
const receivedMessage = await w.webContents.executeJavaScript('window.completionPromise')
expect(receivedMessage).to.deep.equal({ some: 'message' })
})
@ -259,7 +259,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
const { id } = await customSession.loadExtension(path.join(fixtures, 'extensions', 'lazy-background-page'))
const w = new BrowserWindow({ show: false, webPreferences: { session: customSession } })
await w.loadURL(`chrome-extension://${id}/page-runtime-get-background.html`)
const receivedMessage = await w.webContents.executeJavaScript(`window.completionPromise`)
const receivedMessage = await w.webContents.executeJavaScript('window.completionPromise')
expect(receivedMessage).to.deep.equal({ some: 'message' })
})
})
@ -407,9 +407,9 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
const contentScript = path.resolve(fixtures, 'extensions/content-script')
// Computed style values
const COLOR_RED = `rgb(255, 0, 0)`
const COLOR_BLUE = `rgb(0, 0, 255)`
const COLOR_TRANSPARENT = `rgba(0, 0, 0, 0)`
const COLOR_RED = 'rgb(255, 0, 0)'
const COLOR_BLUE = 'rgb(0, 0, 255)'
const COLOR_TRANSPARENT = 'rgba(0, 0, 0, 0)'
before(() => {
BrowserWindow.addExtension(contentScript)
@ -485,7 +485,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
const { id } = await session.defaultSession.loadExtension(path.join(fixtures, 'extensions', 'ui-page'))
const w = new BrowserWindow({ show: false })
await w.loadURL(`chrome-extension://${id}/bare-page.html`)
const textContent = await w.webContents.executeJavaScript(`document.body.textContent`)
const textContent = await w.webContents.executeJavaScript('document.body.textContent')
expect(textContent).to.equal('ui page loaded ok\n')
})
@ -493,7 +493,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
const { id } = await session.defaultSession.loadExtension(path.join(fixtures, 'extensions', 'ui-page'))
const w = new BrowserWindow({ show: false })
await w.loadURL(`chrome-extension://${id}/page-script-load.html`)
const textContent = await w.webContents.executeJavaScript(`document.body.textContent`)
const textContent = await w.webContents.executeJavaScript('document.body.textContent')
expect(textContent).to.equal('script loaded ok\n')
})
})