refactor(linter): use run_on_jest_node for existing lint rules#6722
Merged
graphite-app[bot] merged 1 commit intomainfrom Oct 21, 2024
Conversation
Contributor
Your org has enabled the Graphite merge queue for merging into mainAdd 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. |
This was referenced Oct 20, 2024
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @camchenry and the rest of your teammates on |
This was referenced Oct 20, 2024
b6bfe2d to
3a22f58
Compare
3a9967c to
1f3ee7e
Compare
CodSpeed Performance ReportMerging #6722 will not alter performanceComparing Summary
|
3a22f58 to
5046a4e
Compare
Member
Author
1f3ee7e to
42f5d22
Compare
5046a4e to
436e895
Compare
42f5d22 to
0e2cd0e
Compare
Member
Merge activity
|
- closes #6038 Migrates all simple iterations over Jest nodes to use the `run_on_jest_node` method. Rules which require more custom data (such as getting nodes in order or storing data about counts, duplicates, etc.) have not been migrated. Some simple benchmarking shows that this is ~5% faster on `vscode` when the Jest/Vitest rules are NOT enabled (due to being able to skip them now). And it is up to 8% on `vscode` when the Jest/Vitest plugins are enabled. ``` hyperfine -i -N --warmup 3 --runs 30 './oxlint-jest-iter --deny=all --silent ./vscode' './oxlint-main --deny=all --silent ./vscode' Benchmark 1: ./oxlint-jest-iter --deny=all --silent ./vscode Time (mean ± σ): 2.348 s ± 0.104 s [User: 16.922 s, System: 0.641 s] Range (min … max): 2.141 s … 2.544 s 30 runs Benchmark 2: ./oxlint-main --deny=all --silent ./vscode Time (mean ± σ): 2.476 s ± 0.042 s [User: 17.768 s, System: 0.668 s] Range (min … max): 2.430 s … 2.598 s 30 runs Summary ./oxlint-jest-iter --deny=all --silent ./vscode ran 1.05 ± 0.05 times faster than ./oxlint-main --deny=all --silent ./vscode ``` ``` hyperfine -i -N --warmup 3 --runs 30 './oxlint-jest-iter --deny=all --jest-plugin --vitest-plugin --silent ./vscode' './oxlint-main --deny=all --jest-plugin --vitest-plugin --silent ./vscode' Benchmark 1: ./oxlint-jest-iter --deny=all --jest-plugin --vitest-plugin --silent ./vscode Time (mean ± σ): 2.728 s ± 0.118 s [User: 19.782 s, System: 0.786 s] Range (min … max): 2.580 s … 3.078 s 30 runs Benchmark 2: ./oxlint-main --deny=all --jest-plugin --vitest-plugin --silent ./vscode Time (mean ± σ): 2.939 s ± 0.051 s [User: 21.259 s, System: 0.859 s] Range (min … max): 2.848 s … 3.064 s 30 runs Summary ./oxlint-jest-iter --deny=all --jest-plugin --vitest-plugin --silent ./vscode ran 1.08 ± 0.05 times faster than ./oxlint-main --deny=all --jest-plugin --vitest-plugin --silent ./vscode ```
436e895 to
97195ec
Compare
0e2cd0e to
d6609e9
Compare
mysteryven
approved these changes
Oct 21, 2024
Base automatically changed from
10-20-refactor_linter_add_run_on_jest_node_to_run_rules_on_only_jest_nodes
to
main
October 21, 2024 02:32
Boshen
added a commit
that referenced
this pull request
Oct 21, 2024
## [0.10.1] - 2024-10-21 ### Features - af25752 linter: Add `unicorn/prefer-math-min-max` (#6621) (Brian Liu) - 5095f02 linter: Added fixer for duplicate prefix in valid title jest rule (#6699) (Tapan Prakash) - e9976d4 linter: Add title whitespace fixer for jest valid title rule (#6669) (Tapan Prakash) - 45f02d5 linter: Add `unicorn/consistent-empty-array-spread` (#6695) (Brian Liu) - 01a35bb linter/eslint: Show ignore patterns in `eslint/no-unused-vars` diagnostic messages (#6696) (DonIsaac) ### Bug Fixes - 1bcd707 editor: Update config sent to language server (#6724) (Nicholas Rayburn) - ce25c45 linter: Panic in `disable-directives` (#6677) (dalaoshu) - a5de230 linter/import: `import/no-duplicates` handles namespace imports correctly (#6694) (DonIsaac) - b0b6ac7 linter/no-cond-assign: False positive when assignment is in body statement (#6665) (camchenry) ### Performance - 6a76ea8 linter/no-unused-vars: Use default IgnorePattern when /^_/ is provided as a pattern (#6697) (DonIsaac) ### Refactor - d6609e9 linter: Use `run_on_jest_node` for existing lint rules (#6722) (camchenry) - 97195ec linter: Add `run_on_jest_node` to run rules on only jest nodes (#6721) (camchenry) - 155fe7e linter: Allow `Semantic` to be passed for collecting Jest nodes (#6720) (camchenry) - ad8f281 linter: Use iter for collecting jest nodes (#6719) (camchenry) - dc19a8f linter: Use iterator for collecting jest imports (#6718) (camchenry) - 29c1447 linter: `jest/valid-title` fixer to use `Span::shrink` method (#6703) (Tapan Prakash) - 2eb984a linter: Add missing `should_run` implementations (#6666) (camchenry) - 23f88b3 linter/import: Better diagnostic messages for `import/no-duplicates` (#6693) (DonIsaac) --------- Co-authored-by: Boshen <1430279+Boshen@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Migrates all simple iterations over Jest nodes to use the
run_on_jest_nodemethod. Rules which require more custom data (such as getting nodes in order or storing data about counts, duplicates, etc.) have not been migrated.Some simple benchmarking shows that this is ~5% faster on
vscodewhen the Jest/Vitest rules are NOT enabled (due to being able to skip them now). And it is up to 8% onvscodewhen the Jest/Vitest plugins are enabled.