style: lint fix

This commit is contained in:
pengzhanbo 2025-02-09 01:01:29 +08:00
parent 3bacc633f1
commit f8e6246841
28 changed files with 60 additions and 30 deletions

View File

@ -1,8 +1,9 @@
import type { UserConfig } from 'vuepress'
import fs from 'node:fs'
import path from 'node:path'
import { viteBundler } from '@vuepress/bundler-vite'
import { addViteOptimizeDepsInclude, addViteSsrExternal } from '@vuepress/helper'
import { defineUserConfig, type UserConfig } from 'vuepress'
import { defineUserConfig } from 'vuepress'
import { theme } from './theme.js'
const pnpmWorkspace = fs.readFileSync(path.resolve(__dirname, '../../pnpm-workspace.yaml'), 'utf-8')

View File

@ -1,5 +1,6 @@
import type { Ref } from 'vue'
import { onClickOutside, useDebounceFn, useEventListener, useLocalStorage } from '@vueuse/core'
import { computed, onMounted, readonly, type Ref, ref, watch } from 'vue'
import { computed, onMounted, readonly, ref, watch } from 'vue'
interface Feature {
label: string

View File

@ -1,5 +1,6 @@
import type { InjectionKey, Ref } from 'vue'
import { useSessionStorage, useStyleTag } from '@vueuse/core'
import { inject, type InjectionKey, provide, type Ref, watch } from 'vue'
import { inject, provide, watch } from 'vue'
export interface ThemeColor {
name: string

View File

@ -1,4 +1,5 @@
import { defineConfig, type Options } from 'tsup'
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'
import { argv } from '../../scripts/tsup-args.js'
const clientExternal: (string | RegExp)[] = [

View File

@ -1,4 +1,5 @@
import { defineConfig, type Options } from 'tsup'
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'
import { argv } from '../../scripts/tsup-args.js'
const clientExternal: (string | RegExp)[] = [

View File

@ -1,6 +1,7 @@
<script setup lang="ts">
import type { DemoConfig } from '../composables/demo.js'
import { useTemplateRef } from 'vue'
import { type DemoConfig, useExpand, useFence, useNormalDemo, useResources } from '../composables/demo.js'
import { useExpand, useFence, useNormalDemo, useResources } from '../composables/demo.js'
import '../styles/demo.css'

View File

@ -1,4 +1,5 @@
import { type MaybeRef, onMounted, onUnmounted, ref, toValue, watch } from 'vue'
import type { MaybeRef } from 'vue'
import { onMounted, onUnmounted, ref, toValue, watch } from 'vue'
const mimeTypes = {
'audio/flac': ['flac', 'fla'],

View File

@ -1,4 +1,5 @@
import { onMounted, type Ref, ref } from 'vue'
import type { Ref } from 'vue'
import { onMounted, ref } from 'vue'
import { http } from '../utils/http.js'
import { sleep } from '../utils/sleep.js'
import { rustExecute } from './rustRepl.js'

View File

@ -1,7 +1,8 @@
import type { FSWatcher } from 'chokidar'
import type { App } from 'vuepress'
import fs from 'node:fs'
import path from 'node:path'
import { type FSWatcher, watch } from 'chokidar'
import { watch } from 'chokidar'
import { compileCode, parseEmbedCode } from './normal.js'
import { readFileSync } from './supports/file.js'

View File

@ -1,4 +1,5 @@
import { defineConfig, type Options } from 'tsup'
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'
import { argv } from '../../scripts/tsup-args.js'
const config = [

View File

@ -1,4 +1,6 @@
<script setup lang="ts">
import type { SearchResult } from 'minisearch'
import type { Ref } from 'vue'
import type { SearchBoxLocales, SearchOptions } from '../../shared/index.js'
import {
computedAsync,
@ -10,14 +12,14 @@ import {
} from '@vueuse/core'
import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
import Mark from 'mark.js/src/vanilla.js'
import MiniSearch, { type SearchResult } from 'minisearch'
import MiniSearch from 'minisearch'
import {
computed,
markRaw,
nextTick,
onBeforeUnmount,
onMounted,
type Ref,
ref,
shallowRef,
toRef,

View File

@ -1,4 +1,5 @@
import { defineConfig, type Options } from 'tsup'
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'
import { argv } from '../../scripts/tsup-args.js'
const sharedExternal: (string | RegExp)[] = [

View File

@ -1,4 +1,5 @@
import { defineConfig, type Options } from 'tsup'
import type { Options } from 'tsup'
import { defineConfig } from 'tsup'
import { argv } from '../../scripts/tsup-args.js'
export default defineConfig(() => {

View File

@ -1,5 +1,6 @@
import type { BlogCategory } from './blog-category.js'
import { computed } from 'vue'
import { type BlogCategory, useBlogCategory } from './blog-category.js'
import { useBlogCategory } from './blog-category.js'
import { useLocalePostList } from './blog-data.js'
import { useTags } from './blog-tags.js'
import { useData } from './data.js'

View File

@ -1,6 +1,7 @@
import type { Ref } from 'vue'
import type { PlumeThemeBlogPostItem } from '../../shared/index.js'
import { useMediaQuery } from '@vueuse/core'
import { computed, type Ref } from 'vue'
import { computed } from 'vue'
import { useLocalePostList } from './blog-data.js'
import { useData } from './data.js'
import { useRouteQuery } from './route-query.js'

View File

@ -1,5 +1,6 @@
import type { ComputedRef } from 'vue'
import type { CopyrightFrontmatter, CopyrightLicense, CopyrightOptions, GitContributor, KnownCopyrightLicense } from '../../shared/index.js'
import { computed, type ComputedRef } from 'vue'
import { computed } from 'vue'
import { useRoute, useRouteLocale } from 'vuepress/client'
import { useContributors } from './contributors.js'
import { useData } from './data.js'

View File

@ -1,3 +1,4 @@
import type { Ref } from 'vue'
import type {
PageDataRef,
PageFrontmatterRef,
@ -13,7 +14,7 @@ import type {
PlumeThemePostFrontmatter,
} from '../../shared/index.js'
import type { ThemeLocaleDataRef } from './theme-data.js'
import { computed, type Ref } from 'vue'
import { computed } from 'vue'
import {
usePageData,
usePageFrontmatter,

View File

@ -1,10 +1,11 @@
import type { InjectionKey, Ref } from 'vue'
import type { EncryptDataRule } from './encrypt-data.js'
import { hasOwn, useSessionStorage } from '@vueuse/core'
import { compare, genSaltSync } from 'bcrypt-ts/browser'
import { computed, inject, provide } from 'vue'
import { useRoute } from 'vuepress/client'
import { useData } from './data.js'
import { type EncryptDataRule, useEncryptData } from './encrypt-data.js'
import { useEncryptData } from './encrypt-data.js'
export interface Encrypt {
hasPageEncrypt: Ref<boolean>

View File

@ -1,5 +1,6 @@
import type { MaybeRefOrGetter } from 'vue'
import { isLinkExternal } from '@vuepress/helper/client'
import { computed, type MaybeRefOrGetter, toValue } from 'vue'
import { computed, toValue } from 'vue'
import { resolveRouteFullPath, useRoute } from 'vuepress/client'
import { useData } from './data.js'

View File

@ -1,5 +1,6 @@
import type { Ref } from 'vue'
import { articleTagColors } from '@internal/articleTagColors'
import { type Ref, ref } from 'vue'
import { ref } from 'vue'
export type TagColors = Record<string, string>

View File

@ -1,8 +1,9 @@
import type { App, ComputedRef, InjectionKey, Ref } from 'vue'
import type { ClientData, RouteLocale } from 'vuepress/client'
import type { PlumeThemeData } from '../../shared/index.js'
import { themeData as themeDataRaw } from '@internal/themePlumeData'
import { computed, inject, ref } from 'vue'
import { type ClientData, clientDataSymbol, type RouteLocale } from 'vuepress/client'
import { clientDataSymbol } from 'vuepress/client'
declare const __VUE_HMR_RUNTIME__: Record<string, any>

View File

@ -1,3 +1,4 @@
import type { App } from 'vue'
import VPBadge from '@theme/global/VPBadge.vue'
import VPCard from '@theme/global/VPCard.vue'
import VPCardGrid from '@theme/global/VPCardGrid.vue'
@ -8,7 +9,7 @@ import VPHomeBox from '@theme/Home/VPHomeBox.vue'
import VPButton from '@theme/VPButton.vue'
import VPIcon from '@theme/VPIcon.vue'
import { hasGlobalComponent } from '@vuepress/helper/client'
import { type App, h, resolveComponent } from 'vue'
import { h, resolveComponent } from 'vue'
export function globalComponents(app: App) {
app.component('Badge', VPBadge)

View File

@ -1,5 +1,6 @@
import type { TemplateRendererContext } from 'vuepress/utils'
import type { PlumeThemeLocaleOptions } from '../../shared/index.js'
import { templateRenderer, type TemplateRendererContext } from 'vuepress/utils'
import { templateRenderer } from 'vuepress/utils'
import { getThemePackage } from '../utils/index.js'
export function templateBuildRenderer(

View File

@ -1,3 +1,5 @@
import type { SeoPluginOptions } from '@vuepress/plugin-seo'
import type { SitemapPluginOptions } from '@vuepress/plugin-sitemap'
import type { App, PluginConfig } from 'vuepress/core'
import type { PlumeThemeLocaleOptions, PlumeThemePluginOptions } from '../../shared/index.js'
import { contentUpdatePlugin } from '@vuepress-plume/plugin-content-update'
@ -16,8 +18,8 @@ import { markdownMathPlugin } from '@vuepress/plugin-markdown-math'
import { nprogressPlugin } from '@vuepress/plugin-nprogress'
import { photoSwipePlugin } from '@vuepress/plugin-photo-swipe'
import { readingTimePlugin } from '@vuepress/plugin-reading-time'
import { seoPlugin, type SeoPluginOptions } from '@vuepress/plugin-seo'
import { sitemapPlugin, type SitemapPluginOptions } from '@vuepress/plugin-sitemap'
import { seoPlugin } from '@vuepress/plugin-seo'
import { sitemapPlugin } from '@vuepress/plugin-sitemap'
import { watermarkPlugin } from '@vuepress/plugin-watermark'
import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance'
import { markdownPowerPlugin } from 'vuepress-plugin-md-power'

View File

@ -1,9 +1,10 @@
import type { App } from 'vuepress'
import type { Page } from 'vuepress/core'
import type { EncryptOptions, PlumeThemePageData } from '../../shared/index.js'
import type { FsCache } from '../utils/index.js'
import { isNumber, isString, random, toArray } from '@pengzhanbo/utils'
import { genSaltSync, hashSync } from 'bcrypt-ts'
import { createFsCache, type FsCache, hash, perfLog, perfMark, resolveContent, writeTemp } from '../utils/index.js'
import { createFsCache, hash, perfLog, perfMark, resolveContent, writeTemp } from '../utils/index.js'
export type EncryptConfig = readonly [
boolean, // global

View File

@ -1,11 +1,12 @@
import type { App, Page } from 'vuepress'
import type { NavItem, PlumeThemeHomeConfig, PlumeThemeLocaleOptions, Sidebar } from '../../shared/index.js'
import type { FsCache } from '../utils/index.js'
import { getIconContentCSS, getIconData } from '@iconify/utils'
import { isArray, uniq } from '@pengzhanbo/utils'
import { entries, isLinkAbsolute, isLinkHttp, isPlainObject } from '@vuepress/helper'
import { isPackageExists } from 'local-pkg'
import { fs } from 'vuepress/utils'
import { createFsCache, type FsCache, interopDefault, logger, nanoid, perfLog, perfMark, resolveContent, writeTemp } from '../utils/index.js'
import { createFsCache, interopDefault, logger, nanoid, perfLog, perfMark, resolveContent, writeTemp } from '../utils/index.js'
interface IconData {
className: string

View File

@ -1,8 +1,9 @@
import type { FSWatcher } from 'chokidar'
import type { App } from 'vuepress'
import type { PlumeThemeData, PlumeThemeLocaleOptions, PlumeThemePluginOptions } from '../../shared/index.js'
import fs from 'node:fs/promises'
import process from 'node:process'
import { type FSWatcher, watch } from 'chokidar'
import { watch } from 'chokidar'
import { resolveImageSize } from 'vuepress-plugin-md-power'
import { hash } from 'vuepress/utils'
import { resolveThemeData } from '../config/resolveThemeData.js'

View File

@ -1,7 +1,8 @@
import type { Options } from 'tsup'
import fs from 'node:fs'
import path from 'node:path'
import process from 'node:process'
import { defineConfig, type Options } from 'tsup'
import { defineConfig } from 'tsup'
import { argv } from '../scripts/tsup-args.js'
const sharedExternal: (string | RegExp)[] = [