Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/cli/test/generated-builds.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
bootAndValidateSolidRuntime,
bootAndValidateStartAuthRuntime,
bootAndValidateStartCsrf,
validateBiomeConfig,
validatePwaBuildArtifacts,
validateSolidBuildArtifacts,
writeNuxtSsrAuthProbe,
Expand Down Expand Up @@ -56,6 +57,7 @@ describe.skipIf(!shouldRunBuildSamples)("Generated project install/build samples

const install = getPackageManagerCommand(sample.packageManager, "install");
await runCommand(sample.name, projectDir, install.command, install.args);
await validateBiomeConfig(sample, projectDir);
if (await fs.pathExists(path.join(projectDir, "packages/infra/alchemy.run.ts"))) {
await runCommand(
sample.name,
Expand Down
13 changes: 13 additions & 0 deletions apps/cli/test/generated-builds/probes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,3 +763,16 @@ export const checkedHandleError: HandleServerError = handleError;
);
return () => fs.remove(probe);
}

/** Biome refuses to format when its config has a key the installed version doesn't know. */
export async function validateBiomeConfig(sample: SelectedBuildSample, projectDir: string) {
if (!sample.config.addons?.includes("biome")) return;
await runCommand(sample.name, projectDir, "bun", [
"x",
"--no-install",
"biome",
"format",
"--write",
".",
]);
}
19 changes: 19 additions & 0 deletions apps/cli/test/generated-builds/samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ const baseConfig = {
} satisfies Partial<CreateInput>;

const buildSamples: BuildSample[] = [
...(["tanstack-router", "svelte"] as const).map(
(frontend) =>
({
name: `${frontend}-biome`,
config: {
...baseConfig,
frontend: [frontend],
backend: "hono",
runtime: "bun",
database: "none",
orm: "none",
api: "orpc",
auth: "none",
payments: "none",
addons: ["biome", "turborepo"],
examples: [],
},
}) satisfies BuildSample,
),
...(["none", "cloudflare"] as const).map(
(webDeploy) =>
({
Expand Down
7 changes: 2 additions & 5 deletions packages/template-generator/src/templates.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ export const EMBEDDED_TEMPLATES: Map<string, string> = new Map([
"useExhaustiveDependencies": "info"
},
"nursery": {
"useSortedClasses": {
"useTailwindSortedClasses": {
"level": "warn",
"fix": "safe",
"options": {
"functions": ["clsx", "cva", "cn"]
}
"fix": "safe"
}
},
"style": {
Expand Down
2 changes: 1 addition & 1 deletion packages/template-generator/src/utils/add-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const dependencyVersionMap = {

"@tauri-apps/cli": "^2.12.1",

"@biomejs/biome": "^2.5.15",
"@biomejs/biome": "^2.6.2",

oxlint: "^1.87.0",
oxfmt: "^0.72.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,9 @@
"useExhaustiveDependencies": "info"
},
"nursery": {
"useSortedClasses": {
"useTailwindSortedClasses": {
"level": "warn",
"fix": "safe",
"options": {
"functions": ["clsx", "cva", "cn"]
}
"fix": "safe"
}
},
"style": {
Expand Down
Loading