fix(linter): allow underscore-prefixed useState bindings - #25022
Open
Baltsat wants to merge 1 commit into
Open
Conversation
AI-Assisted: Codex User-Request: sustain proven OSS contribution velocity | codex:oss-maintainer-campaign Signed-off-by: Konstantin Baltsat <baltsat2002@mail.ru>
Contributor
|
See also: #24952 (comment) |
Author
|
Yes — both upstream rules currently report these forms. This patch intentionally implements the narrower behavior requested in #24952: only an explicitly So the project-level choice is whether Oxlint wants strict upstream parity here. If it does, #24952 is already expected behavior and this change should not land. If Oxlint wants to recognize the conventional explicit-unused marker, this patch keeps that divergence limited to the two requested positions and locks it with focused cases. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useStategetter or setter as intentionally unused_placeholders and descriptive_unused...names on both tuple positionsFixes #24952.
Proof
react/hook-use-staterule test passedcargo test -p oxc_linter: 1,175 passed, 0 failed, 1 ignored, plus integration tests and doctestsgit diff --checkpassedAI assistance: I used Codex during implementation and test iteration. I reviewed the final one-file diff, the rule behavior, and the complete proof above before submission.