Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] jsx-no-constructed-context-values: detect constructed context values in React 19 <Context> usage #3910

Merged

Conversation

TildaDares
Copy link
Contributor

Fixes #3888

This PR updates the jsx-no-constructed-context-values rule to support React 19-style context providers using the shorthand.

@TildaDares TildaDares changed the title fix(rule): detect constructed context values in React 19 <Context> usage [FIX]: detect constructed context values in React 19 <Context> usage Mar 23, 2025
Copy link

codecov bot commented Mar 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.80%. Comparing base (3fd9b92) to head (915b1a5).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3910      +/-   ##
==========================================
+ Coverage   94.21%   97.80%   +3.59%     
==========================================
  Files         133      133              
  Lines        9966     9991      +25     
  Branches     3703     3715      +12     
==========================================
+ Hits         9389     9772     +383     
+ Misses        577      219     -358     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

there's an uncovered line

@TildaDares
Copy link
Contributor Author

TildaDares commented Mar 24, 2025

The codecov check is stuck, so I can't confirm if the coverage has improved. Is there a way to rerun it without pushing code?

@TildaDares TildaDares force-pushed the jsx-no-constructed-context-react19 branch from 1fe341a to b81c370 Compare March 24, 2025 23:55
@ljharb ljharb force-pushed the jsx-no-constructed-context-react19 branch from b81c370 to ddefdce Compare March 25, 2025 16:02
@ljharb
Copy link
Member

ljharb commented Mar 25, 2025

I had to rebase it anyways, so no worries :-) hopefully it won't be stuck this time. Thanks!

@ljharb ljharb changed the title [FIX]: detect constructed context values in React 19 <Context> usage [Fix] jsx-no-constructed-context-values: detect constructed context values in React 19 <Context> usage Mar 25, 2025
@TildaDares TildaDares force-pushed the jsx-no-constructed-context-react19 branch from 5bf8e89 to 08d3ac8 Compare March 25, 2025 18:19
@ljharb ljharb force-pushed the jsx-no-constructed-context-react19 branch 3 times, most recently from 2f3afb0 to 2428618 Compare March 26, 2025 00:02
@ljharb ljharb merged commit 2428618 into jsx-eslint:master Mar 26, 2025
616 of 617 checks passed
@TildaDares TildaDares deleted the jsx-no-constructed-context-react19 branch March 26, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: jsx-no-constructed-context-values doesn't detect issues when context is used as provider in react v19
2 participants