Skip to content

Commit 948a872

Browse files
committed
Update to v7 documentation.
1 parent 5663572 commit 948a872

File tree

3 files changed

+86
-2
lines changed

3 files changed

+86
-2
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111

1212
See [the official website](https://eslint.vuejs.org).
1313

14+
> :exclamation: Attention - this is documentation for version `7.x` :exclamation:
15+
>
16+
> This branch contains `eslint-plugin-vue@next` which is a pre-released `7.0`, but it's not the default version that you get with `npm install eslint-plugin-vue`. In order to install this you need to specify either `"eslint-plugin-vue": "next"` in `package.json` or do `npm install eslint-plugin-vue@next`.
17+
>
18+
> Please try it and report any issues that you might have encountered.
19+
>
20+
> If you want to check previous releases [go here](https://github.com/vuejs/eslint-plugin-vue/releases).
21+
1422
## :anchor: Versioning Policy
1523

1624
This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).

docs/.vuepress/theme/Layout.vue

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<template>
2+
<BaseLayout
3+
v-bind="$attrs"
4+
v-on="$listeners">
5+
<slot
6+
name="sidebar-top"
7+
slot="sidebar-top"
8+
/>
9+
<slot
10+
name="sidebar-bottom"
11+
slot="sidebar-bottom"
12+
/>
13+
<template
14+
slot="page-top">
15+
<div class="content beta-doc-description">
16+
<div class="warning custom-block">
17+
<p class="custom-block-title">Note</p>
18+
<p>This is a documentation for version <code>{{docVersion}}</code>.<template v-if="hasNotYetBeenReleased"> Also, this documentation may contain content that has not yet been released.</template><br>
19+
To check version <code>6.2.2</code> <a :href="v6DocLink">go here</a>.
20+
To check previous releases <a href="https://github.com/vuejs/eslint-plugin-vue/releases">go here</a>.</p>
21+
</div>
22+
</div>
23+
<slot
24+
name="page-top"
25+
/>
26+
</template>
27+
<slot
28+
name="page-bottom"
29+
slot="page-bottom"
30+
/>
31+
</BaseLayout>
32+
</template>
33+
<script>
34+
/**
35+
* Layout definition to navigate to older versions of the document.
36+
*/
37+
import BaseLayout from 'vuepress/lib/default-theme/Layout.vue'
38+
import semver from 'semver'
39+
const version = semver.parse(require('../../../package.json').version)
40+
export default {
41+
components: {
42+
BaseLayout
43+
},
44+
computed: {
45+
docVersion () {
46+
if (version.major < 7) {
47+
return '7.x'
48+
}
49+
return version.raw
50+
},
51+
hasNotYetBeenReleased () {
52+
if (version.major < 7) {
53+
return true
54+
}
55+
return false
56+
},
57+
v6DocLink () {
58+
if (this.$page.path.endsWith('.html')) {
59+
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path.replace(/\.html$/, '')}.md`
60+
}
61+
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path}README.md`
62+
}
63+
}
64+
}
65+
</script>
66+
<style scoped>
67+
.beta-doc-description {
68+
padding-bottom: 0;
69+
}
70+
* ::v-deep .content ~ .content {
71+
padding-top: 0;
72+
}
73+
* ::v-deep .content:not(.custom) h1{
74+
margin-top: -3.1rem;
75+
}
76+
</style>

docs/user-guide/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ vue add @vue/cli-plugin-eslint
99

1010
Via [npm](https://www.npmjs.com/):
1111
```bash
12-
npm install --save-dev eslint eslint-plugin-vue
12+
npm install --save-dev eslint eslint-plugin-vue@next
1313
```
1414

1515
Via [yarn](https://yarnpkg.com/):
1616
```bash
17-
yarn add -D eslint eslint-plugin-vue
17+
yarn add -D eslint eslint-plugin-vue@next
1818
```
1919

2020
::: tip Requirements

0 commit comments

Comments
 (0)