-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support legacy config #7
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for improving the documentation!!
README.md
Outdated
... // other config | ||
rules: { | ||
... // other rules | ||
...oxlintRules // oxlint rules should be the last ones |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should support passing ' plugins: [oxlint]` when the eslint version < 9.0. But I haven't looked into what needs to be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with you. In the meantime, doing like this works well and is not too hacky to setup, imho.
Using conditional exports, we should be able to do something. See: sindresorhus/eslint-plugin-unicorn#1886 |
6f7d79b
to
3be900d
Compare
@Dunqing alright, if figured it out. The "presets" in eslint legacy config are called "configs" in the docs... See: https://eslint.org/docs/latest/extend/plugins#configs-in-plugins Now, the plugin can be used with one line of config in legacy configs :) |
I noticed the repo don't have any formatter configured -- looks like my formatter (prettier) did some changes. Can be reverted on demand. |
Thanks! That's great! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
Fixes #5