oxc/crates
camchenry d6609e91c2 refactor(linter): use run_on_jest_node for existing lint rules (#6722)
- closes https://github.com/oxc-project/oxc/issues/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
```
2024-10-21 02:13:59 +00:00
..
oxc release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_allocator fix(allocator)!: make Vec non-drop (#6623) 2024-10-19 15:43:54 +00:00
oxc_ast docs(ast): enforce doc comments on JSX nodes, literal nodes, and comments (#6712) 2024-10-21 02:08:05 +00:00
oxc_ast_macros release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_cfg release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_codegen docs(codegen): add #![warn(missing_docs)] to oxc_codegen (#6711) 2024-10-21 00:13:57 +00:00
oxc_data_structures release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_diagnostics release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_ecmascript refactor(minifier): binary operations use ConstantEvaluation (#6700) 2024-10-20 15:13:27 +00:00
oxc_estree release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_index release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_isolated_declarations refactor(isolated-declarations): protect internal transform methods (#6723) 2024-10-21 02:03:33 +00:00
oxc_language_server refactor(oxc): remove useless allocator.alloc(program) calls (#6571) 2024-10-15 02:21:20 +00:00
oxc_linter refactor(linter): use run_on_jest_node for existing lint rules (#6722) 2024-10-21 02:13:59 +00:00
oxc_macros refactor(linter): add run_on_jest_node to run rules on only jest nodes (#6721) 2024-10-21 02:13:58 +00:00
oxc_mangler release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_minifier refactor(minifier): binary operations use ConstantEvaluation (#6700) 2024-10-20 15:13:27 +00:00
oxc_module_lexer release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_parser release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_prettier fix(allocator)!: make Vec non-drop (#6623) 2024-10-19 15:43:54 +00:00
oxc_regular_expression chore(coverage): bump test262, babel and TypeScript (#6702) 2024-10-20 15:02:26 +00:00
oxc_semantic release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_sourcemap release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_span test(span): add Span::is_empty unit tests (#6706) 2024-10-20 15:39:14 -04:00
oxc_syntax refactor(ast_tools): add line breaks to generated code for ESTree derive (#6680) 2024-10-19 19:50:13 +00:00
oxc_transformer chore(coverage): bump test262, babel and TypeScript (#6702) 2024-10-20 15:02:26 +00:00
oxc_traverse release(crates): v0.32.0 (#6691) 2024-10-19 23:09:35 +08:00
oxc_wasm chore(semantic, wasm): re-order dependencies in Cargo.toml files (#6657) 2024-10-18 13:40:37 +00:00