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(linter/jest): fixer for prefer-jest-mocked creates invalid LHS expressions #5243

Conversation

camc314
Copy link
Collaborator

@camc314 camc314 commented Aug 26, 2024

closes #5228

interestingly eslint-plugin-jest reports an error on this code, it also immedietly fixes it.
however fixing here is not good as it results in invalid code.

should fix https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/10518058484/job/29247525457

Copy link
Collaborator Author

camc314 commented Aug 26, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @camc314 and the rest of your teammates on Graphite Graphite

@github-actions github-actions bot added the A-linter Area - Linter label Aug 26, 2024
@camc314 camc314 marked this pull request as ready for review August 26, 2024 17:16
@camc314 camc314 requested a review from DonIsaac August 26, 2024 17:17
Copy link

graphite-app bot commented Aug 26, 2024

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

Add the label “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.

Copy link

codspeed-hq bot commented Aug 26, 2024

CodSpeed Performance Report

Merging #5243 will not alter performance

Comparing c/08-26-fix_jest_linter_bug_in_fixer_for_prefer-jest-mocked_ (b39544e) with main (bc59dd2)

Summary

✅ 29 untouched benchmarks

@DonIsaac DonIsaac changed the title fix(jest/linter) bug in fixer for prefer-jest-mocked fix(linter/jest): fixer for prefer-jest-mocked creates invalid LHS expressions Aug 27, 2024
@DonIsaac DonIsaac added the C-bug Category - Bug label Aug 27, 2024
@DonIsaac DonIsaac added the 0-merge Merge with Graphite Merge Queue label Aug 27, 2024
Copy link

graphite-app bot commented Aug 27, 2024

Merge activity

  • Aug 26, 8:41 PM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 26, 8:41 PM EDT: DonIsaac added this pull request to the Graphite merge queue.
  • Aug 26, 8:44 PM EDT: DonIsaac merged this pull request with the Graphite merge queue.

…expressions (#5243)

closes #5228

interestingly `eslint-plugin-jest` reports an error on this code, it also immedietly fixes it.
however fixing here is not good as it results in invalid code.

should fix https://github.com/oxc-project/oxlint-ecosystem-ci/actions/runs/10518058484/job/29247525457
@DonIsaac DonIsaac force-pushed the c/08-26-fix_jest_linter_bug_in_fixer_for_prefer-jest-mocked_ branch from ed8aad3 to b39544e Compare August 27, 2024 00:42
@graphite-app graphite-app bot merged commit b39544e into main Aug 27, 2024
24 checks passed
@graphite-app graphite-app bot deleted the c/08-26-fix_jest_linter_bug_in_fixer_for_prefer-jest-mocked_ branch August 27, 2024 00:44
Boshen added a commit that referenced this pull request Aug 29, 2024
## [0.9.1] - 2024-08-29

### Features

- 6633972 linter: Add fixer for `no-empty` (#5276) (camc314)
- a58e448 linter/eslint: Add fixer to `no-var` (#5144) (camc314)
- a6e9769 linter/jsx-a11y: Add `label-has-associated-control` (#5163)
(Billy Levin)
- c8e8532 linter/unicorn: Add fixer to `throw-new-error` (#5275)
(camc314)
- 7ccde4b linter/unicorn: Add fixer to `prefer-date-now` (#5147)
(camc314)

### Bug Fixes

- 76e86f8 linter: Eslint-plugin-unicorn prefer-spread wrong linter
suggestion on variables of type string (#5265) (Arian94)
- b39544e linter/jest: Fixer for `prefer-jest-mocked` creates invalid
LHS expressions (#5243) (camc314)
- 9953fa5 linter/no-null: Incorrect fixer for `NullLiteral` within
`ReturnStatement` (#5247) (Dunqing)
- 318479e linter/no-unused-vars: Mark the class/function in the new
expression as used (#5306) (magic-akari)

### Refactor

- fa1d460 linter: Clean up Fixer and Message (#5308) (DonIsaac)

Co-authored-by: Boshen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(linter) bug in fixer for prefer-jest-mocked
2 participants