Skip to content

Commit 9883d65

Browse files
committed
style: fix lint and format errors
1 parent f455c0c commit 9883d65

File tree

16 files changed

+19
-60
lines changed

16 files changed

+19
-60
lines changed

docs/.vuepress/components/NpmBadge.vue

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
33
4-
const props = withDefaults(
5-
defineProps<{
6-
/** package name */
7-
package: string
8-
/** dist-tag to use */
9-
distTag?: string
10-
}>(),
11-
{
12-
distTag: 'next',
13-
},
14-
)
4+
const { package: pkg, distTag = 'next' } = defineProps<{
5+
/** package name */
6+
package: string
7+
/** dist-tag to use */
8+
distTag?: string
9+
}>()
1510
16-
const badgeLink = computed(
17-
() => `https://www.npmjs.com/package/${props.package}`,
18-
)
11+
const badgeLink = computed(() => `https://www.npmjs.com/package/${pkg}`)
1912
const badgeLabel = computed(() => {
20-
if (props.distTag) {
21-
return `${props.package}@${props.distTag}`
13+
if (distTag) {
14+
return `${pkg}@${distTag}`
2215
}
23-
return props.package
16+
return pkg
2417
})
2518
const badgeImg = computed(
2619
() =>
27-
`https://badgen.net/npm/v/${props.package}/${
28-
props.distTag
20+
`https://badgen.net/npm/v/${pkg}/${
21+
distTag
2922
}?label=${encodeURIComponent(badgeLabel.value)}`,
3023
)
3124
</script>

docs/guide/deployment.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,10 @@ See [Edgio Documentation > Framework Guides > VuePress](https://docs.edg.io/guid
205205
## Netlify
206206

207207
1. On [Netlify](https://netlify.com), set up a new project from GitHub with the following settings:
208-
209208
- **Build Command:** `pnpm docs:build`
210209
- **Publish directory:** `docs/.vuepress/dist`
211210

212211
2. Set [Environment variables](https://docs.netlify.com/configure-builds/environment-variables) to choose node version:
213-
214212
- `NODE_VERSION`: 20
215213

216214
3. Hit the deploy button.
@@ -224,7 +222,6 @@ You should disable Pretty URLs in the "Site Configuration" → "Build & Deploy"
224222
## Vercel
225223

226224
1. Go to [Vercel](https://vercel.com), set up a new project from GitHub with the following settings:
227-
228225
- **FRAMEWORK PRESET:** `Other`
229226
- **BUILD COMMAND:** `pnpm docs:build`
230227
- **OUTPUT DIRECTORY:** `docs/.vuepress/dist`

docs/reference/components.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## AutoLink
44

55
- Props:
6-
76
- config
87
- Type: `AutoLinkConfig`
98
- Required: `true`
@@ -93,7 +92,6 @@ interface AutoLinkConfig {
9392
This component and its children will only be rendered in client-side. That means, it will not be rendered to HTML during build (SSR).
9493

9594
If a component is trying to access Browser / DOM APIs directly in `setup()`, an error will occur during build because those APIs are unavailable in Node.js environment. In such case, you could do either:
96-
9795
- Modify the component to only access Browser / DOM APIs in `onBeforeMount()` or `onMounted()` hook.
9896
- Wrap the component with `<ClientOnly>`.
9997

@@ -104,7 +102,6 @@ Since Vue 3.5, if you only want to avoid hydration mismatch, you can try the new
104102
## Content
105103

106104
- Props:
107-
108105
- path
109106
- Type: `string`
110107
- Required: `false`
@@ -129,7 +126,6 @@ Since Vue 3.5, if you only want to avoid hydration mismatch, you can try the new
129126
## RouteLink
130127

131128
- Props:
132-
133129
- to
134130
- Type: `string`
135131
- Required: `true`

docs/reference/config.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ Rendered as:
124124
Specify locales for i18n support.
125125

126126
Acceptable fields:
127-
128127
- [lang](#lang)
129128
- [title](#title)
130129
- [description](#description)
@@ -160,7 +159,6 @@ Rendered as:
160159
Set the bundler of your site.
161160

162161
If this option is not set, the default bundler will be used:
163-
164162
- With `vuepress` or `vuepress-vite`, the default bundler is vite.
165163
- With `vuepress-webpack`, the default bundler is webpack.
166164

docs/reference/frontmatter.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ layout: CustomLayout
147147
| `:raw` | Raw route path |
148148

149149
The `:year`, `:month` and `:day` patterns are resolved according to the following priority:
150-
151150
- The `date` frontmatter.
152151
- The filename that matches the date pattern `yyyy-MM-dd-foobar.md` or `yyyy-MM-foobar.md`.
153152
- The dirname that matches the date pattern `yyyy/MM/dd/foobar.md` or `yyyy/MM/foobar.md`.

docs/reference/node-api.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ const dev = async () => {
181181
### dir
182182

183183
- Utils:
184-
185184
- `dir.cache()`: resolve to cache directory
186185
- `dir.temp()`: resolve to temp directory
187186
- `dir.source()`: resolve to source directory
@@ -395,7 +394,6 @@ Hello, world.
395394
Language of the page.
396395

397396
- Example:
398-
399397
- `'en-US'`
400398
- `'zh-CN'`
401399

@@ -481,7 +479,6 @@ interface PageData {
481479
Date of the page, in 'yyyy-MM-dd' format.
482480

483481
- Example:
484-
485482
- `'0000-00-00'`
486483
- `'2021-08-16`'
487484

@@ -545,7 +542,6 @@ interface MarkdownLink {
545542
It would be `null` if the page does not come from a Markdown source file.
546543

547544
- Example:
548-
549545
- `'/'`
550546
- `'/foo.html'`
551547

@@ -564,7 +560,6 @@ interface MarkdownLink {
564560
It is inferred from the relative file path of the Markdown source file and the key of `locales` option in user config.
565561

566562
- Example:
567-
568563
- `'/'`
569564
- `'/en/'`
570565
- `'/zh/'`

docs/reference/plugin-api.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ The following hooks will be processed in dev / build:
4545
It will be used for identifying plugins to avoid using a same plugin multiple times, so make sure to use a unique plugin name.
4646

4747
It should follow the naming convention:
48-
4948
- Non-scoped: `vuepress-plugin-foo`
5049
- Scoped: `@org/vuepress-plugin-foo`
5150

docs/reference/theme-api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ A VuePress theme also works as a plugin, so Theme API can accept all the options
1313
Name of the theme.
1414

1515
It should follow the naming convention, and ensure consistency with the package name when publishing to NPM:
16-
1716
- Non-scoped: `vuepress-theme-foo`
1817
- Scoped: `@org/vuepress-theme-foo`
1918

@@ -34,7 +33,6 @@ A VuePress theme also works as a plugin, so Theme API can accept all the options
3433
The theme to inherit.
3534

3635
All of the Theme API of the parent theme will be inherited, but the child theme will not override the parent theme directly. Theme specific options will override according to following rules:
37-
3836
- [plugins](#plugins): When a same plugin is used in both child and parent theme, if the plugin does not support to be used multiple times, only the one used in the child theme will take effect.
3937
- [templateBuild](#templatebuild) / [templateDev](#templatedev): Child theme templates will override parent theme templates.
4038

docs/zh/guide/deployment.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,10 @@ heroku login
205205
## Netlify
206206

207207
1. 前往 [Netlify](https://netlify.com) ,从 GitHub 创建一个新项目,并进行如下配置:
208-
209208
- **Build Command:** `pnpm docs:build`
210209
- **Publish directory:** `docs/.vuepress/dist`
211210

212211
2. 设置 [Environment variables](https://docs.netlify.com/configure-builds/environment-variables) 来选择 Node 版本:
213-
214212
- `NODE_VERSION`: 20
215213

216214
3. 点击 deploy 按钮。
@@ -224,7 +222,6 @@ heroku login
224222
## Vercel
225223

226224
1. 前往 [Vercel](https://vercel.com) ,从 GitHub 创建一个新项目,并进行如下配置:
227-
228225
- **FRAMEWORK PRESET:** `Other`
229226
- **BUILD COMMAND:** `pnpm docs:build`
230227
- **OUTPUT DIRECTORY:** `docs/.vuepress/dist`

docs/zh/reference/components.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## AutoLink
44

55
- Props:
6-
76
- config
87
- 类型:`AutoLinkConfig`
98
- 是否必须:`true`
@@ -93,7 +92,6 @@ interface AutoLinkConfig {
9392
该组件和它的子元素只会在客户端被渲染。也就是说,它不会在构建 (SSR) 过程中被渲染到 HTML 内。
9493

9594
如果一个组件在 `setup()` 中直接使用 浏览器 / DOM API ,它会导致构建过程报错,因为这些 API 在 Node.js 的环境中是无法使用的。在这种情况下,你可以选择一种方式:
96-
9795
- 修改这个组件,只在 `onBeforeMount()``onMounted()` Hook 中使用 浏览器 / DOM API 。
9896
- 使用 `<ClientOnly>` 包裹这个组件。
9997

@@ -104,7 +102,6 @@ interface AutoLinkConfig {
104102
## Content
105103

106104
- Props:
107-
108105
- path
109106
- 类型: `string`
110107
- 是否必须: `false`
@@ -129,7 +126,6 @@ interface AutoLinkConfig {
129126
## RouteLink
130127

131128
- Props:
132-
133129
- to
134130
- 类型: `string`
135131
- 是否必须: `true`

0 commit comments

Comments
 (0)