-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
chore(eslint): migrate .eslintrc to eslint.config.js #2912
base: main
Are you sure you want to change the base?
chore(eslint): migrate .eslintrc to eslint.config.js #2912
Conversation
… eslint.config.js
…ate script for eslint.config.js
…js to eslint.config.js
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
commit: |
This is nice! I wasn't sure when all plugins are ready. They weren't when I last tried. |
@dai-shi i checked all plugins. if it's not i will keep my eyes on this, i migrated with no additions and removals |
Do you mean to keep using eslint 8? |
@dbritto-dev IMHO, Tools like |
I wouldn't put much effort on eslint is pretty slow and now are better options, apart from that biome is ready for production. This change just make it more complex to maintain and add another dependency to make it work I do not think that worth it. |
Our ecosystem still depends on eslint plugins. Maybe, eslint-plugin-react-compiler is one of the biggest hurdles. Let's stick with eslint. |
@dai-shi do we need this change to support |
yeah |
react-compiler is already included. eslint 8 will no longer be supported. This change is what I wanted to do when eslint 9 was released, but at that point something wasn't ready. |
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.
Let's do some practices that I learned with jotaijs/jotai-valtio#11.
The primary goal is to simplify configs and prefer defaults.
- Use
"lint": "eslint ."
in package.json and move linter configs to config file - Remove
eslint-config-prettier
package - Can we use
eslint-import-resolver-typescript
package to simplify eslint.config.js? - Can we use
eslint.config.mjs
and use ESM syntax? - Let's remove
globals
packages. The added commend inexamples/demo/src/utils/copy-to-clipboard.js
seems good. - Remove
examples/*/eslint.config.*
and eslint packages fromexamples/*/package.json
- No need to use
eslint-plugin-prettier
package, as we don't configure stylistic rules. - Remove some custom rules that don't cause "errors" in the current zustand/jotai/valtio code. (we keep import order rules.)
@dai-shi I'll do it step by step 🙋🏻♂️ |
Are you referring to the Are you suggesting removing |
Sorry for the confusion. Let's remove both |
At this point biome seems a good option 😅 |
We don't use biome now whatever you say 😄 , but I'm curious how you can configure eslint-plugin-react-compiler with biome. I might use it in my other projects, if that's fairly easy. |
1da5d86
to
989ec56
Compare
I will roll back to the version where it was removed, only in the |
a7edcd4
to
f8cef86
Compare
tslib seems a peer dependency of |
@dai-shi sure, I'll create a PR for that so we can compare them (eslint vs biome) |
@dbritto-dev You don't need to create a PR. I just need to see how it can be configured. Maybe one of your projects? |
@dai-shi sure |
@dai-shi I think we almost done! |
@dai-shi I'll do this step by step |
@dai-shi I gonna do this until today |
Summary
.eslintrc
style toeslint.config.js
Check List
pnpm run prettier
for formatting code and docs