oxc-project / oxc-project/backlog

linter: check resolved config if `ModuleRecord`s are needed

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

Nobody has claimed this yet.

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

Description

Currently, the linter runtime accepts an option cross_module and enables the resolver for the import plugin at a global level:

https://github.com/oxc-project/oxc/blob/c79696618342688b8849afd649d4a3f42f008b63/crates/oxc_linter/src/service/runtime.rs#L290-L292

https://github.com/oxc-project/oxc/blob/c79696618342688b8849afd649d4a3f42f008b63/apps/oxlint/src/lint.rs#L281-L282

There could be configs nested configs / overrides, which will only require the import plugin for specific files / directory.

Example:

{
  "plugins": ["oxc", "typescript"],
  "overrides": [
    {
     "files": ["new_codebase/**/*.ts"],
     "plugins": ["import"]
    }
  ]
}

Or for a nested example:

// /root/.oxlintrc.json
{
  "plugins": ["oxc", "typescript"]
}

// /root/subdirectory/.oxlintrc.json
{
  "plugins": ["oxc", "typescript", "import"],
}

Depending on the file, the Runtime could skip the dependencies of the file:
https://github.com/oxc-project/oxc/blob/c79696618342688b8849afd649d4a3f42f008b63/crates/oxc_linter/src/service/runtime.rs#L378-L382

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 with the linked sections of crates/oxc_linter/src/service/runtime.rs and apps/oxlint/src/lint.rs. Trace how resolved configurations, overrides, and nested configs are represented before examining the dependency-skipping path in runtime.rs. Done means dependency handling reflects whether the current file's resolved config requires ModuleRecords, including per-file plugin activation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.