oxc icon indicating copy to clipboard operation
oxc copied to clipboard

Warn on `eslint-disable` to use `oxlint-disable`

Open GeoffreyParrier opened this issue 1 month ago • 2 comments

#15671 made me thought of this.

With oxlint plugin support, eslint will be less used and keeping eslint-disable when you're not using eslint seems bad practice to me.

So it could be nice to have a warning like Prefer oxlint-disable instead of eslint-disable

Obviously in some cases eslint-disable could still be necessary.

There are two possibilities to handle it:

  • Simple: would be to only show this warning in case no eslint is used in the project.
  • More complex: only warn for rules handled by oxlint (native or via plugin).

There is the case of use npx commands to launch eslint but I don't think it's a common practice, even more if you use oxlint.

GeoffreyParrier avatar Nov 13 '25 13:11 GeoffreyParrier

Maybe we could implement this as a rule in oxc plugin, then it could also have an autofix?

overlookmotel avatar Nov 14 '25 17:11 overlookmotel

Yeah that could be an option 🤔

GeoffreyParrier avatar Nov 14 '25 19:11 GeoffreyParrier

Hi, I was looking for a easy issue to be my first contribution and I found this issue. I have already a possible implementation as rule in oxc plugin, but it doesn't have the tag of good first issue. Should I create a draft PR?

Afsoon avatar Nov 21 '25 08:11 Afsoon

@camc314 Do you like my suggestion of implementing this as a rule in oxc plugin? Or you think better to handle this another way?

We could later on add a similar rule for people migrating from Prettier to Oxfmt - replace // prettier-ignore comments with // oxfmt-ignore.

If these were rules, not sure which category they'd go in. Classing them as "correctness" might seems a bit arrogant!

@Afsoon PR would be very welcome, but let's see if Cameron agrees with the approach first.

overlookmotel avatar Nov 21 '25 13:11 overlookmotel