Skip to content

Commit 0fa341c

Browse files
committed
chore: fix lint
1 parent 873903f commit 0fa341c

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ supported macros:
2525
- [x] export-render
2626
- [x] define-slots
2727
- [x] short-vmodel
28-
- [x] setup-sfc
28+
- [x] setup-sfc
2929

3030
### Initialization
3131

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /usr/bin/env node
2-
import { $, argv, chalk, path } from 'zx'
32
import { readPackageJSON } from 'pkg-types'
3+
import { $, argv, chalk, path } from 'zx'
44
import { init } from './init/index'
55
import { sg } from './sg'
66

src/init/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import type { VueMacros } from '../common'
12
import { checkbox, select } from '@inquirer/prompts'
23
import { chalk } from 'zx'
3-
import type { VueMacros } from '../common'
44
import { experimentalMacros, officialMacros, stableMacros } from '../common'
55
import { rewriteNuxtConfig } from './nuxt'
6+
import { rewritePackage } from './package'
67
import { rewriteTsConfig } from './tsconfig'
78
import { rewriteViteConfig } from './vite'
8-
import { rewritePackage } from './package'
99

1010
export async function init(target: string) {
1111
const selectedMacros = (await checkbox({
@@ -47,7 +47,7 @@ export async function init(target: string) {
4747
if (selectedMacros.defineProp) {
4848
const edition = await select({
4949
message: chalk.green(
50-
`Which edition do you want to use?`,
50+
`Which edition do you want to use?`,
5151
),
5252
choices: [
5353
{ name: 'kevinEdition', value: 'kevinEdition' },

src/init/nuxt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { VueMacros } from '../common'
12
import { loadFile, writeFile } from 'magicast'
23
import { addNuxtModule, getDefaultExportOptions } from 'magicast/helpers'
34
import { fs } from 'zx'
4-
import type { VueMacros } from '../common'
55

66
export async function rewriteNuxtConfig(macros: VueMacros, target: string) {
77
const filename = `${target}/nuxt.config.ts`

src/init/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import type { VueMacros } from '../common'
12
import { fileURLToPath } from 'node:url'
23
import { readPackageJSON } from 'pkg-types'
34
import { $, path } from 'zx'
4-
import type { VueMacros } from '../common'
55

66
export async function rewritePackage(macros: VueMacros, target: string) {
77
const packageJson = await readPackageJSON(target)

src/init/tsconfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { TSConfig } from 'pkg-types'
2+
import type { VueMacros } from '../common'
23
import { readTSConfig, writeTSConfig } from 'pkg-types'
34
import { fs } from 'zx'
4-
import type { VueMacros } from '../common'
55
import { camelize, vueMacros } from '../common'
66

77
export async function rewriteTsConfig(selectedMacros: VueMacros, target: string) {

src/init/vite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { ProxifiedFunctionCall } from 'magicast'
2+
import type { VueMacros } from '../common'
23
import { loadFile, writeFile } from 'magicast'
34
import { addVitePlugin, findVitePluginCall, getDefaultExportOptions, updateVitePluginConfig } from 'magicast/helpers'
45
import { fs } from 'zx'
5-
import type { VueMacros } from '../common'
66

77
export async function rewriteViteConfig(macros: VueMacros, target: string) {
88
const filename = `${target}/vite.config.ts`

src/sg/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { fileURLToPath } from 'node:url'
2-
import { $, chalk, fs, glob, path } from 'zx'
32
import { select } from '@inquirer/prompts'
4-
import { rewriteConfig } from '../init/index'
3+
import { $, chalk, fs, glob, path } from 'zx'
54
import { camelize } from '../common'
5+
import { rewriteConfig } from '../init/index'
66

77
async function toSetupSFC(target: string) {
88
const extname = path.extname(target)
@@ -18,7 +18,7 @@ async function toSetupSFC(target: string) {
1818
export async function sg(target: string) {
1919
let macro = await select({
2020
message: chalk.green(
21-
`Which vue macro do you want to use?`,
21+
`Which vue macro do you want to use?`,
2222
),
2323
choices: [
2424
{ value: 'jsx-directive' },
@@ -31,7 +31,7 @@ export async function sg(target: string) {
3131
if (macro === 'jsx-directive') {
3232
macro = await select({
3333
message: chalk.green(
34-
`Which render macro do you want to use?`,
34+
`Which render macro do you want to use?`,
3535
),
3636
choices: [
3737
{ value: 'define-render' },
@@ -43,7 +43,7 @@ export async function sg(target: string) {
4343
if (macro === 'short-vmodel') {
4444
macro = await select({
4545
message: chalk.green(
46-
`Which prefix do you want to use?`,
46+
`Which prefix do you want to use?`,
4747
),
4848
choices: [
4949
{ name: '$', value: 'short-vmodel 0', description: '$foo="foo"' },

0 commit comments

Comments
 (0)