Skip to content

docs(config): clarify ignore.overrides covers per-file rule ignore#197

Merged
aidenybai merged 2 commits into
mainfrom
cursor/feat-config-files-by-rule-2f41
May 10, 2026
Merged

docs(config): clarify ignore.overrides covers per-file rule ignore#197
aidenybai merged 2 commits into
mainfrom
cursor/feat-config-files-by-rule-2f41

Conversation

@aidenybai
Copy link
Copy Markdown
Member

Closes #160.

Status

The feature requested by #160 already shipped as ignore.overrides in #165, with the same shape the issue proposed ({ files, rules }[]). The reporter filed at v0.0.47, which predates that feature, so they never saw it. The README's one-line table entry was easy to miss.

Change

Reworks the Configuration section to make the three layers' scopes unambiguous:

  • ignore.rules — silences a rule across the whole codebase
  • ignore.files — silences every rule on the matched files (use sparingly — loses coverage of unrelated rules)
  • ignore.overrides — silences only the listed rules on the matched files, leaving every other rule active. This is the per-file rule ignore from Feature request: per-file rule ignore in react-doctor.config.json #160.

The example now covers two scenarios from the issue's table verbatim:

{
  "ignore": {
    "overrides": [
      { "files": ["components/modules/diff/**"], "rules": ["react-doctor/no-array-index-as-key", "react-doctor/no-render-in-render"] },
      { "files": ["components/search/HighlightedSnippet.tsx"], "rules": ["react/no-danger"] }
    ]
  }
}

No code change needed — the feature is implemented in apply-ignore-overrides.ts and already covered by filter-diagnostics.test.ts (including a multi-entry case with the issue's exact globs).

Open in Web Open in Cursor 

)

The `ignore.overrides` config field already supports per-file rule
ignores with the same shape requested in #160 (`{ files, rules }[]`)
landing in #165 alongside multi-line JSX suppressions. This rewrites
the configuration section so the three nested keys' relative scope is
unambiguous and the example covers two of the scenarios from the
issue (a glob with multiple rules, a specific file with a
single-rule override). No code change needed — the feature is fully
implemented and unit-tested in tests/filter-diagnostics.test.ts.

Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
react-doctor-website Ready Ready Preview, Comment May 10, 2026 4:11am

@reactreview
Copy link
Copy Markdown

reactreview Bot commented May 10, 2026

0 score

0 points vs base

26 errors (0)
⚠️ 261 warnings (0)

Merging this PR does not change React health

Prompt to copy to agent
Run react-doctor and fix the React issues in this PR.

React health score: 0 (0 vs base)
Errors: 26 (0 vs base)
Warnings: 261 (0 vs base)

New issues:
No new issues were introduced. Use the totals above for context.

@aidenybai aidenybai marked this pull request as ready for review May 10, 2026 04:08
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
@aidenybai aidenybai merged commit b501c3b into main May 10, 2026
7 checks passed
@aidenybai aidenybai deleted the cursor/feat-config-files-by-rule-2f41 branch May 10, 2026 04:44
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.

Feature request: per-file rule ignore in react-doctor.config.json

2 participants