chore: fix lint issues

[skip-release]

using `import type` seems a regression of `import/named` rule but generally makes it more readable to prefer using it :)
This commit is contained in:
Pooya Parsa 2021-08-09 18:18:21 +02:00
parent a20f473ea3
commit cb7f079ac4
12 changed files with 22 additions and 14 deletions

View File

@ -3,3 +3,4 @@ node_modules
_templates
schema
**/*.tmpl.*
sw.js

View File

@ -1,4 +1,5 @@
import { getCurrentInstance, onBeforeMount, onUnmounted, Ref, ref, unref, UnwrapRef } from 'vue'
import { getCurrentInstance, onBeforeMount, onUnmounted, ref, unref } from 'vue'
import type { UnwrapRef, Ref } from 'vue'
import { Nuxt, useNuxt } from '@nuxt/app'
import { NuxtComponentPendingPromises } from './component'

View File

@ -1,5 +1,6 @@
import { toRefs } from '@vue/reactivity'
import { ComponentInternalInstance, DefineComponent, defineComponent, getCurrentInstance } from 'vue'
import { defineComponent, getCurrentInstance } from 'vue'
import type { ComponentInternalInstance, DefineComponent } from 'vue'
import { useRoute } from 'vue-router'
import type { LegacyContext } from '../legacy'
import { useNuxt } from '../nuxt'

View File

@ -1,4 +1,5 @@
import { getCurrentInstance, isReactive, reactive, UnwrapRef } from 'vue'
import { getCurrentInstance, isReactive, reactive } from 'vue'
import type { UnwrapRef } from 'vue'
import { useNuxt } from '@nuxt/app'
export function ensureReactive<

View File

@ -1,4 +1,5 @@
import { App, getCurrentInstance } from 'vue'
import { getCurrentInstance } from 'vue'
import type { App } from 'vue'
import Hookable from 'hookable'
import { defineGetter } from './utils'
import { legacyPlugin, LegacyContext } from './legacy'

View File

@ -1,3 +1,4 @@
// eslint-disable-next-line import/default
import Vue from 'vue'
import { $Fetch } from 'ohmyfetch'
import { Nuxt } from '../dist'

View File

@ -1,4 +1,5 @@
import { defineComponent, SetupContext } from 'vue'
import { defineComponent } from 'vue'
import type { SetupContext } from 'vue'
import { useMeta } from './composables'
type Props = Readonly<Record<string, any>>

View File

@ -1,6 +1,7 @@
// import { useMeta as useVueMeta } from 'vue-meta'
import { isFunction } from '@vue/shared'
import { computed, ComputedGetter } from '@vue/reactivity'
import { computed } from '@vue/reactivity'
import type { ComputedGetter } from '@vue/reactivity'
import { useNuxt } from '@nuxt/app'
import type { MetaObject } from '@nuxt/meta'

View File

@ -1,9 +1,9 @@
import { dirname, join, normalize, relative, resolve } from 'upath'
import { InputOptions, OutputOptions } from 'rollup'
import type { InputOptions, OutputOptions } from 'rollup'
import defu from 'defu'
import { terser } from 'rollup-plugin-terser'
import commonjs from '@rollup/plugin-commonjs'
import nodeResolve from '@rollup/plugin-node-resolve'
import { nodeResolve } from '@rollup/plugin-node-resolve'
import alias from '@rollup/plugin-alias'
import json from '@rollup/plugin-json'
import replace from '@rollup/plugin-replace'

View File

@ -1,9 +1,10 @@
// Based on https://github.com/egoist/rollup-plugin-esbuild (MIT)
import { extname, relative } from 'upath'
import { Plugin, PluginContext } from 'rollup'
import type { Plugin, PluginContext } from 'rollup'
import { Loader, TransformResult, transform } from 'esbuild'
import { createFilter, FilterPattern } from '@rollup/pluginutils'
import { createFilter } from '@rollup/pluginutils'
import type { FilterPattern } from '@rollup/pluginutils'
const defaultLoaders: { [ext: string]: Loader } = {
'.ts': 'ts',

View File

@ -1,7 +1,7 @@
// Based on https://github.com/rollup/plugins/blob/master/packages/virtual/src/index.ts
import * as path from 'upath'
import type { Plugin } from 'rollup'
import { Plugin } from 'rollup'
// Based on https://github.com/rollup/plugins/blob/master/packages/virtual/src/index.ts
type VirtualModule = string | { load: () => string | Promise<string> }

View File

@ -1,6 +1,5 @@
import { dirname, join } from 'upath'
import { Plugin } from 'rollup'
import type { Plugin } from 'rollup'
const PREFIX = '\0virtual:'