Skip to content

Commit 989cc9e

Browse files
committed
style: eslint auto fix
1 parent e98ae5c commit 989cc9e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+71
-70
lines changed

packages/@vuepress/bundler-vite/src/build/resolveViteConfig.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { App } from '@vuepress/core'
2-
import { mergeConfig, InlineConfig } from 'vite'
2+
import { mergeConfig } from 'vite'
3+
import type { InlineConfig } from 'vite'
34
import { createPlugin } from '../plugin'
45
import type { ViteBundlerOptions } from '../types'
56

packages/@vuepress/bundler-vite/src/plugin/createWorkaroundPlugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin, ViteDevServer, DepOptimizationMetadata } from 'vite'
1+
import type { DepOptimizationMetadata, Plugin, ViteDevServer } from 'vite'
22

33
/**
44
* Vite will inject version hash into file queries, which does not work

packages/@vuepress/bundler-vite/src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Options as VuePluginOptions } from '@vitejs/plugin-vue'
1+
import type { Options as VuePluginOptions } from '@vitejs/plugin-vue'
22
import type { InlineConfig } from 'vite'
33

44
/**

packages/@vuepress/bundler-webpack/src/build/createBuild.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import * as webpack from 'webpack'
55
import type { WebpackBundlerOptions } from '../types'
66
import { resolveWebpackConfig } from '../utils'
77
import {
8-
createClientConfig,
98
clientManifestFilename,
9+
createClientConfig,
1010
} from './createClientConfig'
1111
import { createServerConfig } from './createServerConfig'
1212
import { renderPage } from './renderPage'

packages/@vuepress/bundler-webpack/src/build/createClientConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { App } from '@vuepress/core'
22
import { fs } from '@vuepress/utils'
3-
import * as Config from 'webpack-chain'
3+
import type * as Config from 'webpack-chain'
44
import { createClientBaseConfig } from '../config'
55
import type { WebpackBundlerOptions } from '../types'
66
import { createClientPlugin } from './ssr'

packages/@vuepress/bundler-webpack/src/build/createServerConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { App } from '@vuepress/core'
2-
import * as Config from 'webpack-chain'
2+
import type * as Config from 'webpack-chain'
33
import { createBaseConfig } from '../config'
44
import type { WebpackBundlerOptions } from '../types'
55

packages/@vuepress/bundler-webpack/src/build/renderPage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { renderToString } from '@vue/server-renderer'
22
import type { SSRContext } from '@vue/server-renderer'
3-
import type { Page, App } from '@vuepress/core'
3+
import type { App, Page } from '@vuepress/core'
44
import type { VuepressSSRContext } from '@vuepress/shared'
55
import { fs, renderHead } from '@vuepress/utils'
66
import type { App as VueApp } from 'vue'

packages/@vuepress/bundler-webpack/src/build/ssr/createClientPlugin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { fs } from '@vuepress/utils'
22
import type { WebpackPluginInstance } from 'webpack'
3-
import type { StatsToJsonOutput, FnModules } from '../../types.webpack'
3+
import type { FnModules, StatsToJsonOutput } from '../../types.webpack'
44
import { isCSS, isJS } from './utils'
55

66
export interface ClientManifest {

packages/@vuepress/bundler-webpack/src/config/createClientBaseConfig.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { App } from '@vuepress/core'
2-
import * as Config from 'webpack-chain'
1+
import type { App } from '@vuepress/core'
2+
import type * as Config from 'webpack-chain'
33
import type { WebpackBundlerOptions } from '../types'
44
import { createBaseConfig } from './createBaseConfig'
55

packages/@vuepress/bundler-webpack/src/config/handleModuleStyles.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { App } from '@vuepress/core'
22
import type * as Config from 'webpack-chain'
33
import type {
4-
WebpackBundlerOptions,
4+
LessLoaderOptions,
55
LoaderOptions,
66
SassLoaderOptions,
7-
LessLoaderOptions,
87
StylusLoaderOptions,
8+
WebpackBundlerOptions,
99
} from '../types'
1010

1111
type StyleRule = Config.Rule<Config.Rule<Config.Module>>

packages/@vuepress/bundler-webpack/src/config/handleModuleVue.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { App } from '@vuepress/core'
22
import { VueLoaderPlugin } from 'vue-loader'
33
import type { VueLoaderOptions } from 'vue-loader'
4-
import * as Config from 'webpack-chain'
4+
import type * as Config from 'webpack-chain'
55
import type { WebpackBundlerOptions } from '../types'
66

77
/**

packages/@vuepress/bundler-webpack/src/dev/createDevConfig.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { App } from '@vuepress/core'
1+
import type { App } from '@vuepress/core'
22
import { HotModuleReplacementPlugin } from 'webpack'
3-
import * as Config from 'webpack-chain'
3+
import type * as Config from 'webpack-chain'
44
import { createClientBaseConfig } from '../config'
55
import type { WebpackBundlerOptions } from '../types'
66

packages/@vuepress/bundler-webpack/src/dev/createDevServerConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { sep } from 'path'
2-
import { App } from '@vuepress/core'
2+
import type { App } from '@vuepress/core'
33
import { path } from '@vuepress/utils'
44
import type { WebpackOptionsNormalized } from 'webpack'
55
import type { WebpackBundlerOptions } from '../types'

packages/@vuepress/client/src/app.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ import { removeEndingSlash } from '@vuepress/shared'
77
import { createApp, createSSRApp, h } from 'vue'
88
import type { App } from 'vue'
99
import {
10+
createMemoryHistory,
1011
createRouter,
1112
createWebHistory,
12-
createMemoryHistory,
1313
RouterView,
1414
START_LOCATION,
1515
} from 'vue-router'
1616
import type { Router } from 'vue-router'
1717
import {
18-
siteData,
1918
pageData,
2019
resolvePageData,
2120
setupUpdateHead,
21+
siteData,
2222
} from './composables'
2323
import { provideGlobalComputed } from './provideGlobalComputed'
2424
import { registerGlobalComponents } from './registerGlobalComponents'

packages/@vuepress/client/src/components/ClientOnly.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ref, onMounted, defineComponent } from 'vue'
1+
import { defineComponent, onMounted, ref } from 'vue'
22

33
export const ClientOnly = defineComponent({
44
setup(_, ctx) {

packages/@vuepress/client/src/composables/pageData.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PageData } from '@vuepress/shared'
2-
import { ref, readonly } from 'vue'
2+
import { readonly, ref } from 'vue'
33
import type { Ref } from 'vue'
44
import { pagesData } from './pagesData'
55

packages/@vuepress/client/src/provideGlobalComputed.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import { computed } from 'vue'
22
import type { App } from 'vue'
33
import type { Router } from 'vue-router'
44
import {
5-
siteData,
65
pageData,
76
pageFrontmatterSymbol,
8-
resolvePageFrontmatter,
97
pageHeadSymbol,
10-
resolvePageHead,
118
pageHeadTitleSymbol,
12-
resolvePageHeadTitle,
139
pageLangSymbol,
10+
resolvePageFrontmatter,
11+
resolvePageHead,
12+
resolvePageHeadTitle,
1413
resolvePageLang,
15-
routeLocaleSymbol,
1614
resolveRouteLocale,
17-
siteLocaleDataSymbol,
1815
resolveSiteLocaleData,
16+
routeLocaleSymbol,
17+
siteData,
18+
siteLocaleDataSymbol,
1919
} from './composables'
2020
import type {
2121
PageData,

packages/@vuepress/core/__tests__/app/createAppPages.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createBaseApp, createAppPages } from '@vuepress/core'
1+
import { createAppPages, createBaseApp } from '@vuepress/core'
22
import { path } from '@vuepress/utils'
33

44
describe('core > app > createAppPages', () => {

packages/@vuepress/core/__tests__/app/normalizePluginConfig.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { normalizePluginConfig } from '@vuepress/core'
22
import type {
33
PluginConfig,
44
PluginConfigNormalized,
5-
PluginObject,
65
PluginFunction,
6+
PluginObject,
77
} from '@vuepress/core'
88

99
const pluginObject: PluginObject = {

packages/@vuepress/core/__tests__/page/resolvePageFileContent.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { resolvePageFileContent } from '@vuepress/core'
2-
import { path, fs } from '@vuepress/utils'
2+
import { fs, path } from '@vuepress/utils'
33

44
describe('core > page > resolvePageFileContent', () => {
55
it('should resolve file content correctly from file path', async () => {

packages/@vuepress/core/src/app/createBuildApp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { BuildApp, AppConfig } from '../types'
1+
import type { AppConfig, BuildApp } from '../types'
22
import { createBaseApp } from './createBaseApp'
33
import { resolveBundler } from './resolveBundler'
44

packages/@vuepress/core/src/app/createDevApp.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DevApp, AppConfig } from '../types'
1+
import type { AppConfig, DevApp } from '../types'
22
import { createBaseApp } from './createBaseApp'
33
import { resolveBundler } from './resolveBundler'
44

packages/@vuepress/core/src/app/normalizePluginConfig.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { isArray } from '@vuepress/shared'
22
import type {
3-
PluginOptions,
43
PluginConfig,
54
PluginConfigNormalized,
5+
PluginOptions,
66
} from '../types'
77

88
export const normalizePluginConfig = <T extends PluginOptions>(

packages/@vuepress/core/src/app/resolveTheme.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { normalizePackageName } from '@vuepress/shared'
22
import { chalk, logger, path, requireResolve } from '@vuepress/utils'
3-
import type { App, ThemeObject, ThemeConfig } from '../types'
3+
import type { App, ThemeConfig, ThemeObject } from '../types'
44
import { resolvePlugin } from './resolvePlugin'
55

66
/**

packages/@vuepress/core/src/app/resolveThemeLayouts.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isPlainObject } from '@vuepress/shared'
2-
import { chalk, fs, path, logger } from '@vuepress/utils'
2+
import { chalk, fs, logger, path } from '@vuepress/utils'
33
import type { ThemeObject } from '../types'
44

55
/**

packages/@vuepress/core/src/page/resolvePageDate.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { formatDateString, isString } from '@vuepress/shared'
22
import { path } from '@vuepress/utils'
3-
import { PageFrontmatter } from '../types'
3+
import type { PageFrontmatter } from '../types'
44

55
const FILENAME_DATE_RE = /^(\d{4})-(\d{1,2})(?:-(\d{1,2}))?-(.*)$/
66
const DIRNAME_DATE_RE = /(\d{4})\/(\d{1,2})(?:\/(\d{1,2}))?(\/|$)/

packages/@vuepress/core/src/pluginApi/createHookQueue.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { chalk, debug, logger } from '@vuepress/utils'
2-
import type { HookQueue, HookItem, HooksName, HooksResult } from '../types'
2+
import type { HookItem, HookQueue, HooksName, HooksResult } from '../types'
33

44
const log = debug('vuepress:core/plugin-api')
55

packages/@vuepress/core/src/types/app/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Markdown } from '@vuepress/markdown'
22
import type { SiteData } from '@vuepress/shared'
3-
import type { BundlerDev, BundlerBuild } from '../bundler'
3+
import type { BundlerBuild, BundlerDev } from '../bundler'
44
import type { Page } from '../page'
55
import type { Plugin, PluginOptions } from '../plugin'
66
import type { PluginApi } from '../pluginApi'

packages/@vuepress/core/src/types/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type {
2+
HeadAttrsConfig,
23
HeadConfig,
34
HeadTag,
45
HeadTagEmpty,
56
HeadTagNonEmpty,
6-
HeadAttrsConfig,
77
LocaleConfig,
88
LocaleData,
99
PageData,

packages/@vuepress/markdown/__tests__/plugins/tocPlugin.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { anchorPlugin, tocPlugin, slugify } from '@vuepress/markdown'
1+
import { anchorPlugin, slugify, tocPlugin } from '@vuepress/markdown'
22
import * as MarkdownIt from 'markdown-it'
33

44
const fixtures = {

packages/@vuepress/markdown/src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { PageFrontmatter, PageHeader } from '@vuepress/shared'
2-
import * as MarkdownIt from 'markdown-it'
2+
import type * as MarkdownIt from 'markdown-it'
33
import type {
44
AnchorPluginOptions,
55
AssetsPluginOptions,

packages/@vuepress/markdown/src/utils/resolveHeadersFromTokens.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { isFunction } from '@vuepress/shared'
2-
import * as Token from 'markdown-it/lib/token'
2+
import type * as Token from 'markdown-it/lib/token'
33
import type { MarkdownHeader } from '../types'
44
import { resolveTitleFromToken } from './resolveTitleFromToken'
55

packages/@vuepress/markdown/src/utils/resolveTitleFromToken.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { htmlEscape } from '@vuepress/shared'
2-
import * as Token from 'markdown-it/lib/token'
2+
import type * as Token from 'markdown-it/lib/token'
33

44
/**
55
* Resolve header title from markdown-it token

packages/@vuepress/plugin-active-header-links/src/client/composables/useActiveHeaderLinks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { usePageData } from '@vuepress/client'
22
import { debounce } from 'ts-debounce'
3-
import { onMounted, onBeforeUnmount, watch } from 'vue'
3+
import { onBeforeUnmount, onMounted, watch } from 'vue'
44
import { useRouter } from 'vue-router'
55
import type { Router } from 'vue-router'
66

packages/@vuepress/plugin-debug/src/client/components/Debug.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { usePageData, useSiteData, useSiteLocaleData } from '@vuepress/client'
2-
import { h, defineComponent, ref, toDisplayString, toRefs } from 'vue'
2+
import { defineComponent, h, ref, toDisplayString, toRefs } from 'vue'
33
import { useRoute } from 'vue-router'
44
import './Debug.css'
55

packages/@vuepress/plugin-search/src/client/composables/useHotKeys.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { onMounted, onBeforeUnmount } from 'vue'
1+
import { onBeforeUnmount, onMounted } from 'vue'
22
import type { Ref } from 'vue'
33

44
export const useHotKeys = ({

packages/@vuepress/plugin-search/src/client/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { SearchIndexItem, SearchIndex } from '../shared'
1+
import type { SearchIndex, SearchIndexItem } from '../shared'
22

33
export type { SearchIndexItem, SearchIndex }
44
export * from './components/SearchBox'

packages/@vuepress/plugin-theme-data/src/client/clientAppEnhance.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { defineClientAppEnhance, routeLocaleSymbol } from '@vuepress/client'
22
import { computed } from 'vue'
33
import {
4-
useThemeData,
54
resolveThemeLocaleData,
65
themeLocaleDataSymbol,
6+
useThemeData,
77
} from './composables'
88

99
export default defineClientAppEnhance(({ app }) => {

packages/@vuepress/theme-default/src/client/components/NavbarLinks.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { isLinkHttp, isString } from '@vuepress/shared'
1414
import { computed } from 'vue'
1515
import type { ComputedRef } from 'vue'
1616
import { useRouter } from 'vue-router'
17-
import type { NavbarItem, NavbarGroup, ResolvedNavbarItem } from '../../shared'
17+
import type { NavbarGroup, NavbarItem, ResolvedNavbarItem } from '../../shared'
1818
import { useNavLink, useThemeLocaleData } from '../composables'
1919
import { resolveRepoType } from '../utils'
2020
import DropdownLink from './DropdownLink.vue'

packages/@vuepress/theme-default/src/client/components/PageMeta.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ import {
3535
import { computed } from 'vue'
3636
import type { ComputedRef } from 'vue'
3737
import type {
38-
DefaultThemePageData,
3938
DefaultThemeNormalPageFrontmatter,
39+
DefaultThemePageData,
4040
NavLink as NavLinkType,
4141
} from '../../shared'
4242
import { useThemeLocaleData } from '../composables'

packages/@vuepress/theme-default/src/client/composables/useSidebarItems.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import { useRoute } from 'vue-router'
1212
import type {
1313
DefaultThemeData,
1414
DefaultThemeNormalPageFrontmatter,
15+
ResolvedSidebarItem,
1516
SidebarConfigArray,
1617
SidebarConfigObject,
1718
SidebarItem,
18-
ResolvedSidebarItem,
1919
} from '../../shared'
2020
import { useNavLink, useThemeLocaleData } from '.'
2121

packages/@vuepress/theme-default/src/client/index.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import type {
2-
NavItem,
2+
DefaultThemeData,
3+
DefaultThemeHomePageFrontmatter,
4+
DefaultThemeLocaleData,
5+
DefaultThemeLocaleOptions,
6+
DefaultThemeNormalPageFrontmatter,
7+
DefaultThemePageData,
8+
DefaultThemePageFrontmatter,
9+
DefaultThemePluginsOptions,
10+
NavbarConfig,
11+
NavbarGroup,
12+
NavbarItem,
313
NavGroup,
14+
NavItem,
415
NavLink,
5-
NavbarItem,
6-
NavbarGroup,
7-
NavbarConfig,
816
ResolvedNavbarItem,
9-
SidebarItem,
17+
ResolvedSidebarItem,
18+
SidebarConfig,
1019
SidebarConfigArray,
1120
SidebarConfigObject,
12-
SidebarConfig,
13-
ResolvedSidebarItem,
14-
DefaultThemePluginsOptions,
15-
DefaultThemeLocaleOptions,
16-
DefaultThemeData,
17-
DefaultThemeLocaleData,
18-
DefaultThemePageData,
19-
DefaultThemePageFrontmatter,
20-
DefaultThemeHomePageFrontmatter,
21-
DefaultThemeNormalPageFrontmatter,
21+
SidebarItem,
2222
} from '../shared'
2323

2424
export type {

0 commit comments

Comments
 (0)