chore: lint
This commit is contained in:
1 parent
e834b528e0
commit
0f52e8b22c
9 files changed
+15
-15
No files matched your search
@@ -3,7 +3,7 @@
|
|||||||
A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.
|
A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { type UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
export const install: UserModule = ({ app, router, isClient }) => {
|
export const install: UserModule = ({ app, router, isClient }) => {
|
||||||
// do something
|
// do something
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import type { Locale } from 'vue-i18n'
|
import type { Locale } from 'vue-i18n'
|
||||||
import { createI18n } from 'vue-i18n'
|
import { createI18n } from 'vue-i18n'
|
||||||
import { type UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
// Import i18n resources
|
// Import i18n resources
|
||||||
// https://vitejs.dev/guide/features.html#glob-import
|
// https://vitejs.dev/guide/features.html#glob-import
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import NProgress from 'nprogress'
|
import NProgress from 'nprogress'
|
||||||
import { type UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
export const install: UserModule = ({ isClient, router }) => {
|
export const install: UserModule = ({ isClient, router }) => {
|
||||||
if (isClient) {
|
if (isClient) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import { type UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
// Setup Pinia
|
// Setup Pinia
|
||||||
// https://pinia.vuejs.org/
|
// https://pinia.vuejs.org/
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { type UserModule } from '~/types'
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
|
// https://github.com/antfu/vite-plugin-pwa#automatic-reload-when-new-content-available
|
||||||
export const install: UserModule = ({ isClient, router }) => {
|
export const install: UserModule = ({ isClient, router }) => {
|
||||||
|
|||||||
Vendored
+2
-2
@@ -4,14 +4,14 @@ declare interface Window {
|
|||||||
|
|
||||||
// with unplugin-vue-markdown, markdown files can be treated as Vue components
|
// with unplugin-vue-markdown, markdown files can be treated as Vue components
|
||||||
declare module '*.md' {
|
declare module '*.md' {
|
||||||
import { type DefineComponent } from 'vue'
|
import type { DefineComponent } from 'vue'
|
||||||
|
|
||||||
const component: DefineComponent<object, object, any>
|
const component: DefineComponent<object, object, any>
|
||||||
export default component
|
export default component
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
import { type DefineComponent } from 'vue'
|
import type { DefineComponent } from 'vue'
|
||||||
|
|
||||||
const component: DefineComponent<object, object, any>
|
const component: DefineComponent<object, object, any>
|
||||||
export default component
|
export default component
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
import { type ViteSSGContext } from 'vite-ssg'
|
import type { ViteSSGContext } from 'vite-ssg'
|
||||||
|
|
||||||
export type UserModule = (ctx: ViteSSGContext) => void
|
export type UserModule = (ctx: ViteSSGContext) => void
|
||||||
@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'
|
|||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
import TheCounter from '../src/components/TheCounter.vue'
|
import TheCounter from '../src/components/TheCounter.vue'
|
||||||
|
|
||||||
describe('TheCounter.vue', () => {
|
describe('component TheCounter.vue', () => {
|
||||||
it('should render', () => {
|
it('should render', () => {
|
||||||
const wrapper = mount(TheCounter, { props: { initial: 10 } })
|
const wrapper = mount(TheCounter, { props: { initial: 10 } })
|
||||||
expect(wrapper.text()).toContain('10')
|
expect(wrapper.text()).toContain('10')
|
||||||
|
|||||||
+6
-6
@@ -1,14 +1,15 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ESNext",
|
||||||
"lib": ["DOM", "ESNext"],
|
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
|
"lib": ["DOM", "ESNext"],
|
||||||
|
"baseUrl": ".",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"~/*": ["src/*"]
|
"~/*": ["src/*"]
|
||||||
},
|
},
|
||||||
|
"resolveJsonModule": true,
|
||||||
"types": [
|
"types": [
|
||||||
"vitest",
|
"vitest",
|
||||||
"vite/client",
|
"vite/client",
|
||||||
@@ -18,14 +19,13 @@
|
|||||||
"vite-plugin-pwa/client",
|
"vite-plugin-pwa/client",
|
||||||
"unplugin-vue-macros/macros-global"
|
"unplugin-vue-macros/macros-global"
|
||||||
],
|
],
|
||||||
"resolveJsonModule": true,
|
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"isolatedModules": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"isolatedModules": true,
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"vueCompilerOptions": {
|
"vueCompilerOptions": {
|
||||||
|
|||||||
Reference in new issue
Block a user