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] no-unknown-property support new precedence prop #3829

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

acusti
Copy link
Contributor

@acusti acusti commented Sep 19, 2024

Fixes #3827

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.

This looks great, except that we should only be supporting this property when the react version is 19+.

@ljharb ljharb marked this pull request as draft September 23, 2024 19:31
@acusti
Copy link
Contributor Author

acusti commented Oct 19, 2024

@ljharb is there a way to accommodate that in the plugin, or does that just mean not adding it until there is a version of the plugin released only for react v19+?

@ljharb
Copy link
Member

ljharb commented Oct 20, 2024

@acusti there is! see the testReactVersion function

@acusti acusti force-pushed the no-unknown-property-precedence branch from f57bd9f to 500112b Compare October 22, 2024 04:57
@acusti acusti force-pushed the no-unknown-property-precedence branch 3 times, most recently from df4f665 to ac007b6 Compare October 22, 2024 06:08
@acusti acusti marked this pull request as ready for review October 22, 2024 06:08
@acusti
Copy link
Contributor Author

acusti commented Dec 9, 2024

@ljharb now that React v19 stable is released, i can update the version checks and test settings to specify 19.0.0 as the minimum version (rather than the prerelease friendly 19.0.0-0 or release-candidate-compatible 19.0.0-rc.0). would that be preferable?

update: i went ahead and made that change because it’s cleaner and simpler and i don’t imagine there will be any need to support react 19 prereleases/RCs in the future.

@acusti acusti force-pushed the no-unknown-property-precedence branch 4 times, most recently from 63b0535 to 9bb6f62 Compare December 9, 2024 16:07
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.69%. Comparing base (d5da0a6) to head (9bb6f62).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3829      +/-   ##
==========================================
- Coverage   97.80%   97.69%   -0.11%     
==========================================
  Files         136      136              
  Lines        9977     9979       +2     
  Branches     3699     3700       +1     
==========================================
- Hits         9758     9749       -9     
- Misses        219      230      +11     

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

@ljharb ljharb force-pushed the no-unknown-property-precedence branch from 9bb6f62 to c948e48 Compare December 9, 2024 21:13
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.

Thanks! I rebased and refactored the function a bit. LGTM once I get tests to pass.

@ljharb ljharb force-pushed the no-unknown-property-precedence branch from c948e48 to 66ae4c1 Compare December 9, 2024 21:55
@ljharb ljharb merged commit 66ae4c1 into jsx-eslint:master Dec 9, 2024
400 checks passed
@acusti
Copy link
Contributor Author

acusti commented Dec 10, 2024

wonderful! thanks for reviewing, refactoring, and merging it.

cswimr pushed a commit to cswimr/gauntlet-cswimr-plugins that referenced this pull request Dec 27, 2024
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 ([#&#8203;3833][] [@&#8203;ljharb](https://github.com/ljharb))
-   \[Fix] types: correct generated type declaration ([#&#8203;3840][] [@&#8203;ocavue](https://github.com/ocavue))
-   \[`no-unknown-property`]: support `precedence` prop in react 19 ([#&#8203;3829][] [@&#8203;acusti](https://github.com/acusti))
-   \[`prop-types`]: props missing in validation when using generic types from a namespace import ([#&#8203;3859][] [@&#8203;rbondoc96](https://github.com/rbondoc96))

##### Changed

-   \[Tests] \[`jsx-no-script-url`]: Improve tests ([#&#8203;3849][] [@&#8203;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`] ([#&#8203;3841][] [@&#8203;bastiendmt](https://github.com/bastiendmt))

[7.37.3]: jsx-eslint/eslint-plugin-react@v7.37.2...v7.37.3

[#&#8203;3859]: jsx-eslint/eslint-plugin-react#3859

[#&#8203;3849]: jsx-eslint/eslint-plugin-react#3849

[#&#8203;3841]: jsx-eslint/eslint-plugin-react#3841

[#&#8203;3840]: jsx-eslint/eslint-plugin-react#3840

[#&#8203;3833]: jsx-eslint/eslint-plugin-react#3833

[#&#8203;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]>
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]: Unknown property 'precedence' found (react/no-unknown-property)
2 participants