Skip to content

Commit ec20de7

Browse files
committed
batch prettier and eslint first
1 parent e62315d commit ec20de7

2 files changed

Lines changed: 16 additions & 11 deletions

File tree

.changeset/legal-items-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"simplefrontend": patch
3+
---
4+
5+
batch prettier and eslint first

src/solutions/install-solutions.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,13 @@ export async function installSolutions({
1313
}: {
1414
solutions: Solutions;
1515
}) {
16-
await Promise.all(
17-
solutions.map(async (solution) => {
18-
if (solution === "prettier") {
19-
setupPrettier();
20-
} else if (solution === "eslint") {
21-
await setupEslint();
22-
} else if (solution === "typescript") {
23-
await setupTypescript();
24-
}
25-
}),
26-
);
16+
if (solutions.includes("prettier")) {
17+
setupPrettier();
18+
}
19+
20+
if (solutions.includes("eslint")) {
21+
await setupEslint();
22+
}
2723

2824
if (solutions.includes("prettier") && solutions.includes("eslint")) {
2925
log.info(
@@ -32,6 +28,10 @@ export async function installSolutions({
3228
setupEslintConfigPrettier();
3329
}
3430

31+
if (solutions.includes("typescript")) {
32+
await setupTypescript();
33+
}
34+
3535
if (!(solutions.includes("prettier") || solutions.includes("eslint"))) {
3636
// no need to ask for pre-push hook or github actions if no formatting or linting is setup
3737
return;

0 commit comments

Comments
 (0)