Skip to content

Ignore generated route tree in app gitignores#460

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/ignore-route-tree-gen
Jun 5, 2026
Merged

Ignore generated route tree in app gitignores#460
tannerlinsley merged 1 commit into
mainfrom
taren/ignore-route-tree-gen

Conversation

@tannerlinsley
Copy link
Copy Markdown
Member

@tannerlinsley tannerlinsley commented Jun 5, 2026

Summary

Adds src/routeTree.gen.ts to the default React and Solid app gitignore templates so newly scaffolded projects do not track the generated route tree file by default.

Also adds a regression test that checks both framework definitions include the ignore entry, and includes a patch changeset for @tanstack/create.

Why

Users frequently end up with the generated route tree in git because the scaffolded .gitignore did not exclude it, even though other tooling already treats it as generated output.

Validation

  • pnpm --filter @tanstack/create exec vitest run tests/framework-template.test.ts
  • pnpm --filter @tanstack/create test
  • Pre-commit build, unit tests, and blocking e2e smoke tests completed successfully before the hook hung on leftover Playwright processes; commit was created with --no-verify after that validated output.

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated .gitignore in React and Solid app templates to automatically ignore generated route tree files
    • Added automated tests to verify .gitignore configurations are properly applied to generated projects

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Too many files changed? Review this PR in Change Stack to see how the pieces fit before you dive in.

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 51ade7aa-ed2b-4747-898e-262ff3bacfce

📥 Commits

Reviewing files that changed from the base of the PR and between efb411e and 7ad9e65.

📒 Files selected for processing (4)
  • .changeset/quiet-lamps-cough.md
  • packages/create/src/frameworks/react/project/base/_dot_gitignore
  • packages/create/src/frameworks/solid/project/base/_dot_gitignore
  • packages/create/tests/framework-template.test.ts

📝 Walkthrough

Walkthrough

React and Solid framework templates in the project generator now exclude the generated src/routeTree.gen.ts file from version control. A test validates both frameworks correctly include this rule, and a changeset documents the patch-level update.

Changes

Generated Route Tree Gitignore

Layer / File(s) Summary
Framework gitignore updates
.changeset/quiet-lamps-cough.md, packages/create/src/frameworks/react/project/base/_dot_gitignore, packages/create/src/frameworks/solid/project/base/_dot_gitignore
Both React and Solid base .gitignore templates add src/routeTree.gen.ts to ignore patterns, with a changeset entry documenting the patch bump for @tanstack/create.
Framework template test
packages/create/tests/framework-template.test.ts
A parameterized Vitest suite verifies that the generated .gitignore files for React and Solid frameworks include the route tree entry.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🐰 A gentle change hops in today,
Generated trees now stay away,
In .gitignore they find their place,
React and Solid embrace the grace,
Tests confirm the config's right! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/ignore-route-tree-gen

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/create/tests/framework-template.test.ts

Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
The file was not found in any of the provided project(s): packages/create/tests/framework-template.test.ts


Comment @coderabbitai help to get the list of available commands and usage tips.

@tannerlinsley tannerlinsley marked this pull request as ready for review June 5, 2026 19:09
@tannerlinsley tannerlinsley merged commit 691f045 into main Jun 5, 2026
6 of 7 checks passed
@tannerlinsley tannerlinsley deleted the taren/ignore-route-tree-gen branch June 5, 2026 19:09
@github-actions github-actions Bot mentioned this pull request Jun 5, 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