mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
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:
parent
a20f473ea3
commit
cb7f079ac4
@ -3,3 +3,4 @@ node_modules
|
|||||||
_templates
|
_templates
|
||||||
schema
|
schema
|
||||||
**/*.tmpl.*
|
**/*.tmpl.*
|
||||||
|
sw.js
|
||||||
|
@ -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 { Nuxt, useNuxt } from '@nuxt/app'
|
||||||
|
|
||||||
import { NuxtComponentPendingPromises } from './component'
|
import { NuxtComponentPendingPromises } from './component'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { toRefs } from '@vue/reactivity'
|
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 { useRoute } from 'vue-router'
|
||||||
import type { LegacyContext } from '../legacy'
|
import type { LegacyContext } from '../legacy'
|
||||||
import { useNuxt } from '../nuxt'
|
import { useNuxt } from '../nuxt'
|
||||||
|
@ -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'
|
import { useNuxt } from '@nuxt/app'
|
||||||
|
|
||||||
export function ensureReactive<
|
export function ensureReactive<
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { App, getCurrentInstance } from 'vue'
|
import { getCurrentInstance } from 'vue'
|
||||||
|
import type { App } from 'vue'
|
||||||
import Hookable from 'hookable'
|
import Hookable from 'hookable'
|
||||||
import { defineGetter } from './utils'
|
import { defineGetter } from './utils'
|
||||||
import { legacyPlugin, LegacyContext } from './legacy'
|
import { legacyPlugin, LegacyContext } from './legacy'
|
||||||
|
1
packages/app/types/shims.d.ts
vendored
1
packages/app/types/shims.d.ts
vendored
@ -1,3 +1,4 @@
|
|||||||
|
// eslint-disable-next-line import/default
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { $Fetch } from 'ohmyfetch'
|
import { $Fetch } from 'ohmyfetch'
|
||||||
import { Nuxt } from '../dist'
|
import { Nuxt } from '../dist'
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { defineComponent, SetupContext } from 'vue'
|
import { defineComponent } from 'vue'
|
||||||
|
import type { SetupContext } from 'vue'
|
||||||
import { useMeta } from './composables'
|
import { useMeta } from './composables'
|
||||||
|
|
||||||
type Props = Readonly<Record<string, any>>
|
type Props = Readonly<Record<string, any>>
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// import { useMeta as useVueMeta } from 'vue-meta'
|
// import { useMeta as useVueMeta } from 'vue-meta'
|
||||||
import { isFunction } from '@vue/shared'
|
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 { useNuxt } from '@nuxt/app'
|
||||||
import type { MetaObject } from '@nuxt/meta'
|
import type { MetaObject } from '@nuxt/meta'
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { dirname, join, normalize, relative, resolve } from 'upath'
|
import { dirname, join, normalize, relative, resolve } from 'upath'
|
||||||
import { InputOptions, OutputOptions } from 'rollup'
|
import type { InputOptions, OutputOptions } from 'rollup'
|
||||||
import defu from 'defu'
|
import defu from 'defu'
|
||||||
import { terser } from 'rollup-plugin-terser'
|
import { terser } from 'rollup-plugin-terser'
|
||||||
import commonjs from '@rollup/plugin-commonjs'
|
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 alias from '@rollup/plugin-alias'
|
||||||
import json from '@rollup/plugin-json'
|
import json from '@rollup/plugin-json'
|
||||||
import replace from '@rollup/plugin-replace'
|
import replace from '@rollup/plugin-replace'
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
// Based on https://github.com/egoist/rollup-plugin-esbuild (MIT)
|
// Based on https://github.com/egoist/rollup-plugin-esbuild (MIT)
|
||||||
|
|
||||||
import { extname, relative } from 'upath'
|
import { extname, relative } from 'upath'
|
||||||
import { Plugin, PluginContext } from 'rollup'
|
import type { Plugin, PluginContext } from 'rollup'
|
||||||
import { Loader, TransformResult, transform } from 'esbuild'
|
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 } = {
|
const defaultLoaders: { [ext: string]: Loader } = {
|
||||||
'.ts': 'ts',
|
'.ts': 'ts',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Based on https://github.com/rollup/plugins/blob/master/packages/virtual/src/index.ts
|
|
||||||
import * as path from 'upath'
|
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> }
|
type VirtualModule = string | { load: () => string | Promise<string> }
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { dirname, join } from 'upath'
|
import { dirname, join } from 'upath'
|
||||||
|
import type { Plugin } from 'rollup'
|
||||||
import { Plugin } from 'rollup'
|
|
||||||
|
|
||||||
const PREFIX = '\0virtual:'
|
const PREFIX = '\0virtual:'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user