Skip to content

Commit 8a63e34

Browse files
committed
chore: apply lint
1 parent 303eb5a commit 8a63e34

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+106
-111
lines changed

examples/vite-vue2/src/shims-vue.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineComponent } from 'vue'
1+
import type { defineComponent } from 'vue'
22

33
declare module '*.vue' {
44
const Component: ReturnType<typeof defineComponent>

examples/vite-vue2/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { UserConfig } from 'vite'
1+
import type { UserConfig } from 'vite'
22
import { createVuePlugin } from 'vite-plugin-vue2'
33
import Components from 'unplugin-vue-components/vite'
44

examples/vite-vue3/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang='ts'>
2-
import { ref, defineAsyncComponent } from 'vue'
2+
import { defineAsyncComponent, ref } from 'vue'
33
44
const tree = ref({
55
label: 'Top Level',

examples/vite-vue3/src/shims-vue.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/* eslint-disable import/no-duplicates */
22

33
declare module '*.vue' {
4-
import { defineComponent } from 'vue'
4+
import type { defineComponent } from 'vue'
55
const Component: ReturnType<typeof defineComponent>
66
export default Component
77
}
88

99
declare module '*.md' {
10-
import { defineComponent } from 'vue'
10+
import type { defineComponent } from 'vue'
1111
const Component: ReturnType<typeof defineComponent>
1212
export default Component
1313
}

examples/vite-vue3/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import path from 'path'
2-
import { UserConfig } from 'vite'
2+
import type { UserConfig } from 'vite'
33
import Vue from '@vitejs/plugin-vue'
44
import Components from 'unplugin-vue-components/vite'
55
import { VantResolver } from 'unplugin-vue-components/resolvers'
66
import Markdown from 'vite-plugin-md'
77
import Icons from 'unplugin-icons/vite'
88
import IconsResolver from 'unplugin-icons/resolver'
9-
// @ts-expect-error
9+
// @ts-expect-error missing types
1010
import SVG from 'vite-plugin-vue-svg'
1111
import Inspect from 'vite-plugin-inspect'
1212

examples/vue-cli/src/shims-vue.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineComponent } from '@vue/composition-api'
1+
import type { defineComponent } from '@vue/composition-api'
22

33
declare module '*.vue' {
44
const Component: ReturnType<typeof defineComponent>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"example:build": "npm -C examples/vite-vue3 run build",
6060
"example:dev": "npm -C examples/vite-vue3 run dev",
6161
"prepublishOnly": "npm run build",
62+
"lint": "eslint --ext .js,.vue,.ts,.tsx .",
6263
"release": "npx bumpp --commit --tag --push",
6364
"test": "vitest",
6465
"test:update": "vitest --u"

scripts/postbuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { resolve, basename } from 'path'
1+
import { basename, resolve } from 'path'
22
import { promises as fs } from 'fs'
33
import fg from 'fast-glob'
44

src/core/context.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { relative } from 'path'
2-
import fs from 'fs'
2+
import type fs from 'fs'
33
import Debug from 'debug'
4-
import { UpdatePayload, ViteDevServer } from 'vite'
5-
import { throttle, toArray, slash } from '@antfu/utils'
6-
import { Options, ComponentInfo, ResolvedOptions, Transformer } from '../types'
7-
import { pascalCase, getNameFromFilePath, resolveAlias, matchGlobs, parseId } from './utils'
4+
import type { UpdatePayload, ViteDevServer } from 'vite'
5+
import { slash, throttle, toArray } from '@antfu/utils'
6+
import type { ComponentInfo, Options, ResolvedOptions, Transformer } from '../types'
7+
import { getNameFromFilePath, matchGlobs, parseId, pascalCase, resolveAlias } from './utils'
88
import { resolveOptions } from './options'
99
import { searchComponents } from './fs/glob'
1010
import { generateDeclaration } from './declaration'

src/core/declaration.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { resolve, dirname, relative, isAbsolute } from 'path'
2-
import { promises as fs, existsSync } from 'fs'
1+
import { dirname, isAbsolute, relative, resolve } from 'path'
2+
import { existsSync, promises as fs } from 'fs'
33
import { notNullish, slash } from '@antfu/utils'
4-
import { Context } from './context'
4+
import type { Context } from './context'
55
import { getTransformedPath } from './utils'
66

77
export function parseDeclaration(code: string): Record<string, string> {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy