Skip to content

fix(linter): Update react/jsx-max-depth to raise an error if provided invalid config options.#18105

Merged
graphite-app[bot] merged 1 commit intomainfrom
jsx-max-depth-rule-valid
Jan 17, 2026
Merged

fix(linter): Update react/jsx-max-depth to raise an error if provided invalid config options.#18105
graphite-app[bot] merged 1 commit intomainfrom
jsx-max-depth-rule-valid

Conversation

@connorshea
Copy link
Member

This was not handled by #18104 as the rule was using a slightly different pattern for the from_configuration method compared to other rules, so it was missed by the scripts I used.

Also add docs, why not.

Copilot AI review requested due to automatic review settings January 17, 2026 00:25
@connorshea connorshea requested a review from camc314 as a code owner January 17, 2026 00:25
@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Jan 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the react/jsx-max-depth linter rule to properly raise errors when provided with invalid configuration options. The fix was missed in #18104 because this rule used a slightly different pattern in its from_configuration method. The PR also adds documentation for the configuration field.

Changes:

  • Added deny_unknown_fields attribute to reject unknown configuration fields
  • Added documentation for the max configuration field
  • Updated from_configuration to properly propagate errors instead of silently defaulting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 17, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 41 skipped benchmarks1


Comparing jsx-max-depth-rule-valid (761ef73) with main (c7e7008)

Open in CodSpeed

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@connorshea connorshea added the 0-merge Merge with Graphite Merge Queue label Jan 17, 2026
Copy link
Member Author

connorshea commented Jan 17, 2026

Merge activity

… invalid config options. (#18105)

This was not handled by #18104 as the rule was using a slightly different pattern for the from_configuration method compared to other rules, so it was missed by the scripts I used.

Also add docs, why not.
@graphite-app graphite-app bot force-pushed the jsx-max-depth-rule-valid branch from 761ef73 to 5f98e1a Compare January 17, 2026 02:13
@graphite-app graphite-app bot merged commit 5f98e1a into main Jan 17, 2026
21 checks passed
@graphite-app graphite-app bot deleted the jsx-max-depth-rule-valid branch January 17, 2026 02:19
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments