feat(tooling): add linter/formatter add-ons with preset selection #510
Which project does this relate to?#
Create TanStack App
Describe the feature#
It would be nice if Create TanStack App could offer linter and formatter add-ons during project creation, with an optional second step for choosing a preset or setup.
For example:
? Select a linter / formatter
❯ Biome
Oxlint + Oxfmt
ESLint + Prettier
None
? Select a preset
❯ Recommended
Ultracite
Custom
The available presets could depend on what the user selected.
For example, selecting Biome could show:
? Select a Biome preset
❯ Recommended
Ultracite
None
While selecting ESLint could show:
? Select an ESLint setup
❯ Recommended
Ultracite
None
The selected setup should install the required dependencies and generate the appropriate configuration files and scripts.
Why#
This would make popular linting and formatting setups much easier to choose when creating a new TanStack project.
It would also make setups like Biome + Ultracite or Oxlint + Oxfmt first class options instead of requiring users to configure them manually after creating the project.
Ideally this could build on the existing add-on and options system so that new tools and presets can be added without hardcoding everything into the CLI.
Example use cases#
- Biome → recommended configuration
- Biome → Ultracite
- Biome → no preset
- Oxlint + Oxfmt → recommended configuration
- Oxlint + Oxfmt → Ultracite
- Oxlint + Oxfmt → no preset
- ESLint → recommended configuration
- ESLint → Ultracite
- ESLint → no preset
- Prettier → standalone formatter
- Oxfmt → standalone formatter
itzzjustmateo(GitHub profile, opens in a new tab) added labelsenhancement
itzzjustmateo(GitHub profile, opens in a new tab) changed the title
The standalone Prettier part is now on main in #571, thanks for laying out the choices. Keeping this open for presets and the remaining toolchains.
AI review notes: The merged change supports
--toolchain prettierandtanstack add prettierfor React and Solid, with format/check scripts and no linter dependency. Six new generated-app cases cover Vite/Rsbuild, npm/pnpm and existing-app additions, including a formatting failure/recovery check. Normal hooks passed 10 builds, lint, 569 units and all 20 browser cases; all seven hosted checks passed. This is merged source, awaiting the normal package release. Ultracite presets and Oxfmt are not implemented by this change. Oxlint #524 remains separate and subject to the existing owner deferral.
Sign in to join this conversation.
This fits the existing add-on options model, so preset selection can stay with each toolchain. Oxlint #524 is lint-only and does not cover Oxfmt or these presets.