Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit f4c36ee

Browse files
committed
chore: apply lint
1 parent c98c086 commit f4c36ee

7 files changed

+11
-13
lines changed

src/core/options.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ScriptSetupTransformOptions, ResolvedOptions } from '../types'
1+
import type { ScriptSetupTransformOptions, ResolvedOptions } from '../types'
22

33
export function resolveOptions(options: ScriptSetupTransformOptions = {}): ResolvedOptions {
44
return Object.assign(

src/core/parseSFC.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
/* eslint-disable one-var */
22
/* eslint-disable @typescript-eslint/no-namespace */
3-
import {
4-
Parser as HTMLParser,
5-
ParserOptions as HTMLParserOptions,
6-
} from 'htmlparser2'
3+
import type { ParserOptions as HTMLParserOptions } from 'htmlparser2'
4+
import { Parser as HTMLParser } from 'htmlparser2'
75
import type { ParserOptions } from '@babel/parser'
8-
import {
6+
import type {
97
AttributeNode,
108
DirectiveNode,
119
TemplateChildNode,
1210
ExpressionNode,
13-
baseParse,
1411
} from '@vue/compiler-core'
12+
import { baseParse } from '@vue/compiler-core'
1513
import { camelize } from '@vue/shared'
16-
import {
14+
import type {
1715
ParsedSFC,
1816
ScriptSetupTransformOptions,
1917
ScriptTagMeta,

src/core/transform.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import MagicString from 'magic-string'
22
import { shouldTransform as shouldTransformRefSugar, transform as transformRef } from '@vue/ref-transform'
3-
import { ResolvedOptions, ScriptSetupTransformOptions, TransformResult } from '../types'
3+
import type { ResolvedOptions, ScriptSetupTransformOptions, TransformResult } from '../types'
44
import { parseSFC } from './parseSFC'
55
import { transformScriptSetup } from './transformScriptSetup'
66
import { transformSfcRefSugar } from './transformSfcRefSugar'

src/core/transformScriptSetup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { capitalize } from '@vue/shared'
22
import type { Node, ObjectExpression, Statement } from '@babel/types'
33
import generate from '@babel/generator'
44
import { partition } from '@antfu/utils'
5-
import { ParsedSFC, ScriptSetupTransformOptions } from '../types'
5+
import type { ParsedSFC, ScriptSetupTransformOptions } from '../types'
66
import { applyMacros } from './macros'
77
import { getIdentifierDeclarations } from './identifiers'
88
import { t } from './babel'

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createUnplugin } from 'unplugin'
22
import { createFilter } from '@rollup/pluginutils'
3-
import { PluginOptions } from './types'
3+
import type { PluginOptions } from './types'
44
import { transform } from './core'
55

66
export * from './core'

src/nuxt.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import defu from 'defu'
2-
import { PluginOptions } from './types'
2+
import type { PluginOptions } from './types'
33
import unplugin from '.'
44

55
export default function(this: any, inlineOptions: PluginOptions = {}) {

test/errors.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const {data} = await something()
4848
})
4949

5050
it('ref sugar', () => {
51-
const warn = sinon.stub(console, 'warn')
51+
sinon.stub(console, 'warn')
5252

5353
expect(() =>
5454
t(`

0 commit comments

Comments
 (0)