feat: add Prettier integration with composite addon pattern#76
Merged
Conversation
Covers adding Prettier and ESLint+Prettier as code quality options alongside Biome and ESLint, including the compose mechanism for composite addons.
…esolveAddonNames Adds the composite addon pattern to support addons that combine multiple existing addons. Adds prettier and eslint-prettier options to the linter category with updated prompt label.
…r templates, and ESLint conditional integration Handles compose expansion in generateAppPackageJson, generateRootPackageJson, and generateAllPackageJsons. Adds .prettierrc and .prettierignore templates. Adds conditional eslint-config-prettier to all ESLint configs.
Covers single repo and turborepo scenarios for both --linter prettier and --linter eslint-prettier, verifying files, deps, scripts, and template rendering.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds Prettier as a code quality option to the CLI scaffolding tool, introducing a flexible composite addon pattern to support combining ESLint and Prettier. The change renames the linter prompt to "Code quality tools?" to reflect the broader scope of formatting and linting options.
Changes:
- Introduces a
composefield onMetaAddontype to enable composite addons that expand into multiple constituent addons - Adds
prettier(formatter-only) andeslint-prettier(linter + formatter) as new linter options in META - Updates template resolution and package.json generation to handle composite addon expansion
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
docs/plans/2026-02-12-prettier-integration-design.md |
Design document detailing the Prettier integration approach and composite addon pattern |
apps/cli/tests/unit/types/meta.test.ts |
Unit test verifying MetaAddon can declare compose field for composite addons |
apps/cli/tests/unit/meta.test.ts |
Unit tests validating new prettier/eslint-prettier options and compose references |
apps/cli/tests/unit/lib/template-resolver.test.ts |
Unit tests for resolveAddonNames expansion logic |
apps/cli/tests/unit/lib/package-json-generator.test.ts |
Unit tests for prettier/eslint-prettier package.json generation in single and turborepo |
apps/cli/tests/integration/cli.test.ts |
Integration tests verifying end-to-end prettier and eslint-prettier scaffolding |
apps/cli/templates/project/linter/prettier/__prettierrc.hbs |
New Prettier configuration template with Tailwind plugin |
apps/cli/templates/project/linter/prettier/__prettierignore.hbs |
New Prettier ignore patterns template |
apps/cli/templates/project/linter/eslint/eslint.config.mjs.tanstack-start.hbs |
Adds conditional eslint-config-prettier integration for single-repo configs |
apps/cli/templates/project/linter/eslint/eslint.config.mjs.nextjs.hbs |
Adds conditional eslint-config-prettier integration for single-repo configs |
apps/cli/templates/project/linter/eslint/eslint.config.mjs.hono.hbs |
Adds conditional eslint-config-prettier integration for single-repo configs |
apps/cli/templates/project/linter/eslint/eslint.config.mjs.expo.hbs |
Adds conditional eslint-config-prettier integration for single-repo configs |
apps/cli/templates/project/linter/eslint/base.js.hbs |
Adds conditional eslint-config-prettier integration for turborepo base config |
apps/cli/src/types/meta.ts |
Adds optional compose field to MetaAddon interface |
apps/cli/src/lib/template-resolver.ts |
Adds resolveAddonNames helper and updates linter resolution to expand composite addons |
apps/cli/src/lib/package-json-generator.ts |
Adds resolveCompositeAddons and updates package generation to merge composite addon dependencies |
apps/cli/src/__meta__.ts |
Adds prettier and eslint-prettier options, updates linter prompt label |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
eslint-plugin-react@7.37.5 does not yet support ESLint 10 (released 2026-02-07). Downgrade to ESLint 9.x until plugin ecosystem catches up.
…o ESLint ignores
\{\{ is not valid Handlebars escaping — backslashes pass through literally.
Use \{{ which escapes the full opening delimiter.
Also ignore next.config.* in ESLint nextjs config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prettierandeslint-prettieras code quality options alongside Biome and ESLintcomposefield on MetaAddon) soeslint-prettierexpands into botheslintandprettierfor template resolution and package.json generationChanges
Source (4 files):
types/meta.ts— Addcompose?: string[]to MetaAddon__meta__.ts— Addprettierandeslint-prettieroptions, update prompt labeltemplate-resolver.ts— AddresolveAddonNames(), update linter resolution to loop through composed addonspackage-json-generator.ts— AddresolveCompositeAddons(), handle composite expansion in app/root/package generationTemplates (2 new + 5 modified):
.prettierrcand.prettierignoretemplatesbase.js, per-stack single-repo configs) with conditionaleslint-config-prettierintegrationTests (26 new tests):
resolveAddonNames()expansion, META validation for compose refs, package-json generation for prettier/eslint-prettier in single + turborepo--linter prettierand--linter eslint-prettierfor single + turborepo, verifying files/deps/scripts/template renderingTest plan
--linter prettiersingle repo:.prettierrc,.prettierignoreat root, prettier deps + scripts in package.json--linter prettierturborepo: same files at root, deps in root package.json--linter eslint-prettiersingle repo: ESLint config with prettier import, Prettier configs, all deps merged flat--linter eslint-prettierturborepo:packages/eslint-config/witheslint-config-prettier, Prettier at root, per-app thin ESLint configs--linter biomeand--linter eslintunchanged (no regression)