refactor: add prefer-const to .eslintrc + fix errors (#14880)

This commit is contained in:
Milan Burda 2018-10-02 03:56:31 +02:00 committed by Samuel Attard
parent 07161a8452
commit 3ad3ade828
47 changed files with 239 additions and 238 deletions

View file

@ -62,10 +62,10 @@ const skip = process.platform !== 'linux' ||
}
function unmarshalDBusNotifyHints (dbusHints) {
let o = {}
for (let hint of dbusHints) {
let key = hint[0]
let value = hint[1][1][0]
const o = {}
for (const hint of dbusHints) {
const key = hint[0]
const value = hint[1][1][0]
o[key] = value
}
return o
@ -102,11 +102,11 @@ const skip = process.platform !== 'linux' ||
const calls = await getCalls()
expect(calls).to.be.an('array').of.lengthOf.at.least(1)
let lastCall = calls[calls.length - 1]
let methodName = lastCall[1]
const lastCall = calls[calls.length - 1]
const methodName = lastCall[1]
expect(methodName).to.equal('Notify')
let args = unmarshalDBusNotifyArgs(lastCall[2])
const args = unmarshalDBusNotifyArgs(lastCall[2])
expect(args).to.deep.equal({
app_name: appName,
replaces_id: 0,