Skip to content
Open
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
5 changes: 5 additions & 0 deletions .changeset/biome-starter-format.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@tanstack/create': patch
---

Match Biome formatting defaults to the generated React and Solid starter files.
2 changes: 2 additions & 0 deletions packages/create/scripts/generate-manifest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ function createTemplateRendererSource(renderers = templateRenderers) {
const {
packageManager,
projectName,
formatsTypeScript,
bundler,
typescript,
tailwind,
Expand Down Expand Up @@ -327,6 +328,7 @@ type TemplateRenderContext = {
[key: string]: any
packageManager: any
projectName: any
formatsTypeScript?: boolean
bundler: any
typescript: any
tailwind: any
Expand Down
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.5/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"includes": [
"**/src/**/*",
"**/.vscode/**/*",
<% if (bundler === 'vite') { %>"**/index.html",
<% } %>"**/<%= bundler %>.config.ts",
"!**/src/routeTree.gen.ts",
"!**/src/styles.css"
]
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
"$schema": "https://biomejs.dev/schemas/2.4.5/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"includes": [
"**/src/**/*",
"**/.vscode/**/*",
<% if (bundler === 'vite') { %>"**/index.html",
<% } %>"**/<%= bundler %>.config.ts",
"!**/src/routeTree.gen.ts",
"!**/src/styles.css"
]
},
"formatter": {
"enabled": true,
<% if (formatsTypeScript) { %>"indentStyle": "space",
"indentWidth": 2<% } else { %>"indentStyle": "tab"<% } %>
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
<% if (formatsTypeScript) { %>"quoteStyle": "single",
"semicolons": "asNeeded"<% } else { %>"quoteStyle": "double"<% } %>
}
}
}
<% if (bundler) { %><% } %>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
<% if (formatsTypeScript) { %>"indentStyle": "space",
"indentWidth": 2<% } else { %>"indentStyle": "tab"<% } %>
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
Expand All @@ -29,7 +30,8 @@
},
"javascript": {
"formatter": {
"quoteStyle": "double"
<% if (formatsTypeScript) { %>"quoteStyle": "single",
"semicolons": "asNeeded"<% } else { %>"quoteStyle": "double"<% } %>
}
}
}
1 change: 1 addition & 0 deletions packages/create/src/template-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export function createTemplateFile(environment: Environment, options: Options) {
integration.code || integration.jsName

const templateValues = {
formatsTypeScript: true,
packageManager: options.packageManager,
projectName: options.projectName,
bundler: options.bundler ?? 'vite',
Expand Down
Loading