Skip to content
This repository was archived by the owner on Jan 9, 2022. It is now read-only.

Commit 95f74e9

Browse files
committed
style(docs): enable eslint for .vitepress
1 parent 715e33e commit 95f74e9

File tree

6 files changed

+41
-42
lines changed

6 files changed

+41
-42
lines changed

.eslintignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
dist
22
node_modules
33
public
4-
___
4+
___
5+
6+
!.vitepress

docs/src/.vitepress/components/GettingStartedExample.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<GDialog v-model="value">
33
Content
44
</GDialog>
5-
5+
66
<BtnWrapper>
77
<BaseBtn @click="onOpen">
88
Open Dialog
@@ -11,32 +11,31 @@
1111
</template>
1212

1313
<script>
14-
import {ref, computed} from 'vue'
14+
import { ref, computed } from 'vue'
1515
1616
export default {
17-
name: 'base-dialog',
17+
name: 'BaseDialog',
1818
1919
setup() {
2020
const dialogState = ref(false)
21-
21+
2222
const value = computed({
2323
get() {
2424
return dialogState.value
2525
},
2626
set(val) {
2727
dialogState.value = val
28-
}
28+
},
2929
})
3030
31-
const onOpen = ()=>{
31+
const onOpen = () => {
3232
value.value = true
3333
}
3434
3535
return {
3636
value,
37-
onOpen
37+
onOpen,
3838
}
3939
},
4040
}
4141
</script>
42-

docs/src/.vitepress/components/GettingStartedExampleStyled.vue

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Content
55
</div>
66
</GDialog>
7-
7+
88
<BtnWrapper>
99
<BaseBtn @click="onOpen">
1010
Open Dialog
@@ -13,30 +13,30 @@
1313
</template>
1414

1515
<script>
16-
import {ref, computed} from 'vue'
16+
import { ref, computed } from 'vue'
1717
1818
export default {
19-
name: 'base-dialog',
19+
name: 'BaseDialog',
2020
2121
setup() {
2222
const dialogState = ref(false)
23-
23+
2424
const value = computed({
2525
get() {
2626
return dialogState.value
2727
},
2828
set(val) {
2929
dialogState.value = val
30-
}
30+
},
3131
})
3232
33-
const onOpen = ()=>{
33+
const onOpen = () => {
3434
value.value = true
3535
}
3636
3737
return {
3838
value,
39-
onOpen
39+
onOpen,
4040
}
4141
},
4242
}
@@ -48,4 +48,3 @@ export default {
4848
background: #fff;
4949
}
5050
</style>
51-

docs/src/.vitepress/config.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable @typescript-eslint/no-var-requires */
12
const path = require('path')
23

34
module.exports = {
@@ -17,32 +18,32 @@ module.exports = {
1718
},
1819
},
1920

20-
title: "Gitart Vue Dialog",
21-
description: "Documentaion for Gitart Vue Dialog. Docs",
22-
lang: "en-US",
21+
title: 'Gitart Vue Dialog',
22+
description: 'Documentaion for Gitart Vue Dialog. Docs',
23+
lang: 'en-US',
2324

2425
head: [
2526
['link', { rel: 'icon', href: '/favicon.png' }],
2627
],
27-
28+
2829
themeConfig: {
29-
lastUpdated: "Last Updated",
30+
lastUpdated: 'Last Updated',
3031
displayAllHeaders: true,
3132
activeHeaderLinks: false,
3233

3334
nav: [
34-
{ text: "Home", link: "/" },
35-
{ text: "Docs", link: "/docs/introduction/getting-started" },
35+
{ text: 'Home', link: '/' },
36+
{ text: 'Docs', link: '/docs/introduction/getting-started' },
3637
{
37-
text: "npm",
38-
link: "https://www.npmjs.com/package/gitart-vue-dialog",
39-
target: "_blank",
38+
text: 'npm',
39+
link: 'https://www.npmjs.com/package/gitart-vue-dialog',
40+
target: '_blank',
4041
rel: false,
4142
},
4243
{
43-
text: "Github",
44-
link: "https://github.com/MichaelGitArt/gitart-vue-dialog",
45-
target: "_blank",
44+
text: 'Github',
45+
link: 'https://github.com/MichaelGitArt/gitart-vue-dialog',
46+
target: '_blank',
4647
rel: false,
4748
},
4849
],
@@ -52,7 +53,7 @@ module.exports = {
5253
'/': getGuideSidebar(),
5354
},
5455
},
55-
};
56+
}
5657

5758
function getGuideSidebar() {
5859
return [
@@ -61,7 +62,7 @@ function getGuideSidebar() {
6162
children: [
6263
{ text: 'Getting Started', link: '/docs/introduction/getting-started' },
6364
{ text: 'Usage Types', link: '/docs/introduction/usage-types' },
64-
]
65+
],
6566
},
6667

6768
{
@@ -70,14 +71,14 @@ function getGuideSidebar() {
7071
{ text: 'Component Usage', link: '/docs/guide/component-usage' },
7172
{ text: 'Plugin Usage', link: '/docs/guide/plugin-usage' },
7273
{ text: 'Properties', link: '/docs/guide/properties' },
73-
]
74+
],
7475
},
7576

7677
{
7778
text: 'Components',
7879
children: [
7980
{ text: 'GDialog', link: '/docs/components/g-dialog' },
80-
]
81+
],
8182
},
8283
]
8384
}

docs/src/.vitepress/theme/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ export default {
1212
app.component('GDialog', GDialog)
1313
app.component('BaseBtn', BaseBtn)
1414
app.component('BtnWrapper', BtnWrapper)
15-
}
15+
},
1616
}

docs/src/docs/guide/plugin-usage.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ export default {
5858

5959
info: {
6060
type: String,
61-
required: true
62-
}
61+
required: true,
62+
},
6363
},
6464

6565
setup(props: IBaseDialogProps, { emit }) {
@@ -70,10 +70,9 @@ export default {
7070

7171
set(val) {
7272
emit('update:modelValue', val)
73-
}
73+
},
7474
})
7575

76-
7776
return {
7877
value,
7978
}
@@ -92,11 +91,10 @@ export default {
9291
this.$dialog.addDialog({
9392
component: InfoDialog,
9493
props: {
95-
info: 'Info to display'
96-
}
94+
info: 'Info to display',
95+
},
9796
})
9897
},
9998
},
10099
}
101-
102100
```

0 commit comments

Comments
 (0)