Skip to content

linter: import/no-cycle rule diagnostic not emitted with nested configurations #10054

@camchenry

Description

@camchenry

What version of Oxlint are you using?

0.16.3

What command did you run?

oxlint <dir>

What does your .oxlintrc.json config file look like?

{
  "plugins": ["import", "unicorn"],
  "rules": {
    "import/no-commonjs": "error",
    "import/no-cycle": "error",
    "import/no-duplicates": "error",
    "import/no-self-import": "error"
  }
}

What happened?

When using oxlint to lint a single directory, the import/no-cycle rule is not emitted as a diagnostic unless the config is passed explicitly with --config. I think this is due to the multi-file analysis not being enabled. I think if we have to choose whether to enable it altogether, then we should enable it if any nested config has the import plugin.

// a.ts
import { b } from "./b";

console.log(b);

// b.ts
import './a'

export const b = 'b';

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions