refactor: eslint adjustments

This commit is contained in:
Clark Du 2017-11-19 21:40:30 +08:00 committed by Pooya Parsa
parent 73509c29ba
commit 377416a7ef
2 changed files with 8 additions and 5 deletions

View File

@ -327,7 +327,8 @@ export default class Builder {
options: this.options.loadingIndicator
})
} else {
console.error(`Could not fetch loading indicator: ${this.options.loadingIndicator.name}`) // eslint-disable-line no-console
// eslint-disable-next-line no-console
console.error(`Could not fetch loading indicator: ${this.options.loadingIndicator.name}`)
}
}

View File

@ -313,7 +313,7 @@ export default class Renderer {
const pushAssets = []
let m
while (m = regex.exec(resourceHints)) { // eslint-disable-line no-cond-assign
const [_, rel, href, as] = m // eslint-disable-line no-unused-vars
const [, rel, href, as] = m
if (rel === 'preload') {
pushAssets.push(`<${href}>; rel=${rel}; as=${as}`)
}
@ -554,9 +554,11 @@ export default class Renderer {
try {
jsdom = require('jsdom')
} catch (e) /* istanbul ignore next */ {
console.error('Fail when calling nuxt.renderAndGetWindow(url)') // eslint-disable-line no-console
console.error('jsdom module is not installed') // eslint-disable-line no-console
console.error('Please install jsdom with: npm install --save-dev jsdom') // eslint-disable-line no-console
/* eslint-disable no-console */
console.error('Fail when calling nuxt.renderAndGetWindow(url)')
console.error('jsdom module is not installed')
console.error('Please install jsdom with: npm install --save-dev jsdom')
/* eslint-enable no-console */
throw e
}
}