Skip to content

feat: add Prettier integration with composite addon pattern#76

Merged
plvo merged 8 commits intomainfrom
feat/prettier-integration
Feb 13, 2026
Merged

feat: add Prettier integration with composite addon pattern#76
plvo merged 8 commits intomainfrom
feat/prettier-integration

Conversation

@plvo
Copy link
Owner

@plvo plvo commented Feb 12, 2026

Summary

  • Adds prettier and eslint-prettier as code quality options alongside Biome and ESLint
  • Introduces composite addon pattern (compose field on MetaAddon) so eslint-prettier expands into both eslint and prettier for template resolution and package.json generation
  • Renames linter prompt from "Choose a linter?" to "Code quality tools?" to reflect the broader scope

Changes

Source (4 files):

  • types/meta.ts — Add compose?: string[] to MetaAddon
  • __meta__.ts — Add prettier and eslint-prettier options, update prompt label
  • template-resolver.ts — Add resolveAddonNames(), update linter resolution to loop through composed addons
  • package-json-generator.ts — Add resolveCompositeAddons(), handle composite expansion in app/root/package generation

Templates (2 new + 5 modified):

  • New: .prettierrc and .prettierignore templates
  • Modified: All ESLint configs (base.js, per-stack single-repo configs) with conditional eslint-config-prettier integration

Tests (26 new tests):

  • Unit: resolveAddonNames() expansion, META validation for compose refs, package-json generation for prettier/eslint-prettier in single + turborepo
  • Integration: --linter prettier and --linter eslint-prettier for single + turborepo, verifying files/deps/scripts/template rendering

Test plan

  • All 238 tests pass (212 baseline + 26 new), 0 failures
  • --linter prettier single repo: .prettierrc, .prettierignore at root, prettier deps + scripts in package.json
  • --linter prettier turborepo: same files at root, deps in root package.json
  • --linter eslint-prettier single repo: ESLint config with prettier import, Prettier configs, all deps merged flat
  • --linter eslint-prettier turborepo: packages/eslint-config/ with eslint-config-prettier, Prettier at root, per-app thin ESLint configs
  • --linter biome and --linter eslint unchanged (no regression)

plvo added 4 commits February 12, 2026 16:51
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.
@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
create-faster-www Ready Ready Preview, Comment Feb 13, 2026 11:02am

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 compose field on MetaAddon type to enable composite addons that expand into multiple constituent addons
  • Adds prettier (formatter-only) and eslint-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>
plvo added 2 commits February 13, 2026 11:46
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.
@plvo plvo merged commit e974132 into main Feb 13, 2026
5 checks passed
@plvo plvo deleted the feat/prettier-integration branch February 13, 2026 11:10
@github-actions github-actions bot mentioned this pull request Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant