Skip to content

fix: add --no-error-on-unmatched-pattern to oxfmt md rule in lint-staged#8085

Merged
ltyu merged 1 commit intomainfrom
le/fix-oxfmt-lintstagedrc
Feb 12, 2026
Merged

fix: add --no-error-on-unmatched-pattern to oxfmt md rule in lint-staged#8085
ltyu merged 1 commit intomainfrom
le/fix-oxfmt-lintstagedrc

Conversation

@ltyu
Copy link
Contributor

@ltyu ltyu commented Feb 12, 2026

Summary

  • Added --no-error-on-unmatched-pattern to the *.md oxfmt rule in .lintstagedrc. oxfmt supports markdown but reads .prettierignore by default, which ignores .changeset/. When the only staged .md file is in an ignored directory, oxfmt exits with "Expected at least one target file", failing the pre-commit hook.
--no-error-on-unmatched-pattern — Do not exit with error when pattern is unmatched                                                                                                  
                                                                                                                                                                                      
  Normally when oxfmt receives a file path but skips it (e.g. because .prettierignore excludes it), it exits with code 2 and "Expected at least one target file." This flag makes it  
  exit 0 instead — a silent no-op when there's nothing to format.  

Drive-by changes

None

Related issues

Introduced in #7973 (prettier-to-oxfmt migration)

Backward compatibility

Yes

Testing

Verified committing .changeset/*.md files no longer fails the pre-commit hook.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The lint-staged configuration has been simplified by removing the Markdown formatting enforcement rule. The *.md pattern and its associated oxfmt --write command have been deleted, so Markdown files will no longer be automatically formatted through the lint-staged pipeline.

Changes

Cohort / File(s) Summary
Configuration Update
.lintstagedrc
Removed Markdown file formatting rule (*.md: oxfmt --write). Markdown files are no longer processed by lint-staged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

Markdown's no longer bound by the linter's rule,
Like an ogre's swamp, sometimes simpler is cool,
No more layers of formatting, one less thing to do,
The config just got cleaner—and that's just true! 🟢

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title claims to add a flag, but the actual change removes the markdown entry entirely from the configuration. Update the title to accurately reflect the change: 'fix: remove unsupported *.md entry from oxfmt lint-staged config' (which matches the PR objectives summary).
Description check ❓ Inconclusive PR description addresses the core issue but doesn't fully match the template structure with clear sections for all required information. Restructure the description to explicitly follow the template with clear ### Description, ### Drive-by changes, ### Related issues, ### Backward compatibility, and ### Testing sections as specified.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch le/fix-oxfmt-lintstagedrc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

oxfmt supports markdown but skips files in .prettierignore (e.g. .changeset/).
When the only staged .md file is ignored, oxfmt exits with an error.
@ltyu ltyu force-pushed the le/fix-oxfmt-lintstagedrc branch from 792af7c to 557605c Compare February 12, 2026 17:45
@ltyu ltyu changed the title fix: remove unsupported *.md entry from oxfmt lint-staged config fix: add --no-error-on-unmatched-pattern to oxfmt md rule in lint-staged Feb 12, 2026
@ltyu ltyu added this pull request to the merge queue Feb 12, 2026
Merged via the queue into main with commit e8832bd Feb 12, 2026
121 checks passed
@ltyu ltyu deleted the le/fix-oxfmt-lintstagedrc branch February 12, 2026 18:59
@github-project-automation github-project-automation bot moved this from In Review to Done in Hyperlane Tasks Feb 12, 2026
ameten added a commit that referenced this pull request Feb 25, 2026
…ttribution

`forge soldeer install --quiet` panics in forge v1.1.0 due to a logger
double-init bug, breaking both `deps:soldeer` and `build-tron.sh`. Since
turbo guarantees dependencies are already installed via task ordering
(build:tron → build → deps:soldeer), the call can safely fall through.

Also fix lint-staged oxfmt rule for JSON files (same issue as #8085)
and disable Co-Authored-By commit attribution for Claude Code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants