chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -12,11 +12,7 @@ import {
|
||||
} from "@clack/prompts";
|
||||
import { createCliProgress } from "../cli/progress.js";
|
||||
import { note as emitNote } from "../terminal/note.js";
|
||||
import {
|
||||
stylePromptHint,
|
||||
stylePromptMessage,
|
||||
stylePromptTitle,
|
||||
} from "../terminal/prompt-style.js";
|
||||
import { stylePromptHint, stylePromptMessage, stylePromptTitle } from "../terminal/prompt-style.js";
|
||||
import { theme } from "../terminal/theme.js";
|
||||
import type { WizardProgress, WizardPrompter } from "./prompts.js";
|
||||
import { WizardCancelledError } from "./prompts.js";
|
||||
@@ -46,9 +42,7 @@ export function createClackPrompter(): WizardPrompter {
|
||||
message: stylePromptMessage(params.message),
|
||||
options: params.options.map((opt) => {
|
||||
const base = { value: opt.value, label: opt.label };
|
||||
return opt.hint === undefined
|
||||
? base
|
||||
: { ...base, hint: stylePromptHint(opt.hint) };
|
||||
return opt.hint === undefined ? base : { ...base, hint: stylePromptHint(opt.hint) };
|
||||
}) as Option<(typeof params.options)[number]["value"]>[],
|
||||
initialValue: params.initialValue,
|
||||
}),
|
||||
@@ -59,9 +53,7 @@ export function createClackPrompter(): WizardPrompter {
|
||||
message: stylePromptMessage(params.message),
|
||||
options: params.options.map((opt) => {
|
||||
const base = { value: opt.value, label: opt.label };
|
||||
return opt.hint === undefined
|
||||
? base
|
||||
: { ...base, hint: stylePromptHint(opt.hint) };
|
||||
return opt.hint === undefined ? base : { ...base, hint: stylePromptHint(opt.hint) };
|
||||
}) as Option<(typeof params.options)[number]["value"]>[],
|
||||
initialValues: params.initialValues,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user