chore: run eslint

This commit is contained in:
zernonia 2023-09-06 09:57:37 +08:00
parent 746bcde87a
commit f979211d90
50 changed files with 54 additions and 54 deletions

View File

@ -286,7 +286,7 @@ for (const baseColor of ['slate', 'gray', 'zinc', 'neutral', 'stone', 'lime']) {
const color = scale
? colorsData[resolvedBase].find(
(item: any) => item.scale === Number.parseInt(scale),
)
)
: colorsData[resolvedBase]
if (color)
base.cssVars[mode][key] = color.hslChannel

View File

@ -57,7 +57,7 @@ export const add = new Command()
const config = await getConfig(cwd)
if (!config) {
logger.warn(
`Configuration is missing. Please run ${chalk.green( 'init' )} to create a components.json file.`,
`Configuration is missing. Please run ${chalk.green('init')} to create a components.json file.`,
)
process.exit(1)
}
@ -139,7 +139,7 @@ export const add = new Command()
}
for (const file of item.files) {
let filePath = path.resolve(targetDir, file.name)
const filePath = path.resolve(targetDir, file.name)
// Run transformers.
const content = await transform({

View File

@ -112,8 +112,8 @@ export async function promptForConfig(
name: 'framework',
message: `Which ${highlight('framework')} are you using?`,
choices: [
{title: 'Nuxt', value: 'nuxt'},
{title: 'Vite + Vue', value: 'vue'},
{ title: 'Nuxt', value: 'nuxt' },
{ title: 'Vite + Vue', value: 'vue' },
],
},
{
@ -140,7 +140,7 @@ export async function promptForConfig(
type: 'text',
name: 'tailwindCss',
message: `Where is your ${highlight('Tailwind CSS')} file?`,
initial: (prev,values) => defaultConfig?.tailwind.css ?? values.framework === 'nuxt' ? DEFAULT_TAILWIND_CSS_NUXT : DEFAULT_TAILWIND_CSS
initial: (prev, values) => defaultConfig?.tailwind.css ?? values.framework === 'nuxt' ? DEFAULT_TAILWIND_CSS_NUXT : DEFAULT_TAILWIND_CSS,
},
{
type: 'toggle',
@ -271,7 +271,7 @@ export async function runInit(cwd: string, config: Config) {
const packageManager = await getPackageManager(cwd)
// TODO: add support for other icon libraries.
const deps = PROJECT_DEPENDENCIES.base.concat(
const deps = PROJECT_DEPENDENCIES.base.concat(
config.framework === 'nuxt' ? PROJECT_DEPENDENCIES.nuxt : PROJECT_DEPENDENCIES.vue,
).concat(
config.style === 'new-york' ? [] : ['lucide-vue-next'],