Skip to content

chore(prettier): Ignore .gitignored files in test-project#1051

Merged
Tobbe merged 1 commit intomainfrom
tobbe-test-project-prettier-ignore
Jan 26, 2026
Merged

chore(prettier): Ignore .gitignored files in test-project#1051
Tobbe merged 1 commit intomainfrom
tobbe-test-project-prettier-ignore

Conversation

@Tobbe
Copy link
Member

@Tobbe Tobbe commented Jan 26, 2026

Workaround for prettier/prettier#4081

If/when we switch over to oxc-format we won't need this anymore oxc-project/oxc#17352

@netlify
Copy link

netlify bot commented Jan 26, 2026

Deploy Preview for cedarjs canceled.

Name Link
🔨 Latest commit 07ae0a7
🔍 Latest deploy log https://app.netlify.com/projects/cedarjs/deploys/6977e0ecfa0b810008452556

@Tobbe Tobbe merged commit c779269 into main Jan 26, 2026
11 of 12 checks passed
@Tobbe Tobbe deleted the tobbe-test-project-prettier-ignore branch January 26, 2026 21:47
@github-actions github-actions bot added this to the chore milestone Jan 26, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 26, 2026

Greptile Overview

Greptile Summary

This PR adds explicit Prettier ignore patterns for files in test-project/ that are already ignored by the nested .gitignore file. This is a workaround for Prettier's limitation where it doesn't respect nested .gitignore files (GitHub issue #4081).

The changes add three ignore patterns:

  • /test-project/.redwood/ - Generated Redwood framework directory
  • /test-project/api/types/graphql.d.ts - Auto-generated GraphQL type definitions
  • /test-project/web/types/graphql.d.ts - Auto-generated GraphQL type definitions

All three patterns correctly mirror the patterns in test-project/.gitignore, ensuring Prettier doesn't format auto-generated files that should be ignored. The PR description notes this workaround can be removed when switching to oxc-format, which natively supports nested gitignore files.

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a simple configuration change that only adds ignore patterns to .prettierignore. The patterns correctly mirror the nested .gitignore file, preventing Prettier from formatting auto-generated files. No functional code changes or breaking changes are introduced.
  • No files require special attention

Important Files Changed

Filename Overview
.prettierignore Added explicit ignore patterns for test-project files already ignored by nested .gitignore as workaround for Prettier limitation

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Prettier as Prettier CLI
    participant RootIgnore as .prettierignore
    participant NestedIgnore as test-project/.gitignore
    participant Files as test-project files

    Dev->>Prettier: Run prettier format
    Prettier->>RootIgnore: Read root .prettierignore
    Note over Prettier,NestedIgnore: Prettier doesn't respect<br/>nested .gitignore files<br/>(Issue #4081)
    Prettier->>NestedIgnore: ❌ Cannot read nested .gitignore
    Note over RootIgnore: Workaround: Explicitly list<br/>nested gitignore patterns<br/>in root .prettierignore
    RootIgnore-->>Prettier: Skip /test-project/.redwood/<br/>Skip /test-project/api/types/graphql.d.ts<br/>Skip /test-project/web/types/graphql.d.ts
    Prettier->>Files: Format only non-ignored files
    Files-->>Dev: Correctly formatted files
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

No files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@nx-cloud
Copy link

nx-cloud bot commented Jan 26, 2026

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 07ae0a7

Command Status Duration Result
nx run-many -t build:pack --exclude create-ceda... ✅ Succeeded 7s View ↗
nx run-many -t build ✅ Succeeded 6s View ↗
nx run-many -t test --minWorkers=1 --maxWorkers=4 ✅ Succeeded 5s View ↗
nx run-many -t test:types ✅ Succeeded 9s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-26 22:06:41 UTC

@github-actions
Copy link

The changes in this PR are now available in 3.0.0-canary.13242+4b35131eb

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