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): fixer for no-debugger creates incorrect code #4184

Conversation

DonIsaac
Copy link
Collaborator

@DonIsaac DonIsaac commented Jul 11, 2024

Part of #4179.

Fixes cases like:

if (foo) debugger
// got fixed into
if (foo)
// but now gets fixed to
if (foo) {}

Copy link

graphite-app bot commented Jul 11, 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
Collaborator Author

DonIsaac commented Jul 11, 2024

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

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

@DonIsaac DonIsaac added C-enhancement Category - New feature or request A-linter Area - Linter labels Jul 11, 2024
@DonIsaac DonIsaac marked this pull request as ready for review July 11, 2024 02:42
Copy link

codspeed-hq bot commented Jul 11, 2024

CodSpeed Performance Report

Merging #4184 will not alter performance

Comparing don/07-10-fix_linter_fixer_for_no-debugger_creates_incorrect_code (e9ad03b) with main (7ec0c0b)

Summary

✅ 31 untouched benchmarks

@DonIsaac DonIsaac requested a review from mysteryven July 11, 2024 03:52
@Boshen Boshen added the merge label Jul 11, 2024
Copy link

graphite-app bot commented Jul 11, 2024

Merge activity

  • Jul 11, 12:32 AM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jul 11, 12:32 AM EDT: Boshen added this pull request to the Graphite merge queue.
  • Jul 11, 12:39 AM EDT: Boshen merged this pull request with the Graphite merge queue.

Part of #4179.

Fixes cases like:
```js
if (foo) debugger
// got fixed into
if (foo)
// but now gets fixed to
if (foo) {}
```
@Boshen Boshen force-pushed the don/07-10-feat_linter_add_fixer_for_jsx-a11y/aria-props branch from efed477 to 278c3e9 Compare July 11, 2024 04:34
@Boshen Boshen force-pushed the don/07-10-fix_linter_fixer_for_no-debugger_creates_incorrect_code branch from 60506aa to e9ad03b Compare July 11, 2024 04:34
@Boshen Boshen changed the base branch from don/07-10-feat_linter_add_fixer_for_jsx-a11y/aria-props to main July 11, 2024 04:37
@graphite-app graphite-app bot merged commit e9ad03b into main Jul 11, 2024
26 checks passed
@graphite-app graphite-app bot deleted the don/07-10-fix_linter_fixer_for_no-debugger_creates_incorrect_code branch July 11, 2024 04:39
@github-actions github-actions bot mentioned this pull request Jul 11, 2024
Boshen added a commit that referenced this pull request Jul 11, 2024
## [0.6.0] - 2024-07-11

- 5731e39 ast: [**BREAKING**] Store span details inside comment struct
(#4132) (Luca Bruno)

### Features

- fb549e1 linter: Add vitest/no-focused-tests rule (#4178) (mysteryven)
- 6c49007 linter: Add fixer for
@typescript-eslint/consistent-type-imports (#3984) (mysteryven)
- 278c3e9 linter: Add fixer for jsx-a11y/aria-props (#4176) (DonIsaac)
- 2188144 linter: Eslint-plugin-jest/prefer-hooks-in-order (#4052)
(cinchen)
- cc58614 linter: Better schemas for allow/warn/deny (#4150) (DonIsaac)
- c5b4be0 linter: Add fixer for prefer-node-protocol (#4129) (DonIsaac)
- 7ec0c0b linter/eslint: Implement no-label-var (#4087) (Jelle van der
Waa)

### Bug Fixes

- ed4c54c eslint/radix: Detect yield Number.parseInt variant (#4110)
(Jelle van der Waa)
- e9ad03b linter: Fixer for no-debugger creates incorrect code (#4184)
(DonIsaac)
- bd69571 linter: Fix top level return panic in
eslint/array_callback_return (#4167) (Boshen)
- c8f5664 linter: Fix panic with unicode in
unicorn/prefer_dom_node_dataset (#4166) (Boshen)
- f2b3273 linter: Fix fixer panic in
typescript/consistent_indexed_object_style (#4165) (Boshen)
- 2334515 linter: Panic in `get_enclosing_function` (#4121) (DonIsaac)
- 1b91d40 linter: Incorrect fixer for `no-unused-labels` (#4123) (Don
Isaac)
- 1729249 linter: Incorrect fix in
`no-single-promise-in-promise-methods` rule; (#4094) (DonIsaac)
- cc7e893 linter/tree-shaking: Avoid recursive function stackoverflow
(#4191) (mysteryven)
- 28eeee0 parser: Fix asi error diagnostic pointing at invalid text
causing crash (#4163) (Boshen)
- 0f02608 semantic: Bind `TSImportEqualsDeclaration`s (#4100) (Don
Isaac)

### Performance

- ddfa343 diagnostic: Use `Cow<'static, str>` over `String` (#4175)
(DonIsaac)

### Refactor

- 2687ebc react: Use find_binding helper for finding React binding
(#4108) (Jelle van der Waa)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
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 merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants