Skip to content

Commit a9f07e8

Browse files
committed
📝 docs(vuepress): setup vuepress
1 parent f5057e2 commit a9f07e8

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

docs/.vuepress/config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
'use strict'
2+
3+
const { withCategories } = require('../../scripts/lib/rules')
4+
require('../../scripts/update-docs-headers')
5+
require('../../scripts/update-docs-index')
6+
7+
module.exports = {
8+
base: '/eslint-plugin-vue-i18n/',
9+
title: 'eslint-plugin-vue-i18n',
10+
description: 'ESLint plugin for Vue I18n',
11+
serviceWorker: false,
12+
themeConfig: {
13+
repo: 'kazupon/eslint-plugin-vue-i18n',
14+
docsDir: 'docs',
15+
docsBranch: 'master',
16+
editLinks: true,
17+
search: false,
18+
sidebarDepth: 0,
19+
sidebar: {
20+
'/': [
21+
'/',
22+
'/rules/',
23+
...withCategories.map(({ category, rules }) => ({
24+
title: `Rules in ${category}`,
25+
collapsable: false,
26+
children: rules.map(rule => `/rules/${rule.name}`)
27+
}))
28+
]
29+
}
30+
}
31+
}

docs/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Getting Started
2+
3+
## :cd: Installation
4+
5+
Use [npm](https://www.npmjs.com/) or a compatible tool.
6+
7+
```sh
8+
npm install --save-dev eslint eslint-plugin-vue-i18n
9+
```
10+
11+
## :rocket: Usage
12+
13+
Configure your `.eslintrc.*` file.
14+
15+
For example:
16+
17+
```json
18+
{
19+
"extends": [
20+
"eslint:recommended",
21+
"plugin:vue-i18n/recommended"
22+
],
23+
"rules": {
24+
// Optional.
25+
"vue-i18n/no-missing-key": "error"
26+
}
27+
}
28+
```

docs/rules/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)