Skip to content

Commit 5b584a4

Browse files
authored
chore: use vitepress v1 & fix vitepress config (#491)
* chore: fix vitepress config * use vitepress v1
1 parent 69cae06 commit 5b584a4

File tree

5 files changed

+527
-300
lines changed

5 files changed

+527
-300
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ module.exports = {
5959
},
6060
overrides: [
6161
{
62-
files: ['*.ts'],
62+
files: ['*.ts', '*.mts'],
6363
extends: ['plugin:@typescript-eslint/recommended'],
6464
parser: 'vue-eslint-parser',
6565
parserOptions: {

docs/.vitepress/config.mts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { defineConfig } from 'vitepress'
2+
import { getRulesWithCategories } from '../../scripts/lib/rules'
3+
import '../../scripts/update-rule-docs'
4+
import '../../scripts/update-index-docs'
5+
6+
// https://vitepress.dev/reference/site-config
7+
export default async () => {
8+
const rules = await getRulesWithCategories()
9+
return defineConfig({
10+
base: '/',
11+
title: 'eslint-plugin-vue-i18n',
12+
description: 'ESLint plugin for Vue I18n',
13+
head: [['meta', { name: 'theme-color', content: '#3eaf7c' }]],
14+
lastUpdated: true,
15+
themeConfig: {
16+
editLink: {
17+
pattern:
18+
'https://github.com/intlify/eslint-plugin-vue-i18n/edit/master/docs/:path',
19+
text: 'Edit this page on GitHub'
20+
},
21+
nav: [
22+
{
23+
text: 'Support Intlify',
24+
items: [
25+
{
26+
text: 'GitHub Sponsors',
27+
link: 'https://github.com/sponsors/kazupon'
28+
},
29+
{
30+
text: 'Patreon',
31+
link: 'https://www.patreon.com/kazupon'
32+
}
33+
]
34+
},
35+
{
36+
text: 'Release Notes',
37+
link: 'https://github.com/intlify/eslint-plugin-vue-i18n/releases'
38+
}
39+
],
40+
sidebar: [
41+
{
42+
text: 'Introduction',
43+
link: '/intro'
44+
},
45+
{
46+
text: 'Getting Started',
47+
link: '/started'
48+
},
49+
{
50+
text: 'Available Rules',
51+
link: '/rules/'
52+
},
53+
...rules.map(({ category, rules }) => ({
54+
text: `Rules in ${category}`,
55+
collapsed: false,
56+
items: rules.map(rule => ({
57+
text: rule.name,
58+
link: `/rules/${rule.name}`
59+
}))
60+
}))
61+
],
62+
socialLinks: [
63+
{
64+
icon: 'github',
65+
link: 'https://github.com/intlify/eslint-plugin-vue-i18n'
66+
}
67+
]
68+
}
69+
})
70+
}

docs/.vitepress/config.ts

Lines changed: 0 additions & 67 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"path-scurry": "^1.10.1",
116116
"prettier": "^2.8.8",
117117
"typescript": "^5.1.6",
118-
"vitepress": "1.0.0-beta.7",
118+
"vitepress": "1.0.0",
119119
"vue-eslint-editor": "^1.1.0",
120120
"vue-github-button": "^3.1.0"
121121
},

0 commit comments

Comments
 (0)