Skip to content

Commit

Permalink
fix(cli): fix conflict resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
ModyQyW committed Jul 18, 2024
1 parent 6f54031 commit 81e2af3
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,28 +417,13 @@ const tasks = new Listr<Ctx>([
functions.includes('eslint') ||
functions.includes('oxlint'))
) {
const resolution = (await task
.prompt(ListrInquirerPromptAdapter)
.run(select, {
choices: [
{
name: 'Keep Biome and remove other functions',
value: 'keep',
},
{
name: 'Remove Biome and keep other functions',
value: 'remove',
},
],
message:
'Biome may conflict with other functions and is recommended to be used separately. What do you want to do?',
})) as string;
const resolution = await getConflictResolution(task);
if (resolution === 'keep') {
functions.splice(functions.indexOf('biome'), 1);
} else {
functions.splice(functions.indexOf('prettier'), 1);
functions.splice(functions.indexOf('eslint'), 1);
functions.splice(functions.indexOf('oxlint'), 1);
} else {
functions.splice(functions.indexOf('biome'), 1);
}
}
ctx.functions = functions.map(
Expand Down

0 comments on commit 81e2af3

Please sign in to comment.