mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
style: lint
This commit is contained in:
parent
38e72f86c2
commit
c1188eebd5
@ -8,6 +8,7 @@ import hash from 'hash-sum'
|
||||
import pify from 'pify'
|
||||
import upath from 'upath'
|
||||
import semver from 'semver'
|
||||
import type { RouteLocationRaw } from 'vue-router'
|
||||
|
||||
import debounce from 'lodash/debounce'
|
||||
import omit from 'lodash/omit'
|
||||
@ -36,7 +37,6 @@ import {
|
||||
import Ignore from './ignore'
|
||||
import BuildContext from './context/build'
|
||||
import TemplateContext from './context/template'
|
||||
import { RouteLocationRaw } from 'vue-router'
|
||||
|
||||
const glob = pify(Glob)
|
||||
export default class Builder {
|
||||
|
@ -17,7 +17,7 @@ export default class TemplateContext {
|
||||
nuxtOptions: options,
|
||||
features: options.features,
|
||||
extensions: options.extensions
|
||||
.map(ext => ext.replace(/^\./, ''))
|
||||
.map((ext: string) => ext.replace(/^\./, ''))
|
||||
.join('|'),
|
||||
messages: options.messages,
|
||||
splitChunks: options.build.splitChunks,
|
||||
|
@ -17,7 +17,7 @@ export default {
|
||||
alias: 'a',
|
||||
type: 'boolean',
|
||||
description: 'Launch webpack-bundle-analyzer to optimize your bundles',
|
||||
prepare (cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
prepare (_cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
// Analyze option
|
||||
options.build = options.build || {}
|
||||
if (argv.analyze && typeof options.build.analyze !== 'object') {
|
||||
@ -29,7 +29,7 @@ export default {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Enable Vue devtools',
|
||||
prepare (cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
prepare (_cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
options.vue = options.vue || {}
|
||||
options.vue.config = options.vue.config || {}
|
||||
if (argv.devtools) {
|
||||
@ -46,7 +46,7 @@ export default {
|
||||
alias: 'q',
|
||||
type: 'boolean',
|
||||
description: 'Disable output except for errors',
|
||||
prepare (cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
prepare (_cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
// Silence output when using --quiet
|
||||
options.build = options.build || {}
|
||||
if (argv.quiet) {
|
||||
@ -58,7 +58,7 @@ export default {
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
description: 'Bundle all server dependencies (useful for nuxt-start)',
|
||||
prepare (cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
prepare (_cmd: NuxtCommand, options, argv: ParsedArgs) {
|
||||
if (argv.standalone) {
|
||||
options.build.standalone = true
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ export default {
|
||||
return nuxt
|
||||
},
|
||||
|
||||
async _listenDev (cmd: NuxtCommand, argv) {
|
||||
async _listenDev (cmd: NuxtCommand, argv: ParsedArgs) {
|
||||
const config = await cmd.getNuxtConfig({ dev: true, _build: true })
|
||||
const nuxt = await cmd.getNuxt(config)
|
||||
|
||||
@ -78,7 +78,7 @@ export default {
|
||||
return nuxt
|
||||
},
|
||||
|
||||
async _buildDev (cmd: NuxtCommand, argv: ParsedArgs, nuxt: Nuxt) {
|
||||
async _buildDev (cmd: NuxtCommand, _argv: ParsedArgs, nuxt: Nuxt) {
|
||||
// Create builder instance
|
||||
const builder = await cmd.getBuilder(nuxt)
|
||||
|
||||
@ -97,7 +97,7 @@ export default {
|
||||
return nuxt
|
||||
},
|
||||
|
||||
logChanged ({ event, path }) {
|
||||
logChanged ({ event, path }: { event: keyof typeof eventsMapping, path: string }) {
|
||||
const { icon, color, action } = eventsMapping[event] || eventsMapping.change
|
||||
|
||||
consola.log({
|
||||
|
Loading…
Reference in New Issue
Block a user