Skip to content

Commit 7c5d514

Browse files
committed
Upgrade vuepress and vue-eslint-editor.
1 parent 1cd5590 commit 7c5d514

File tree

8 files changed

+28
-19
lines changed

8 files changed

+28
-19
lines changed

docs/.vuepress/components/eslint-code-block.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
</template>
1919

2020
<script>
21-
// https://github.com/vuejs/vuepress/issues/451
22-
import EslintEditor from '../../../node_modules/vue-eslint-editor'
21+
import EslintEditor from 'vue-eslint-editor'
2322
import { rules, processors } from '../../../'
2423
2524
export default {

docs/.vuepress/config.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -66,22 +66,25 @@ module.exports = {
6666
base: '/',
6767
title: 'eslint-plugin-vue',
6868
description: 'Official ESLint plugin for Vue.js',
69-
serviceWorker: true,
7069
evergreen: true,
7170
head: [
7271
['link', { rel: 'icon', href: '/favicon.png' }]
7372
],
7473

74+
plugins: {
75+
'@vuepress/pwa': {
76+
serviceWorker: true,
77+
updatePopup: true
78+
}
79+
},
80+
7581
themeConfig: {
7682
repo: 'vuejs/eslint-plugin-vue',
7783
docsRepo: 'vuejs/eslint-plugin-vue',
7884
docsDir: 'docs',
7985
docsBranch: 'master',
8086
editLinks: true,
8187
lastUpdated: true,
82-
serviceWorker: {
83-
updatePopup: true
84-
},
8588

8689
nav: [
8790
{ text: 'User Guide', link: '/user-guide/' },

docs/.vuepress/style.styl renamed to docs/.vuepress/styles/index.styl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.theme-container.rule-details .content > h1 {
1+
.theme-container.rule-details .theme-default-content > h1 {
22
font-size: 1.8rem;
33

44
+ blockquote {

docs/.vuepress/theme/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extend: '@vuepress/theme-default'
3+
}

docs/.vuepress/theme/Layout.vue renamed to docs/.vuepress/theme/layouts/Layout.vue

+8-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/>
1313
<template
1414
slot="page-top">
15-
<div class="content beta-doc-description">
15+
<div class="theme-default-content beta-doc-description">
1616
<div class="warning custom-block">
1717
<p class="custom-block-title">Note</p>
1818
<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>
@@ -30,14 +30,16 @@
3030
/>
3131
</BaseLayout>
3232
</template>
33+
3334
<script>
3435
/**
3536
* Layout definition to navigate to older versions of the document.
3637
*/
37-
import BaseLayout from 'vuepress/lib/default-theme/Layout.vue'
38+
import BaseLayout from '@vuepress/theme-default/layouts/Layout.vue'
3839
import semver from 'semver'
39-
const version = semver.parse(require('../../../package.json').version)
40+
const version = semver.parse(require('../../../../package.json').version)
4041
export default {
42+
name: 'MyLayout',
4143
components: {
4244
BaseLayout
4345
},
@@ -63,14 +65,15 @@ export default {
6365
}
6466
}
6567
</script>
68+
6669
<style scoped>
6770
.beta-doc-description {
6871
padding-bottom: 0;
6972
}
70-
* ::v-deep .content ~ .content {
73+
* ::v-deep .theme-default-content ~ .theme-default-content {
7174
padding-top: 0;
7275
}
73-
* ::v-deep .content:not(.custom) h1{
76+
* ::v-deep .theme-default-content:not(.custom) h1{
7477
margin-top: -3.1rem;
7578
}
7679
</style>

docs/rules/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
sidebarDepth: 0
33
---
44

5-
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
6-
75
# Available rules
86

7+
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
8+
99
::: tip Legend
1010
:wrench: Indicates that the rule is fixable, and using `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
1111
:::

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"devDependencies": {
5959
"@types/node": "^4.2.16",
6060
"@typescript-eslint/parser": "^2.6.1",
61+
"@vuepress/plugin-pwa": "^1.4.0",
6162
"acorn": "^7.1.0",
6263
"babel-eslint": "^10.0.2",
6364
"chai": "^4.1.0",
@@ -66,12 +67,12 @@
6667
"eslint-plugin-import": "^2.18.2",
6768
"eslint-plugin-vue": "file:.",
6869
"eslint-plugin-vue-libs": "^4.0.0",
69-
"eslint4b": "^6.6.0",
70+
"eslint4b": "^6.8.0",
7071
"lodash": "^4.17.4",
7172
"mocha": "^5.2.0",
7273
"nyc": "^12.0.2",
7374
"typescript": "^3.5.2",
74-
"vue-eslint-editor": "^0.1.4",
75-
"vuepress": "^0.14.5"
75+
"vue-eslint-editor": "^1.1.0",
76+
"vuepress": "^1.4.0"
7677
}
7778
}

tools/update-docs-rules-index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ fs.writeFileSync(
9494
sidebarDepth: 0
9595
---
9696
97-
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
98-
9997
# Available rules
10098
99+
<!-- This file is automatically generated in tools/update-docs-rules-index.js, do not change! -->
100+
101101
::: tip Legend
102102
:wrench: Indicates that the rule is fixable, and using \`--fix\` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the reported problems.
103103
:::

0 commit comments

Comments
 (0)