Skip to content

Commit a9d8469

Browse files
committed
fix: fixed some eslint issues
close #45
1 parent 5bc2700 commit a9d8469

40 files changed

+1511
-1823
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist
22
public
33
.github
44
.vscode
5+
docs

.eslintrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/.vitepress/config.ts

Lines changed: 85 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,99 @@
11
import { defineConfig } from 'vitepress'
2-
import { description, discord, font, github, name, releases, twitter,} from './meta'
32
import { version } from '../../package.json'
3+
import { description, discord, font, github, name, releases, twitter } from './meta'
44

55
export default defineConfig({
6-
lang: 'en-US',
7-
title: name,
8-
description,
9-
head: [
10-
['meta', { name: 'theme-color', content: '#ffffff' }],
11-
['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }],
12-
['meta', { property: 'og:title', content: name }],
13-
['meta', { property: 'og:description', content: description }],
14-
['meta', { name: 'twitter:title', content: name }],
15-
['meta', { name: 'twitter:description', content: description }],
16-
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
17-
['link', { href: font, rel: 'stylesheet' }],
18-
['link', { rel: 'mask-icon', href: '/logo.svg', color: '#ffffff' }],
6+
lang: 'en-US',
7+
title: name,
8+
description,
9+
head: [
10+
['meta', { name: 'theme-color', content: '#ffffff' }],
11+
['link', { rel: 'icon', href: '/logo.svg', type: 'image/svg+xml' }],
12+
['meta', { property: 'og:title', content: name }],
13+
['meta', { property: 'og:description', content: description }],
14+
['meta', { name: 'twitter:title', content: name }],
15+
['meta', { name: 'twitter:description', content: description }],
16+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
17+
['link', { href: font, rel: 'stylesheet' }],
18+
['link', { rel: 'mask-icon', href: '/logo.svg', color: '#ffffff' }],
19+
],
20+
lastUpdated: true,
21+
markdown: {
22+
theme: {
23+
light: 'vitesse-light',
24+
dark: 'vitesse-dark',
25+
},
26+
},
27+
themeConfig: {
28+
logo: '/logo.svg',
29+
editLink: {
30+
pattern: 'https://github.com/elonehoo/vue-hooks-form/tree/main/docs/:path',
31+
text: 'Suggest changes to this page',
32+
},
33+
socialLinks: [
34+
{ icon: 'twitter', link: twitter },
35+
{ icon: 'discord', link: discord },
36+
{ icon: 'github', link: github },
1937
],
20-
lastUpdated: true,
21-
markdown: {
22-
theme: {
23-
light: 'vitesse-light',
24-
dark: 'vitesse-dark',
25-
},
38+
footer: {
39+
message: 'Released under the MIT License.',
40+
copyright: 'Copyright © 2023-PRESENT Elone Hoo',
2641
},
27-
themeConfig: {
28-
logo: '/logo.svg',
29-
editLink: {
30-
pattern: 'https://github.com/elonehoo/vue-hooks-form/tree/main/docs/:path',
31-
text: 'Suggest changes to this page',
42+
nav: [
43+
{ text: 'Guide', link: '/guide/' },
44+
{ text: 'Functions', items: [
45+
{
46+
text: '',
47+
items: [
48+
{ text: 'useForm', link: '/use-form/' },
49+
],
3250
},
33-
socialLinks: [
34-
{ icon: 'twitter', link: twitter },
35-
{ icon: 'discord', link: discord },
36-
{ icon: 'github', link: github },
51+
] },
52+
{
53+
text: `v${version}`,
54+
items: [
55+
{
56+
text: 'Release Notes ',
57+
link: releases,
58+
},
3759
],
38-
footer: {
39-
message: 'Released under the MIT License.',
40-
copyright: 'Copyright © 2023-PRESENT Elone Hoo',
60+
},
61+
],
62+
sidebar: {
63+
'/': [
64+
{
65+
text: 'Guide',
66+
items: [
67+
{
68+
text: 'Getting Started',
69+
link: '/guide/',
70+
},
71+
],
4172
},
42-
nav: [
43-
{ text: 'Guide', link: '/guide/' },
44-
{ text: 'Functions',
73+
{
74+
text: 'Functions',
75+
items: [
76+
{
77+
text: 'useForm',
4578
items: [
46-
{
47-
text: '',
48-
items: [
49-
{ text: 'useForm', link: '/use-form/' },
50-
],
51-
},
79+
{ text: 'useForm', link: '/use-form/' },
80+
{ text: 'register', link: '/use-form/register' },
81+
{ text: 'unregister', link: '/use-form/unregister' },
82+
{ text: 'formState', link: '/use-form/formState' },
83+
{ text: 'handleSubmit', link: '/use-form/handleSubmit' },
84+
{ text: 'reset', link: '/use-form/reset' },
85+
{ text: 'setError', link: '/use-form/setError' },
86+
{ text: 'clearErrors', link: '/use-form/clearErrors' },
87+
{ text: 'setValue', link: '/use-form/setValue' },
88+
{ text: 'setFocus', link: '/use-form/setFocus' },
89+
{ text: 'getValues', link: '/use-form/getValues' },
90+
{ text: 'getFieldState', link: '/use-form/getFieldState' },
91+
{ text: 'trigger', link: '/use-form/trigger' },
5292
],
5393
},
54-
{
55-
text: `v${version}`,
56-
items: [
57-
{
58-
text: 'Release Notes ',
59-
link: releases,
60-
},
61-
],
62-
},
63-
],
64-
sidebar: {
65-
'/':[
66-
{
67-
text:'Guide',
68-
items:[
69-
{
70-
text:'Getting Started',
71-
link:'/guide/'
72-
}
73-
]
74-
},
75-
{
76-
text:'Functions',
77-
items:[
78-
{
79-
text:'useForm',
80-
items:[
81-
{text:'useForm',link:'/use-form/'},
82-
{text:'register',link:'/use-form/register'},
83-
{text:'unregister',link:'/use-form/unregister'},
84-
{text:'formState',link:'/use-form/formState'},
85-
{text:'handleSubmit',link:'/use-form/handleSubmit'},
86-
{text:'reset',link:'/use-form/reset'},
87-
{text:'setError',link:'/use-form/setError'},
88-
{text:'clearErrors',link:'/use-form/clearErrors'},
89-
{text:'setValue',link:'/use-form/setValue'},
90-
{text:'setFocus',link:'/use-form/setFocus'},
91-
{text:'getValues',link:'/use-form/getValues'},
92-
{text:'getFieldState',link:'/use-form/getFieldState'},
93-
{text:'trigger',link:'/use-form/trigger'},
94-
]
95-
},
96-
]
97-
}
98-
]
99-
}
94+
],
95+
},
96+
],
10097
},
98+
},
10199
})

docs/.vitepress/theme/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import '../style/main.css'
44
import 'uno.css'
55

66
export default {
7-
...Theme
7+
...Theme,
88
}

docs/guide/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ In `vue-hooks-form`,
3737
import { useForm } from 'vue-use-form'
3838
const { register } = useForm<Inputs>()
3939
</script>
40+
4041
<template>
4142
<input :="register('firstname')">
4243
</template>

docs/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
"name": "@vue-hooks-form/docs",
33
"type": "module",
44
"private": "true",
5+
"author": "Elone Hoo <hi@elonehoo.me>",
6+
"license": "MIT",
57
"scripts": {
68
"dev": "vitepress",
79
"build": "vitepress build",
810
"serve": "vitepress serve"
911
},
10-
"author": "Elone Hoo <hi@elonehoo.me>",
11-
"license": "MIT",
1212
"dependencies": {
1313
"@iconify-json/carbon": "^1.1.21",
14-
"@unocss/reset": "^0.57.2",
15-
"@vitejs/plugin-vue": "^4.4.0",
16-
"@vueuse/core": "^10.5.0",
17-
"esno": "^0.17.0",
14+
"@unocss/reset": "^0.57.3",
15+
"@vitejs/plugin-vue": "^4.4.1",
16+
"@vueuse/core": "^10.6.0",
17+
"esno": "^4.0.0",
1818
"https-localhost": "^4.7.1",
1919
"jiti": "^1.21.0",
20-
"unocss": "^0.57.2",
20+
"unocss": "^0.57.3",
2121
"unplugin-vue-components": "^0.25.2",
2222
"vite": "^4.5.0",
2323
"vitepress": "1.0.0-rc.25",

docs/tsconfig.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": ".",
4-
"module": "esnext",
53
"target": "esnext",
6-
"lib": ["DOM", "ESNext"],
7-
"strict": true,
84
"jsx": "preserve",
9-
"esModuleInterop": true,
10-
"skipLibCheck": true,
5+
"lib": ["DOM", "ESNext"],
6+
"baseUrl": ".",
7+
"module": "esnext",
118
"moduleResolution": "node",
9+
"paths": {
10+
"~/*": ["src/*"]
11+
},
1212
"resolveJsonModule": true,
13-
"noUnusedLocals": true,
14-
"strictNullChecks": true,
15-
"forceConsistentCasingInFileNames": true,
1613
"types": [
1714
"vite/client",
1815
"vitepress"
1916
],
20-
"paths": {
21-
"~/*": ["src/*"]
22-
}
17+
"strict": true,
18+
"strictNullChecks": true,
19+
"noUnusedLocals": true,
20+
"esModuleInterop": true,
21+
"forceConsistentCasingInFileNames": true,
22+
"skipLibCheck": true
2323
},
2424
"include": [
2525
".next",

0 commit comments

Comments
 (0)