Skip to content

feat(linter): add react/jsx-props-no-spreading rule#15769

Merged
camc314 merged 7 commits intooxc-project:mainfrom
baevm:react/jsx-props-no-spreading
Dec 10, 2025
Merged

feat(linter): add react/jsx-props-no-spreading rule#15769
camc314 merged 7 commits intooxc-project:mainfrom
baevm:react/jsx-props-no-spreading

Conversation

@baevm
Copy link
Copy Markdown
Contributor

@baevm baevm commented Nov 17, 2025

added react/jsx-props-no-spreading rule, issue #1022

rule doc
rule source

Copilot AI review requested due to automatic review settings November 17, 2025 07:55
@baevm baevm requested a review from camc314 as a code owner November 17, 2025 07:55
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app bot commented Nov 17, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Nov 17, 2025
Copy link
Copy Markdown
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 implements the react/jsx-props-no-spreading ESLint rule, which disallows JSX prop spreading to improve code readability and maintainability.

  • Adds new linting rule with configurable options for HTML tags, custom components, explicit spreads, and exceptions
  • Includes comprehensive test coverage with 10 passing and 13 failing test cases
  • Properly integrates the rule into the linter's rule registry and runner system

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 4 comments.

File Description
crates/oxc_linter/src/rules/react/jsx_props_no_spreading.rs Core rule implementation with configuration parsing, tag classification logic, and comprehensive test suite
crates/oxc_linter/src/rules.rs Adds module declaration and registers the new rule in the lint rules list
crates/oxc_linter/src/generated/rule_runner_impls.rs Implements RuleRunner trait to integrate the rule with JSXSpreadAttribute AST node type
crates/oxc_linter/src/snapshots/react_jsx_props_no_spreading.snap Snapshot file containing expected diagnostic output for test cases

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

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 17, 2025

CodSpeed Performance Report

Merging #15769 will not alter performance

Comparing baevm:react/jsx-props-no-spreading (83890a5) with main (a1d9bbd)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (32b641a) during the generation of this report, so a1d9bbd was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 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.

@camc314 camc314 force-pushed the react/jsx-props-no-spreading branch from afedc41 to 7893585 Compare December 10, 2025 14:32
@camc314 camc314 force-pushed the react/jsx-props-no-spreading branch from 99877b0 to 62bd6ee Compare December 10, 2025 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants