oxc-project / oxc-project/backlog

Linter: Migrate `run_on_jest_node` to `run` implementations

Open
#206 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
7
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently, all (or most) Jest/Vitest lint rules use the custom run_on_jest_node methods. These methods do not benefit from our AST type optimizations and also make the core linter code just a little bit more complicated. We should migrate these rules to all use the run methods so that they can benefit from the AST node type optimizations and we can simplify the core linter code to be more streamlined.

Rough plan:

  1. Migrate all current Jest/Vitest rules to use run instead of run_on_jest_node (can be done incrementally)
  2. Update all current rules to use should_run method instead of the custom should_run_on_jest_node (can be done incrementally)
  3. Remove the run_on_jest_node and associated code

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current run_on_jest_node and should_run_on_jest_node implementations and the Jest/Vitest rules that use them. Migrate those rules to run and should_run incrementally, then remove the old methods and associated core code; done means no current rules depend on the custom methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.