Skip to content

chore: respect .prettierignore in auto-format workflow#31344

Merged
mvvmm merged 1 commit into
productionfrom
chore/prettier-ignore-symlinks-in-auto-format
Jun 9, 2026
Merged

chore: respect .prettierignore in auto-format workflow#31344
mvvmm merged 1 commit into
productionfrom
chore/prettier-ignore-symlinks-in-auto-format

Conversation

@mvvmm

@mvvmm mvvmm commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The auto-format workflow builds an explicit file list from git diff and passes it directly to prettier --write, which bypasses .prettierignore.

Adding --ignore-path .prettierignore makes prettier respect the ignore file even when files are passed explicitly.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @cloudflare/content-engineering, @kodster28, @mvvmm, @colbywhite, @ahaywood, @MohamedH1998

@mvvmm mvvmm marked this pull request as ready for review June 9, 2026 16:04
@mvvmm mvvmm requested review from a team, ahaywood, colbywhite and kodster28 as code owners June 9, 2026 16:04
@mvvmm mvvmm enabled auto-merge (squash) June 9, 2026 16:04
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review

✅ No style-guide issues found in commit 947c8b8.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.

@ask-bonk ask-bonk Bot added the engineering Problems or updates to developers.cloudflare.com website label Jun 9, 2026

@ask-bonk ask-bonk Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Correct and safe change. Explicitly passing ensures the auto-format workflow respects the ignore file even when files are listed explicitly from .

Posted a minor note on the description — in local testing with prettier 3.8.3 the default ignore resolution does work with explicit paths, but making it explicit is harmless and more robust.

@ask-bonk

ask-bonk Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review summary

  • Labels: Added (already had ).
  • Change: Adds to the auto-format workflow so prettier explicitly uses the ignore file when formatting a list of changed files.
  • Issues: None. The change is correct, safe, and already approved by a CODEOWNER. Minor observation: in local testing, prettier 3.8.3 does resolve by default even with explicit file paths, so this change may be a no-op for behavior. However, making it explicit is harmless and guards against future prettier behavior changes or edge cases.

@ask-bonk

ask-bonk Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

I have reviewed PR #31344.

What I did:

  • Read the diff in .github/workflows/auto-format-build.yml: adds --ignore-path .prettierignore to the prettier --write invocation so the ignore file is explicitly respected when files are passed from git diff.
  • Applied labels: Added engineering (size/xs was already present).
  • Posted an approval: The change is correct and safe. It makes the workflow explicitly use the .prettierignore file rather than relying on prettier's implicit resolution.
  • Posted a summary comment on the PR noting that, while the change is harmless and good defensive practice, local testing with prettier 3.8.3 showed that .prettierignore is already respected by default even with explicit file paths, so this may be a no-op for behavior.

Issues flagged: None. The PR is a clean 1-line infrastructure fix, already approved by a CODEOWNER (MohamedH1998), and all status checks are passing.

github run

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@mvvmm mvvmm force-pushed the chore/prettier-ignore-symlinks-in-auto-format branch from f13e832 to 947c8b8 Compare June 9, 2026 16:57
@mvvmm mvvmm merged commit 50e26db into production Jun 9, 2026
12 checks passed
@mvvmm mvvmm deleted the chore/prettier-ignore-symlinks-in-auto-format branch June 9, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engineering Problems or updates to developers.cloudflare.com website size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants