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

@ -16,17 +16,17 @@ let scopeCallback = null
function checkScope (session, scopeId) {
session.post('Runtime.getProperties', {
'objectId': scopeId,
'ownProperties': false,
'accessorPropertiesOnly': false,
'generatePreview': true
objectId: scopeId,
ownProperties: false,
accessorPropertiesOnly: false,
generatePreview: true
}, scopeCallback)
}
function debuggerPausedCallback (session, notification) {
const params = notification['params']
const callFrame = params['callFrames'][0]
const scopeId = callFrame['scopeChain'][0]['object']['objectId']
const params = notification.params
const callFrame = params.callFrames[0]
const scopeId = callFrame.scopeChain[0].object.objectId
checkScope(session, scopeId)
}
@ -41,11 +41,11 @@ function testSampleDebugSession () {
if (error) failures.push(error)
const i = cur++
let v, actual, expected
for (v of result['result']) {
actual = v['value']['value']
expected = expects[v['name']][i]
for (v of result.result) {
actual = v.value.value
expected = expects[v.name][i]
if (actual !== expected) {
failures.push(`Iteration ${i} variable: ${v['name']} ` +
failures.push(`Iteration ${i} variable: ${v.name} ` +
`expected: ${expected} actual: ${actual}`)
}
}
@ -57,19 +57,19 @@ function testSampleDebugSession () {
let cbAsSecondArgCalled = false
session.post('Debugger.enable', () => { cbAsSecondArgCalled = true })
session.post('Debugger.setBreakpointByUrl', {
'lineNumber': 9,
'url': pathToFileURL(path.resolve(__dirname, __filename)).toString(),
'columnNumber': 0,
'condition': ''
lineNumber: 9,
url: pathToFileURL(path.resolve(__dirname, __filename)).toString(),
columnNumber: 0,
condition: ''
})
debuggedFunction()
scopeCallback = null
session.disconnect()
process.send({
'cmd': 'assert',
'debuggerEnabled': cbAsSecondArgCalled,
'success': (cur === 5) && (failures.length === 0)
cmd: 'assert',
debuggerEnabled: cbAsSecondArgCalled,
success: (cur === 5) && (failures.length === 0)
})
}