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

refactor(linter): eslint/no_redeclare rule use run_on_symbol not run_once #5201

Conversation

overlookmotel
Copy link
Collaborator

@overlookmotel overlookmotel commented Aug 25, 2024

eslint/no_redeclare rule iterates over all symbols. Use run_on_symbols for this, instead of run_once.

Copy link

graphite-app bot commented Aug 25, 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

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

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

@github-actions github-actions bot added the A-linter Area - Linter label Aug 25, 2024
@overlookmotel overlookmotel marked this pull request as ready for review August 25, 2024 15:47
Copy link

codspeed-hq bot commented Aug 25, 2024

CodSpeed Performance Report

Merging #5201 will not alter performance

Comparing 08-25-refactor_linter_noredeclare_rule_use_run_on_symbol_not_run_once_ (2a91ef1) with main (8ff6f2c)

Summary

✅ 29 untouched benchmarks

@overlookmotel overlookmotel changed the title refactor(linter): NoRedeclare rule use run_on_symbol not run_once refactor(linter): eslint/no_redeclare rule use run_on_symbol not run_once Aug 25, 2024
@overlookmotel
Copy link
Collaborator Author

overlookmotel commented Aug 25, 2024

I had expected this to produce a small perf gain, as it avoids an extra round of iterating through all symbols, but it's actually showing as marginally slower, rather than faster.

I don't know how much variance there is in linter benchmarks - possible the apparent perf drop is just noise in the benchmark? Or is it likely for real?

@overlookmotel
Copy link
Collaborator Author

I merged main branch in and now benchmark says it's faster! I guess it is just noise in the benchmarks...

@DonIsaac DonIsaac added the 0-merge Merge with Graphite Merge Queue label Aug 25, 2024
Copy link

graphite-app bot commented Aug 25, 2024

Merge activity

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

…`run_once` (#5201)

`eslint/no_redeclare` rule iterates over all symbols. Use `run_on_symbols` for this, instead of `run_once`.
@DonIsaac DonIsaac force-pushed the 08-25-refactor_linter_noredeclare_rule_use_run_on_symbol_not_run_once_ branch from 0295f9e to 2a91ef1 Compare August 25, 2024 21:41
@graphite-app graphite-app bot merged commit 2a91ef1 into main Aug 25, 2024
24 checks passed
@graphite-app graphite-app bot deleted the 08-25-refactor_linter_noredeclare_rule_use_run_on_symbol_not_run_once_ branch August 25, 2024 21:43
@oxc-bot oxc-bot mentioned this pull request Aug 26, 2024
Boshen added a commit that referenced this pull request Aug 26, 2024
## [0.9.0] - 2024-08-26

- 5946748 linter: [**BREAKING**] Parse and display syntax errors for
regular expressions (#5214) (Boshen)

- b894d3b linter: [**BREAKING**] Make `no-unused-vars` correctness
(#5081) (DonIsaac)

### Features

- 1ce9630 linter/config: Implement FromIterator for LintPluginOptions
(#5102) (DonIsaac)
- 34bfaf6 linter/react: Add fixer to `jsx-props-no-spread-multi` (#5145)
(camc314)
- 982bd6e linter/unicorn: Add fixer to `require-array-join-separator`
(#5152) (camc314)
- a6704bd linter/unicorn: Add fixer to `prefer-set-size` (#5149)
(camc314)
- ac7edcc linter/unicorn: Add fixer to `prefer-array-some` (#5153)
(camc314)
- 1d01aa3 linter/unicorn: Add partial fixer for `prefer-array-flat`
(#5143) (camc314)
- 22d57f9 linter/unicorn: Add fixer to `prefer-string-slice` (#5150)
(Cameron)
- 2fe4415 linter/unicorn: Add fixer to `no-redundant-roles` (#5146)
(Cameron)
- d35c6f5 linter/unicorn: Add fixer to `prefer-regexp-test` (#5151)
(Cameron)
- 27db769 linter/unicorn: Add fixer to `text-encoding-identifier-case`
(#5154) (Cameron)
- f7958c4 linter/unicorn: Add prefer-structured-clone (#5095) (Jelle van
der Waa)
- 004ffa0 linter/vitest: Implement `prefer-each` (#5203) (dalaoshu)

### Bug Fixes

- aaaf26c linter: Error in fixer for prefer-to-have-length (#5197)
(dalaoshu)
- 1f5b6b6 linter: Bug in fixer for prefer-to-have-length (#5164)
(dalaoshu)
- 7eb052e linter: `no-hex-escape` fixer removing regex flags (#5137)
(Cameron)
- 76c66b4 linter/max-lines: Point span to end of file for disable
directive to work (#5117) (Boshen)
- 8ff6f2c linter/no-unused-vars: Panic on UsingDeclarations (#5206)
(DonIsaac)
- d29042e linter/no-unused-vars: Function expression in implicit arrow
function return (#5155) (DonIsaac)
- 36e4a28 linter/no-unused-vars: Panic in variable declarator usage
checks (#5160) (DonIsaac)
- ba62a71 linter/react: Fixed false positive with missing key inside
React.Children.toArray() for fragments (#5133) (Earl Chase)
- fd1031a linter/unicorn: Breaking fixer in case statements for
`no-null` (#5176) (DonIsaac)
- 7b86ed6 linter/unicorn: Handle type casts and parens in `no-null`
(#5175) (Don Isaac)
- b629e16 linter/unicorn: Improve diagnostic message for `no-null`
(#5172) (DonIsaac)

### Performance
- ce454cf Use simdutf8 to validate UTF-8 when reading files (#5196)
(dalaoshu)

### Refactor

- 543cad6 codegen: Remove some pub APIs (Boshen)
- 0d3661a linter: Remove meaningless `span0` (#5209) (dalaoshu)
- 2a91ef1 linter: `eslint/no_redeclare` rule use `run_on_symbol` not
`run_once` (#5201) (overlookmotel)
- 33599b0 linter: Split options into multiple files (#5101) (DonIsaac)
- 7ab6152 linter/unicorn: Clean up `no-null` (#5174) (DonIsaac)

### Testing

- a877e5a linter/no-unused-vars: Ensure type annotations on property
accessors are considered used (#5183) (DonIsaac)
- 7886618 linter/unicorn: Add fixer tests for `no-null` (#5173)
(DonIsaac)

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

Successfully merging this pull request may close these issues.

2 participants