Warn on `eslint-disable` to use `oxlint-disable`
#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.
Maybe we could implement this as a rule in oxc plugin, then it could also have an autofix?
Yeah that could be an option 🤔
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?
@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.