-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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] prop-types
: props missing in validation when using generic types from a namespace import
#3859
[Fix] prop-types
: props missing in validation when using generic types from a namespace import
#3859
Conversation
…pes from a namespace import
e1eb228
to
b9f70bd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3859 +/- ##
==========================================
- Coverage 97.70% 97.66% -0.05%
==========================================
Files 136 136
Lines 9950 9978 +28
Branches 3685 3703 +18
==========================================
+ Hits 9722 9745 +23
- Misses 228 233 +5 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks great!
b9f70bd
to
b713026
Compare
Glad I could help 🙂 |
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) | devDependencies | patch | [`7.37.2` -> `7.37.3`](https://renovatebot.com/diffs/npm/eslint-plugin-react/7.37.2/7.37.3) | --- ### Release Notes <details> <summary>jsx-eslint/eslint-plugin-react (eslint-plugin-react)</summary> ### [`v7.37.3`](https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/CHANGELOG.md#7373---20241223) [Compare Source](jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3) ##### Fixed - \[`no-danger`]: avoid a crash on a nested component name ([#​3833][] [@​ljharb](https://github.com/ljharb)) - \[Fix] types: correct generated type declaration ([#​3840][] [@​ocavue](https://github.com/ocavue)) - \[`no-unknown-property`]: support `precedence` prop in react 19 ([#​3829][] [@​acusti](https://github.com/acusti)) - \[`prop-types`]: props missing in validation when using generic types from a namespace import ([#​3859][] [@​rbondoc96](https://github.com/rbondoc96)) ##### Changed - \[Tests] \[`jsx-no-script-url`]: Improve tests ([#​3849][] [@​radu2147](https://github.com/radu2147)) - \[Docs] fix broken links: \[`default-props-match-prop-types`], \[`jsx-boolean-value`], \[`jsx-curly-brace-presence`], \[`jsx-no-bind`], \[`no-array-index-key`], \[`no-is-mounted`], \[`no-render-return-value`], \[`require-default-props`] ([#​3841][] [@​bastiendmt](https://github.com/bastiendmt)) [7.37.3]: jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3 [#​3859]: jsx-eslint/eslint-plugin-react#3859 [#​3849]: jsx-eslint/eslint-plugin-react#3849 [#​3841]: jsx-eslint/eslint-plugin-react#3841 [#​3840]: jsx-eslint/eslint-plugin-react#3840 [#​3833]: jsx-eslint/eslint-plugin-react#3833 [#​3829]: jsx-eslint/eslint-plugin-react#3829 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44My40IiwidXBkYXRlZEluVmVyIjoiMzkuODMuNCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==--> Reviewed-on: https://www.coastalcommits.com/cswimr/gauntlet-cswimr-plugins/pulls/9 Co-authored-by: Renovate <[email protected]> Co-committed-by: Renovate <[email protected]>
Description
Fixes #3684.
TypeScript code that uses
ComponentProps
andComponentPropsWithoutRef
from a namespace import (such asimport React from 'react'
orimport * as React from 'react'
) led to destructured props receiving a "is missing in props validation" error.For example: