Skip to content

linter: oxlint-disable-next-line import/no-cycle disable all errors after this line #21252

@raphaelboukara

Description

@raphaelboukara

What version of Oxlint are you using?

1.59.0

What command did you run?

oxlint -c .oxlintrc.json

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

{
	"plugins": ["import"],
	"rules": {
		"import/no-cycle": "error"
	}
}

What happened?

Let's take those files:

a.js:

import './b.js';
import './c.js';

export const name = 'a';

b.js:

import './a.js';
export const name = 'b';

c.js:

import './a.js';
export const name = 'c';

When running oxlint on a.js:
Image

If I update a.js:

+ // oxlint-disable-next-line import/no-cycle
import './b.js';
import './c.js';

export const name = 'a';

I got:

Image

Which is wrong since the second import contains a circular dep. Saying I update again a.js:

- // oxlint-disable-next-line import/no-cycle
- import './b.js';
import './c.js';

export const name = 'a';
Image

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