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

feat(linter/oxc): add fixer for erasing-op #5377

Merged

Conversation

camc314
Copy link
Contributor

@camc314 camc314 commented Aug 31, 2024

adds a fixer for erasing-op (replace the binary expression with 0)

Copy link

graphite-app bot commented Aug 31, 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
Contributor Author

camc314 commented Aug 31, 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 31, 2024
@camc314 camc314 marked this pull request as ready for review August 31, 2024 19:08
Copy link

codspeed-hq bot commented Aug 31, 2024

CodSpeed Performance Report

Merging #5377 will not alter performance

Comparing c/08-31-feat_linter_oxc_add_fixer_for_erasing-op_ (b846432) with main (2ccbd93)

Summary

✅ 28 untouched benchmarks

@DonIsaac
Copy link
Contributor

While this is semantically equivalent, do you think it best fits the programmer's intent? And should it really be a fix instead of a suggestion?

@Boshen Boshen changed the base branch from c/08-31-refactor_linter_oxc_update_rule_docs_for_erasing-op_ to graphite-base/5377 September 1, 2024 06:23
@Boshen Boshen force-pushed the graphite-base/5377 branch from e3e06c1 to 2499cb9 Compare September 1, 2024 06:25
@Boshen Boshen force-pushed the c/08-31-feat_linter_oxc_add_fixer_for_erasing-op_ branch from 3fce80f to 75c87fc Compare September 1, 2024 06:25
@Boshen Boshen changed the base branch from graphite-base/5377 to main September 1, 2024 06:26
@Boshen Boshen force-pushed the c/08-31-feat_linter_oxc_add_fixer_for_erasing-op_ branch from 75c87fc to af61b06 Compare September 1, 2024 06:26
@camc314 camc314 force-pushed the c/08-31-feat_linter_oxc_add_fixer_for_erasing-op_ branch from af61b06 to d002d11 Compare September 1, 2024 11:37
@camc314
Copy link
Contributor Author

camc314 commented Sep 1, 2024

While this is semantically equivalent, do you think it best fits the programmer's intent? And should it really be a fix instead of a suggestion?

converted it to a suggestion

@DonIsaac
Copy link
Contributor

DonIsaac commented Sep 2, 2024

CC: @mysteryven

@DonIsaac DonIsaac added the C-enhancement Category - New feature or request label Sep 2, 2024
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Sep 3, 2024
Copy link

graphite-app bot commented Sep 3, 2024

Merge activity

  • Sep 2, 8:46 PM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 2, 8:46 PM EDT: Boshen added this pull request to the Graphite merge queue.
  • Sep 2, 8:50 PM EDT: Boshen merged this pull request with the Graphite merge queue.

adds a fixer for `erasing-op` (replace the binary expression with `0`)
@Boshen Boshen force-pushed the c/08-31-feat_linter_oxc_add_fixer_for_erasing-op_ branch from d002d11 to b846432 Compare September 3, 2024 00:47
@graphite-app graphite-app bot merged commit b846432 into main Sep 3, 2024
23 checks passed
@graphite-app graphite-app bot deleted the c/08-31-feat_linter_oxc_add_fixer_for_erasing-op_ branch September 3, 2024 00:50
@mysteryven
Copy link
Contributor

CC: mysteryven

I think I missed many things recently, I have some chores to do, now I'm house hunting and moving, I may back after Sep.18 :(

@DonIsaac
Copy link
Contributor

DonIsaac commented Sep 3, 2024

CC: mysteryven

I think I missed many things recently, I have some chores to do, now I'm house hunting and moving, I may back after Sep.18 :(

That's so exciting! Best of luck!

@oxc-bot oxc-bot mentioned this pull request Sep 7, 2024
Boshen added a commit that referenced this pull request Sep 7, 2024
## [0.9.3] - 2024-09-07

### Features

- be3a432 linter: Implement typescript/no-magic-numbers (#4745)
(Alexander S.)
- 09aa86d linter/eslint: Implement `sort-vars` rule (#5430) (Jelle van
der Waa)
- 2ec2f7d linter/eslint: Implement no-alert (#5535) (Edwin Lim)
- a786acf linter/import: Add no-dynamic-require rule (#5389) (Jelle van
der Waa)
- 4473779 linter/node: Implement no-exports-assign (#5370) (dalaoshu)
- b846432 linter/oxc: Add fixer for `erasing-op` (#5377) (camc314)
- aff2c71 linter/react: Implement `self-closing-comp` (#5415) (Jelle van
der Waa)

### Bug Fixes

- 0df1d9d ast, codegen, linter: Panics in fixers. (#5431) (rzvxa)
- cdd1a91 linter: Typescript/no-magic-numbers: remove double minus for
reporting negative bigint numbers (#5565) (Alexander S.)
- ff88c1f linter: Don't mark binding rest elements as unused in TS
function overloads (#5470) (Cam McHenry)
- 088733b linter: Handle loops in `getter-return` rule (#5517) (Cam
McHenry)
- 82c0a16 linter: `tree_shaking/no_side_effects_in_initialization`
handle JSX correctly (#5450) (overlookmotel)
- 6285a02 linter: `eslint/radix` rule correctly check for unbound
symbols (#5446) (overlookmotel)
- c8ab353 linter/tree-shaking: Align JSXMemberExpression's report
(#5548) (mysteryven)
- 5187f38 linter/tree-shaking: Detect the correct export symbol
resolution (#5467) (mysteryven)

### Performance

- 8170954 linter/react: Add should_run conditions for react rules
(#5402) (Jelle van der Waa)

### Documentation

- a540215 linter: Update docs `Examples` for linter rules (#5513)
(dalaoshu)
- 7414190 linter: Update docs `Example` for linter rules (#5479)
(heygsc)

### Refactor

- 0ac420d linter: Use meaningful names for diagnostic parameters (#5564)
(Don Isaac)
- 81a394d linter: Deduplicate code in `oxc/no-async-await` (#5549)
(DonIsaac)
- 979c16c linter: Reduce nested if statements in
eslint/no_this_before_super (#5485) (IWANABETHATGUY)
- 1d3e973 linter: Simplify `eslint/radix` rule (#5445) (overlookmotel)
- fdb8857 linter: Use "parsed pattern" in `no_div_regex` rule. (#5417)
(rzvxa)
- 2ccbd93 linter: `react/jsx_no_undef` rule `get_member_ident` do not
return Option (#5411) (overlookmotel)

### Styling

- 2a43fa4 linter: Introduce the writing style from PR #5491 and reduce
the if nesting (#5512) (dalaoshu)- d8b29e7 Add trailing line breaks to
JSON files (#5544) (overlookmotel)- 694f032 Add trailing line breaks to
`package.json` files (#5542) (overlookmotel)

### Testing

- 340b535 linter/no-unused-vars: Arrow functions in tagged templates
(#5510) (Don Isaac)
- af69393 linter/no-useless-spread: Ensure spreads on identifiers pass
(#5561) (DonIsaac)- dc92489 Add trailing line breaks to conformance
fixtures (#5541) (overlookmotel)

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-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants