docs(config): clarify ignore.overrides covers per-file rule ignore#197
Merged
Conversation
) 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
0 score0 points vs base ❌ 26 errors (0) Merging this PR does not change React health Prompt to copy to agent |
Co-authored-by: Aiden Bai <aidenybai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #160.
Status
The feature requested by #160 already shipped as
ignore.overridesin #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 codebaseignore.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 inreact-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.tsand already covered byfilter-diagnostics.test.ts(including a multi-entry case with the issue's exact globs).