Skip to content

Commit

Permalink
Skip Prettier config when using Biome
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jul 8, 2024
1 parent 6b53cfb commit 67a89d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/shy-eagles-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sumup-oss/foundry": patch
---

Skipped initializing the Prettier config when using Biome.
16 changes: 11 additions & 5 deletions src/cli/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@ export async function init({ $0, _, ...args }: InitParams): Promise<void> {
options = { ...args, ...answers };
}

const files = getFilesForTools(options, tools);
const selectedTools: Record<string, ToolOptions> = tools;

if (options.useBiome) {
// biome-ignore lint/performance/noDelete:
delete selectedTools.prettier;
}

const files = getFilesForTools(options, selectedTools);

const scripts = getScripts(options);

Expand Down Expand Up @@ -251,19 +258,18 @@ function getScripts(options: InitOptions) {
{
name: 'lint',
command:
'biome check && foundry run eslint . --ext .js,.jsx,.json,.ts,.tsx',
'biome check && foundry run eslint . --ext .js,.jsx,.ts,.tsx',
description: 'check files for problematic patterns and report them',
},
{
name: 'lint:fix',
command:
'biome check --write && foundry run eslint . --ext .js,.jsx,.json,.ts,.tsx --fix',
'biome check --write && foundry run eslint . --ext .js,.jsx,.ts,.tsx --fix',
description: 'same as `lint` and also try to fix the issues',
},
{
name: 'lint:ci',
command:
'biome ci && foundry run eslint . --ext .js,.jsx,.json,.ts,.tsx',
command: 'biome ci && foundry run eslint . --ext .js,.jsx,.ts,.tsx',
description: 'lint files in a continuous integration workflow',
},
],
Expand Down

0 comments on commit 67a89d2

Please sign in to comment.