Repository navigation
fix(create): align Biome formatter with starter files #577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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. |
| 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, | ||
| "indentStyle": "space", | ||
| "indentWidth": 2 | ||
| }, | ||
| "assist": { "actions": { "source": { "organizeImports": "on" } } }, | ||
| "linter": { | ||
| "enabled": true, | ||
| "rules": { | ||
| "recommended": true | ||
| } | ||
| }, | ||
| "javascript": { | ||
| "formatter": { | ||
| "quoteStyle": "single", | ||
| "semicolons": "asNeeded" | ||
| } | ||
| } | ||
| } | ||
| <% if (bundler) { %><% } %> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,8 @@ | |
| }, | ||
| "formatter": { | ||
| "enabled": true, | ||
| "indentStyle": "tab" | ||
| "indentStyle": "space", | ||
| "indentWidth": 2 | ||
| }, | ||
| "assist": { "actions": { "source": { "organizeImports": "on" } } }, | ||
| "linter": { | ||
|
|
@@ -29,7 +30,8 @@ | |
| }, | ||
| "javascript": { | ||
| "formatter": { | ||
| "quoteStyle": "double" | ||
| "quoteStyle": "single", | ||
| "semicolons": "asNeeded" | ||
|
Comment on lines
+33
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: TanStack/cli
Length of output: 2730
Script executed:
Repository: TanStack/cli
Length of output: 11514
Script executed:
Repository: TanStack/cli
Length of output: 9046
Script executed:
Repository: TanStack/cli
Length of output: 16918
Script executed:
Repository: TanStack/cli
Length of output: 21792
Script executed:
Repository: TanStack/cli
Length of output: 10467
Script executed:
Repository: TanStack/cli
Length of output: 8558
Align the TanStack Query router template with these defaults.
For edge-generated React apps with Query and without
routerOnly,src/router.tsxretains the double-quoted import and optional semicolons.biome checkcan report these as formatting errors. The CLI generator formats them before writing.Suggested fix