docs: alias links in jsdoc @see blocks (#28270)

This commit is contained in:
xjccc 2024-08-06 01:10:23 +08:00 committed by GitHub
parent 9ae094cafb
commit 62cccda86c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 41 additions and 40 deletions

View File

@ -6,7 +6,7 @@ export default defineUntypedSchema({
*
* Any components in the directories configured here can be used throughout your
* pages, layouts (and other components) without needing to explicitly import them.
* @see https://nuxt.com/docs/guide/directory-structure/components
* @see [`components/` directory documentation](https://nuxt.com/docs/guide/directory-structure/components)
* @type {boolean | typeof import('../src/types/components').ComponentsOptions | typeof import('../src/types/components').ComponentsOptions['dirs']}
*/
components: {

View File

@ -18,7 +18,7 @@ export default defineUntypedSchema({
},
/**
* Options for the Vue compiler that will be passed at build time.
* @see [documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
* @see [Vue documentation](https://vuejs.org/api/application.html#app-config-compileroptions)
* @type {typeof import('@vue/compiler-core').CompilerOptions}
*/
compilerOptions: {},
@ -158,7 +158,7 @@ export default defineUntypedSchema({
*
* This can be overridden with `definePageMeta` on an individual page.
* Only JSON-serializable values are allowed.
* @see https://vuejs.org/api/built-in-components.html#transition
* @see [Vue Transition docs](https://vuejs.org/api/built-in-components.html#transition)
* @type {typeof import('../src/types/config').NuxtAppConfig['layoutTransition']}
*/
layoutTransition: false,
@ -168,7 +168,7 @@ export default defineUntypedSchema({
*
* This can be overridden with `definePageMeta` on an individual page.
* Only JSON-serializable values are allowed.
* @see https://vuejs.org/api/built-in-components.html#transition
* @see [Vue Transition docs](https://vuejs.org/api/built-in-components.html#transition)
* @type {typeof import('../src/types/config').NuxtAppConfig['pageTransition']}
*/
pageTransition: false,
@ -180,7 +180,7 @@ export default defineUntypedSchema({
* [enabled in your nuxt.config file](/docs/getting-started/transitions#view-transitions-api-experimental).
*
* This can be overridden with `definePageMeta` on an individual page.
* @see https://nuxt.com/docs/getting-started/transitions#view-transitions-api-experimental
* @see [Nuxt View Transition API docs](https://nuxt.com/docs/getting-started/transitions#view-transitions-api-experimental)
* @type {typeof import('../src/types/config').NuxtAppConfig['viewTransition']}
*/
viewTransition: {
@ -194,7 +194,7 @@ export default defineUntypedSchema({
*
* This can be overridden with `definePageMeta` on an individual page.
* Only JSON-serializable values are allowed.
* @see https://vuejs.org/api/built-in-components.html#keepalive
* @see [Vue KeepAlive](https://vuejs.org/api/built-in-components.html#keepalive)
* @type {typeof import('../src/types/config').NuxtAppConfig['keepalive']}
*/
keepalive: false,
@ -328,7 +328,7 @@ export default defineUntypedSchema({
* @note Plugins are also auto-registered from the `~/plugins` directory
* and these plugins do not need to be listed in `nuxt.config` unless you
* need to customize their order. All plugins are deduplicated by their src path.
* @see https://nuxt.com/docs/guide/directory-structure/plugins
* @see [`plugins/` directory documentation](https://nuxt.com/docs/guide/directory-structure/plugins)
* @example
* ```js
* plugins: [
@ -375,8 +375,7 @@ export default defineUntypedSchema({
/**
* An object that will be passed to `renderSSRHead` to customize the output.
*
* @see https://unhead.unjs.io/setup/ssr/installation#options
* @type {typeof import('@unhead/schema').RenderSSRHeadOptions}
* @see [`unhead` options documentation](https://unhead.unjs.io/setup/ssr/installation#options)
*
* @example
* ```ts
@ -387,7 +386,7 @@ export default defineUntypedSchema({
* }
* })
* ```
*
* @type {typeof import('@unhead/schema').RenderSSRHeadOptions}
*/
renderSSRHeadOptions: {
$resolve: async (val: Record<string, unknown> | undefined, get) => {

View File

@ -66,7 +66,7 @@ export default defineUntypedSchema({
* You can also use a function to conditionally transpile. The function will receive an object ({ isDev, isServer, isClient, isModern, isLegacy }).
* @example
* ```js
transpile: [({ isLegacy }) => isLegacy && 'ky']
* transpile: [({ isLegacy }) => isLegacy && 'ky']
* ```
* @type {Array<string | RegExp | ((ctx: { isClient?: boolean; isServer?: boolean; isDev: boolean }) => string | RegExp | false)>}
*/

View File

@ -14,9 +14,9 @@ export default defineUntypedSchema({
*
* Value should be either a string or array of strings pointing to source directories or config path relative to current config.
*
* You can use `github:`, `gh:` `gitlab:` or `bitbucket:`.
* @see https://github.com/unjs/c12#extending-config-layer-from-remote-sources
* @see https://github.com/unjs/giget
* You can use `github:`, `gh:` `gitlab:` or `bitbucket:`
* @see [`c12` docs on extending config layers](https://github.com/unjs/c12#extending-config-layer-from-remote-sources)
* @see [`giget` documentation](https://github.com/unjs/giget)
* @type {string | [string, typeof import('c12').SourceOptions?] | (string | [string, typeof import('c12').SourceOptions?])[]}
*/
extends: null,

View File

@ -26,7 +26,7 @@ export default defineUntypedSchema({
*
* You can set it to false to use the legacy 'Node' mode, which is the default for TypeScript.
*
* See https://github.com/microsoft/TypeScript/pull/51669
* @see [TypeScript PR implementing `bundler` module resolution](https://github.com/microsoft/TypeScript/pull/51669)
*/
typescriptBundlerResolution: {
async $resolve (val, get) {
@ -247,7 +247,7 @@ export default defineUntypedSchema({
*
* You can also set this to `chokidar` to watch all files in your source directory.
* @see [chokidar](https://github.com/paulmillr/chokidar)
* @see [Parcel watcher](https://github.com/parcel-bundler/watcher)
* @see [@parcel/watcher](https://github.com/parcel-bundler/watcher)
* @type {'chokidar' | 'parcel' | 'chokidar-granular'}
*/
watcher: {
@ -296,7 +296,7 @@ export default defineUntypedSchema({
*
* This only works with static or strings/arrays rather than variables or conditional assignment.
*
* https://github.com/nuxt/nuxt/issues/24770
* @see [Nuxt Issues #24770](https://github.com/nuxt/nuxt/issues/24770)
*/
scanPageMeta: true,
@ -358,7 +358,7 @@ export default defineUntypedSchema({
/**
* Automatically polyfill Node.js imports in the client build using `unenv`.
* @see https://github.com/unjs/unenv
* @see [unenv](https://github.com/unjs/unenv)
*
* **Note:** To make globals like `Buffer` work in the browser, you need to manually inject them.
*

View File

@ -4,7 +4,7 @@ import type { RuntimeConfig } from '../types/config'
export default defineUntypedSchema({
/**
* Configuration for Nitro.
* @see https://nitro.unjs.io/config/
* @see [Nitro configuration docs](https://nitro.unjs.io/config/)
* @type {typeof import('nitro/types')['NitroConfig']}
*/
nitro: {
@ -37,7 +37,7 @@ export default defineUntypedSchema({
/**
* Global route options applied to matching server routes.
* @experimental This is an experimental feature and API may change in the future.
* @see https://nitro.unjs.io/config/#routerules
* @see [Nitro route rules documentation](https://nitro.unjs.io/config/#routerules)
* @type {typeof import('nitro/types')['NitroConfig']['routeRules']}
*/
routeRules: {},
@ -48,12 +48,12 @@ export default defineUntypedSchema({
* Each handler accepts the following options:
*
* - handler: The path to the file defining the handler.
* - route: The route under which the handler is available. This follows the conventions of https://github.com/unjs/radix3.
* - route: The route under which the handler is available. This follows the conventions of [radix3](https://github.com/unjs/radix3.)
* - method: The HTTP method of requests that should be handled.
* - middleware: Specifies whether it is a middleware handler.
* - lazy: Specifies whether to use lazy loading to import the handler.
*
* @see https://nuxt.com/docs/guide/directory-structure/server
* @see [`server/` directory documentation](https://nuxt.com/docs/guide/directory-structure/server)
* @note Files from `server/api`, `server/middleware` and `server/routes` will be automatically registered by Nuxt.
* @example
* ```js
@ -67,7 +67,7 @@ export default defineUntypedSchema({
/**
* Nitro development-only server handlers.
* @see https://nitro.unjs.io/guide/routing
* @see [Nitro server routes documentation](https://nitro.unjs.io/guide/routing)
* @type {typeof import('nitro/types')['NitroDevEventHandler'][]}
*/
devServerHandlers: [],

View File

@ -38,17 +38,19 @@ export default defineUntypedSchema({
/**
* Options for configuring PostCSS plugins.
*
* https://postcss.org/
* @see [PostCSS docs](https://postcss.org/)
* @type {Record<string, unknown> & { autoprefixer?: typeof import('autoprefixer').Options; cssnano?: typeof import('cssnano').Options }}
*/
plugins: {
/**
* https://github.com/postcss/autoprefixer
* Plugin to parse CSS and add vendor prefixes to CSS rules.
*
* @see [`autoprefixer`](https://github.com/postcss/autoprefixer)
*/
autoprefixer: {},
/**
* https://cssnano.github.io/cssnano/docs/config-file/#configuration-options
* @see [`cssnano` configuration options](https://cssnano.github.io/cssnano/docs/config-file/#configuration-options)
*/
cssnano: {
$resolve: async (val, get) => {

View File

@ -7,7 +7,7 @@ export default defineUntypedSchema({
* Nuxt offers additional options to customize the router (see below).
* @note Only JSON serializable options should be passed by Nuxt config.
* For more control, you can use `app/router.options.ts` file.
* @see [documentation](https://router.vuejs.org/api/interfaces/routeroptions.html).
* @see [Vue Router documentation](https://router.vuejs.org/api/interfaces/routeroptions.html).
* @type {typeof import('../src/types/router').RouterConfigSerializable}
*/
options: {

View File

@ -66,7 +66,7 @@ export default defineUntypedSchema({
*
* If set to true, this will type check in development. You can restrict this to build-time type checking by setting it to `build`.
* Requires to install `typescript` and `vue-tsc` as dev dependencies.
* @see https://nuxt.com/docs/guide/concepts/typescript
* @see [Nuxt TypeScript docs](https://nuxt.com/docs/guide/concepts/typescript)
* @type {boolean | 'build'}
*/
typeCheck: false,

View File

@ -8,7 +8,7 @@ export default defineUntypedSchema({
/**
* Configuration that will be passed directly to Vite.
*
* See https://vitejs.dev/config for more information.
* @see [Vite configuration docs](https://vitejs.dev/config) for more information.
* Please note that not all vite options are supported in Nuxt.
* @type {typeof import('../src/types/config').ViteConfig & { $client?: typeof import('../src/types/config').ViteConfig, $server?: typeof import('../src/types/config').ViteConfig }}
*/

View File

@ -96,7 +96,7 @@ export default defineUntypedSchema({
/**
* Customize bundle filenames.
*
* To understand a bit more about the use of manifests, take a look at [this webpack documentation](https://webpack.js.org/guides/code-splitting/).
* To understand a bit more about the use of manifests, take a look at [webpack documentation](https://webpack.js.org/guides/code-splitting/).
* @note Be careful when using non-hashed based filenames in production
* as most browsers will cache the asset and not detect the changes on first load.
*
@ -154,7 +154,7 @@ export default defineUntypedSchema({
},
/**
* See https://github.com/esbuild-kit/esbuild-loader
* @see [esbuild loader](https://github.com/esbuild-kit/esbuild-loader)
* @type {Omit<typeof import('esbuild-loader')['LoaderOptions'], 'loader'>}
*/
esbuild: {
@ -164,7 +164,7 @@ export default defineUntypedSchema({
},
/**
* See: https://github.com/webpack-contrib/file-loader#options
* @see [`file-loader` Options](https://github.com/webpack-contrib/file-loader#options)
* @type {Omit<typeof import('file-loader')['Options'], 'name'>}
* @default
* ```ts
@ -174,7 +174,7 @@ export default defineUntypedSchema({
file: { esModule: false },
/**
* See: https://github.com/webpack-contrib/file-loader#options
* @see [`file-loader` Options](https://github.com/webpack-contrib/file-loader#options)
* @type {Omit<typeof import('file-loader')['Options'], 'name'>}
* @default
* ```ts
@ -184,7 +184,7 @@ export default defineUntypedSchema({
fontUrl: { esModule: false, limit: 1000 },
/**
* See: https://github.com/webpack-contrib/file-loader#options
* @see [`file-loader` Options](https://github.com/webpack-contrib/file-loader#options)
* @type {Omit<typeof import('file-loader')['Options'], 'name'>}
* @default
* ```ts
@ -194,7 +194,7 @@ export default defineUntypedSchema({
imgUrl: { esModule: false, limit: 1000 },
/**
* See: https://pugjs.org/api/reference.html#options
* @see [`pug` options](https://pugjs.org/api/reference.html#options)
* @type {typeof import('pug')['Options']}
*/
pugPlain: {},
@ -235,12 +235,12 @@ export default defineUntypedSchema({
},
/**
* See: https://github.com/webpack-contrib/less-loader#options
* @see [`less-loader` Options](https://github.com/webpack-contrib/less-loader#options)
*/
less: {},
/**
* See: https://github.com/webpack-contrib/sass-loader#options
* @see [`sass-loader` Options](https://github.com/webpack-contrib/sass-loader#options)
* @type {typeof import('sass-loader')['Options']}
* @default
* ```ts
@ -258,13 +258,13 @@ export default defineUntypedSchema({
},
/**
* See: https://github.com/webpack-contrib/sass-loader#options
* @see [`sass-loader` Options](https://github.com/webpack-contrib/sass-loader#options)
* @type {typeof import('sass-loader')['Options']}
*/
scss: {},
/**
* See: https://github.com/webpack-contrib/stylus-loader#options
* @see [`stylus-loader` Options](https://github.com/webpack-contrib/stylus-loader#options)
*/
stylus: {},
@ -322,7 +322,7 @@ export default defineUntypedSchema({
/**
* Customize PostCSS Loader.
* Same options as https://github.com/webpack-contrib/postcss-loader#options
* same options as [`postcss-loader` options](https://github.com/webpack-contrib/postcss-loader#options)
* @type {{ execute?: boolean, postcssOptions: typeof import('postcss').ProcessOptions, sourceMap?: boolean, implementation?: any }}
*/
postcss: {