Skip to content

Commit beb6c94

Browse files
committed
fix(*): many minor issues, type issues
1 parent ed397f1 commit beb6c94

30 files changed

Lines changed: 359 additions & 1007 deletions

File tree

docs/.vitepress/config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ export default defineConfig({
224224
async transformHead(context) {
225225
let head = [...context.head]
226226

227-
const returnedHead = await transformHeadMeta()(head, context)
227+
const returnedHead = await transformHeadMeta()(head, context as never)
228228
if (typeof returnedHead !== 'undefined')
229229
head = returnedHead
230230

@@ -262,6 +262,6 @@ export default defineConfig({
262262
},
263263
})
264264

265-
await newBuilder(siteConfig)
265+
await newBuilder(siteConfig as never)
266266
},
267267
})

docs/.vitepress/theme/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import type { Plugin } from 'vue'
2-
31
import TwoslashFloatingVue from '@shikijs/vitepress-twoslash/client'
42

53
import { NuLazyTeleportRiveCanvas } from '@nolebase/ui-rive-canvas'
@@ -41,12 +39,14 @@ export default defineThemeUnconfig({
4139
},
4240
},
4341
enhanceApp: ({ app }) => {
42+
const usePlugin = app.use as unknown as (plugin: unknown, ...options: unknown[]) => void
43+
4444
app.component('IntegrationCard', IntegrationCard)
4545
app.component('HomeContent', HomeContent)
4646
app.component('ThumbhashPreview', ThumbhashPreview)
4747

48-
app.use(TwoslashFloatingVue as Plugin)
49-
app.use(MotionPlugin as Plugin)
48+
usePlugin(TwoslashFloatingVue)
49+
usePlugin(MotionPlugin)
5050
},
5151
pluginPresets: [
5252
NolebasePluginPreset({

docs/.vitepress/twoslashConfig.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export const compilerOptions = {
77
target: 99,
88
module: 99,
99
moduleResolution: 100,
10+
ignoreDeprecations: '6.0',
1011
paths: {
1112
'@nolebase/ui': [
1213
'../packages/ui/src/index.ts',

docs/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
{
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
4+
"types": [
5+
"vite/client",
6+
"node"
7+
],
48
"noImplicitAny": false,
59
"declaration": true,
610
"noEmit": false
711
},
812
"include": [
9-
"./.vitepress/**/*",
13+
".vitepress/**/*.ts",
14+
".vitepress/**/*.vue",
1015
"**/*.d.ts"
1116
]
1217
}

eslint.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default antfu({
3636
'side-effect',
3737
'style',
3838
],
39-
newlinesBetween: 'always',
39+
newlinesBetween: 1,
4040
},
4141
],
4242
},

packages/markdown-it-bi-directional-links/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ export const BiDirectionalLinks: (options?: BiDirectionalLinksOptions) => Plugin
318318
// If user would like to see the warning, they can enable debug mode
319319
// by setting `DEBUG=@nolebase/markdown-it-bi-directional-links` in the environment variable
320320
// or by setting `import.meta.env.DEBUG = '@nolebase/markdown-it-bi-directional-links'` in the script.
321-
if (!biDirectionalLinkPatternWithStart.exec(link.input)) {
321+
if (!biDirectionalLinkPatternWithStart.test(link.input)) {
322322
logIncorrectMatchedMarkupWarning(link.input, src, state.env.path, debugOn)
323323
return false
324324
}

packages/ui-asciinema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"peerDependencies": {
7474
"asciinema-player": "^3.15.0",
7575
"vitepress": "catalog:vitepress-all",
76-
"vue": "catalog:vue-3"
76+
"vue": ">=3"
7777
},
7878
"dependencies": {
7979
"less": "catalog:"

packages/ui-rive-canvas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"peerDependencies": {
7474
"@rive-app/canvas": "^2.35.0",
7575
"vitepress": "catalog:vitepress-all",
76-
"vue": "catalog:vue-3"
76+
"vue": ">=3"
7777
},
7878
"dependencies": {
7979
"less": "catalog:"

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
},
7171
"peerDependencies": {
7272
"vitepress": "catalog:vitepress-all",
73-
"vue": "catalog:vue-3"
73+
"vue": ">=3"
7474
},
7575
"dependencies": {
7676
"@iconify-json/octicon": "catalog:",

packages/unconfig-vitepress/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"./yaml.d.ts",
66
"node",
77
"vite/client",
8-
"@nolebase/vitepress-plugin-git-changelog/types/virtual.d.ts",
9-
"@nolebase/vitepress-plugin-page-properties/client/virtual.d.ts"
8+
"../vitepress-plugin-git-changelog/src/types/virtual.d.ts",
9+
"../vitepress-plugin-page-properties/src/client/virtual.d.ts"
1010
],
1111
"noImplicitAny": false,
1212
"declaration": true,

0 commit comments

Comments
 (0)