Skip to content

linter: import/no-cycle with TypeScript + ESM #6913

@Boshen

Description

@Boshen

Discussed in #6906

Originally posted by LukeNotable October 26, 2024
Trying out oxlint for the first time in the hope that it can at least give us a fast check on import/no-cycle. I have a TypeScript project using ESM, thus files like:

// foo.ts
import { Bar } from './bar.js';

// bar.ts
import { Foo } from './foo.js';

However, the rule fails to flag this as a problem. But if I remove the .js extension, the rule behaves correctly. However, the .js extension is required under ESM.

I recall a similar issue with the original eslint-plugin-import, which required eslint-import-resolver-typescript, and I see there's an oxc-resolver, so I wonder if I just need to do some additional configuration to use it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions