-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
feat(create-vite): eslint -> oxlint #21044
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
base: main
Are you sure you want to change the base?
Conversation
b1002ee to
1b806c0
Compare
1b806c0 to
66cef2d
Compare
My comment on PR:
We can enable it by default if we can generate proper help messages for false positives, otherwise configure it explicitly in the config in the starter template is actually better (I think). |
|
There is another "problem" that should be noted: https://oxc.rs/docs/guide/usage/linter/versioning.html#versioning
Upgrading Oxlint will sometimes break your build, because new rules can be added to the correctness category to surface more errors. This is similar to upgrading TypeScript. |
|
I feel it is still early to introduce oxlint. At least once its eslint plugin compat is stabilised, we could start to use it in the templates. For me it's important to stick to a tool that has a good ecosystem and external resource so we don't alienate users who aren't familiar with js linting. If someone wants to extend the linting config and easily hits hurdles, I don't think it's good DX. For the dependency issue in the react plugin, if the react team doesn't help with them, then I don't think there's much else we can do other than just upgrading it. There's not much we can do if they recommend a chonky setup as a bare minimum. |
|
I agree with bluwy. One thing we might be able to do is to ensure |
The React compiler is probably good engineering but the cost is still to high for me and so I think for a starter template.
Given that:
eslint-plugin-react-hookshas questionnable dependency management that pulls multiple parsers and duplicate dependencies with the babel plugin (they are bundled for Babel, externalized for ESLint)I think it's time to use oxlint in our templates
I'm trying to be as close as possibles to defaults but:
rules-of-hooksis not in correctness, I think we could rediscussed with the oxc teamjsx-no-target-blankis enabled by default and goes against our choice here. I asked the oxc team if this can be removed from defaultsonly-export-components, which ports eslint-plugin-react-refresh and validates HMR compatibility is enabled