Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 11, 2023
1 parent e834b52 commit 0f52e8b
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A custom user module system. Place a `.ts` file with the following template, it will be installed automatically.

```ts
import { type UserModule } from '~/types'
import type { UserModule } from '~/types'

export const install: UserModule = ({ app, router, isClient }) => {
// do something
Expand Down
2 changes: 1 addition & 1 deletion src/modules/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Locale } from 'vue-i18n'
import { createI18n } from 'vue-i18n'
import { type UserModule } from '~/types'
import type { UserModule } from '~/types'

// Import i18n resources
// https://vitejs.dev/guide/features.html#glob-import
Expand Down
2 changes: 1 addition & 1 deletion src/modules/nprogress.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import NProgress from 'nprogress'
import { type UserModule } from '~/types'
import type { UserModule } from '~/types'

export const install: UserModule = ({ isClient, router }) => {
if (isClient) {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/pinia.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createPinia } from 'pinia'
import { type UserModule } from '~/types'
import type { UserModule } from '~/types'

// Setup Pinia
// https://pinia.vuejs.org/
Expand Down
2 changes: 1 addition & 1 deletion src/modules/pwa.ts
Original file line number Diff line number Diff line change
@@ -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
export const install: UserModule = ({ isClient, router }) => {
Expand Down
4 changes: 2 additions & 2 deletions src/shims.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ declare interface Window {

// with unplugin-vue-markdown, markdown files can be treated as Vue components
declare module '*.md' {
import { type DefineComponent } from 'vue'
import type { DefineComponent } from 'vue'

const component: DefineComponent<object, object, any>
export default component
}

declare module '*.vue' {
import { type DefineComponent } from 'vue'
import type { DefineComponent } from 'vue'

const component: DefineComponent<object, object, any>
export default component
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { type ViteSSGContext } from 'vite-ssg'
import type { ViteSSGContext } from 'vite-ssg'

export type UserModule = (ctx: ViteSSGContext) => void
2 changes: 1 addition & 1 deletion test/component.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils'
import { describe, expect, it } from 'vitest'
import TheCounter from '../src/components/TheCounter.vue'

describe('TheCounter.vue', () => {
describe('component TheCounter.vue', () => {
it('should render', () => {
const wrapper = mount(TheCounter, { props: { initial: 10 } })
expect(wrapper.text()).toContain('10')
Expand Down
12 changes: 6 additions & 6 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"compilerOptions": {
"target": "ESNext",
"lib": ["DOM", "ESNext"],
"jsx": "preserve",
"lib": ["DOM", "ESNext"],
"baseUrl": ".",
"module": "ESNext",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"~/*": ["src/*"]
},
"resolveJsonModule": true,
"types": [
"vitest",
"vite/client",
Expand All @@ -18,14 +19,13 @@
"vite-plugin-pwa/client",
"unplugin-vue-macros/macros-global"
],
"resolveJsonModule": true,
"allowJs": true,
"isolatedModules": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"strictNullChecks": true,
"noUnusedLocals": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"vueCompilerOptions": {
Expand Down

0 comments on commit 0f52e8b

Please sign in to comment.