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

test(linter): port react-jsx-uses-vars rules to no_unused_vars #7731

Merged
merged 2 commits into from
Dec 8, 2024

Conversation

taearls
Copy link
Contributor

@taearls taearls commented Dec 8, 2024

I added the test cases from eslint-plugin-react/jsx-uses-vars to a react.rs file in the no_unused_vars tests module.

After adding the new tests, they immediately passed without any source code changes required. It would seem that the linter already supported this rule, but now there will be tests to support it.

Copy link

graphite-app bot commented Dec 8, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

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

@github-actions github-actions bot added A-linter Area - Linter C-enhancement Category - New feature or request labels Dec 8, 2024
Copy link

codspeed-hq bot commented Dec 8, 2024

CodSpeed Performance Report

Merging #7731 will not alter performance

Comparing taearls:tyler/linter-react-jsx-uses-vars (afab159) with main (48b1e4a)

Summary

✅ 29 untouched benchmarks

Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

thank you!

@camc314 camc314 changed the title feat(linter): augment no_unused_vars rule to support react-jsx-uses-vars test(linter): port react-jsx-uses-vars rules to no_unused_vars Dec 8, 2024
@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Dec 8, 2024
@camc314 camc314 merged commit 62f0a22 into oxc-project:main Dec 8, 2024
26 checks passed
Boshen added a commit that referenced this pull request Dec 10, 2024
## [0.15.0] - 2024-12-10

- 39b9c5d linter: [**BREAKING**] Remove unmaintained security plugin
(#7773) (Boshen)

### Features

- 065f7dc linter: Support `expectTypeOf`, `assert` and `assertType` in
`vitest/expect-expect` (#7742) (Yuichiro Yamashita)
- 3d5f0a1 linter/no_restricted_imports: Add the no_restricted_imports
rules (#7629) (Guillaume Piedigrossi)

### Bug Fixes

- ad27b20 linter: Only resolve esm files for import plugin (#7720)
(Boshen)
- 5e6053f linter: False positive in `eslint/yoda` (#7719) (dalaoshu)

### Refactor

- c6a19aa linter: Remove unused `serde` features (#7738) (Boshen)
- b9a2b35 linter: Remove `aho-corasick` (#7718) (Boshen)

### Testing

- 62f0a22 linter: Port `react-jsx-uses-vars` rules to no_unused_vars
(#7731) (Tyler Earls)
- 02f9903 linter: Add regression tests for `import/namespace` (#7723)
(dalaoshu)

Co-authored-by: Boshen <[email protected]>
@taearls taearls deleted the tyler/linter-react-jsx-uses-vars branch January 11, 2025 14:29
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 C-test Category - Testing. Code is missing test cases, or a PR is adding them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants