refactor: remove unused variables (#3576)

This commit is contained in:
Alexander Lichter 2018-07-25 10:00:21 +02:00 committed by Clark Du
parent 7365702bff
commit 65d318d475
4 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@ export default class Builder {
get plugins() {
return _.uniqBy(
this.options.plugins.map((p, i) => {
this.options.plugins.map(p => {
if (typeof p === 'string') p = { src: p }
const pluginBaseName = path.basename(p.src, path.extname(p.src)).replace(
/[^a-zA-Z?\d\s:]/g,

View File

@ -47,7 +47,7 @@ export default async function nuxtMiddleware(req, res, next) {
const { shouldPush } = this.options.render.http2
const { publicPath } = this.resources.clientManifest
preloadFiles.forEach(({ file, asType, fileWithoutQuery, extension }) => {
preloadFiles.forEach(({ file, asType, fileWithoutQuery }) => {
// By default, we only preload scripts or css
/* istanbul ignore if */
if (!shouldPush && asType !== 'script' && asType !== 'style') {

View File

@ -139,7 +139,7 @@ export default class ModuleContainer {
options = {}
}
return new Promise((resolve, reject) => {
return new Promise(resolve => {
// Call module with `this` context and pass options
const result = handler.call(this, options)

View File

@ -2,7 +2,7 @@ import consola from 'consola'
export default {
hooks(hook) {
hook('build:done', builder => {
hook('build:done', () => {
consola.success('Compiled successfully')
})
hook('listen', (server, { port, host }) => {