Skip to content

Commit

Permalink
Update to v7 documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Mar 14, 2020
1 parent 5663572 commit 948a872
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@

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

> :exclamation: Attention - this is documentation for version `7.x` :exclamation:
>
> 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`.
>
> Please try it and report any issues that you might have encountered.
>
> If you want to check previous releases [go here](https://github.com/vuejs/eslint-plugin-vue/releases).
## :anchor: Versioning Policy

This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
Expand Down
76 changes: 76 additions & 0 deletions docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<template>
<BaseLayout
v-bind="$attrs"
v-on="$listeners">
<slot
name="sidebar-top"
slot="sidebar-top"
/>
<slot
name="sidebar-bottom"
slot="sidebar-bottom"
/>
<template
slot="page-top">
<div class="content beta-doc-description">
<div class="warning custom-block">
<p class="custom-block-title">Note</p>
<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>
To check version <code>6.2.2</code> <a :href="v6DocLink">go here</a>.
To check previous releases <a href="https://github.com/vuejs/eslint-plugin-vue/releases">go here</a>.</p>
</div>
</div>
<slot
name="page-top"
/>
</template>
<slot
name="page-bottom"
slot="page-bottom"
/>
</BaseLayout>
</template>
<script>
/**
* Layout definition to navigate to older versions of the document.
*/
import BaseLayout from 'vuepress/lib/default-theme/Layout.vue'
import semver from 'semver'
const version = semver.parse(require('../../../package.json').version)
export default {
components: {
BaseLayout
},
computed: {
docVersion () {
if (version.major < 7) {
return '7.x'
}
return version.raw
},
hasNotYetBeenReleased () {
if (version.major < 7) {
return true
}
return false
},
v6DocLink () {
if (this.$page.path.endsWith('.html')) {
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path.replace(/\.html$/, '')}.md`
}
return `https://github.com/vuejs/eslint-plugin-vue/blob/v6.2.2/docs${this.$page.path}README.md`
}
}
}
</script>
<style scoped>
.beta-doc-description {
padding-bottom: 0;
}
* ::v-deep .content ~ .content {
padding-top: 0;
}
* ::v-deep .content:not(.custom) h1{
margin-top: -3.1rem;
}
</style>
4 changes: 2 additions & 2 deletions docs/user-guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ vue add @vue/cli-plugin-eslint

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

Via [yarn](https://yarnpkg.com/):
```bash
yarn add -D eslint eslint-plugin-vue
yarn add -D eslint eslint-plugin-vue@next
```

::: tip Requirements
Expand Down

0 comments on commit 948a872

Please sign in to comment.