Closed rin-st closed 3 months ago
cc @MattPereira could you check if this solves your problem mentioned in #901 ?
Hey thanks so much for working on this! :pray:
The ESLint server isnt throwing error anymore and unused vars / import warnings look good
But when i try to make a commit its hanging indefinitely on yarn next:lint --fix --file app/page.tsx
Also no warnings for missing useEffect dependencies
Here's what it looks like on older scaffold build I started in ~March, 2024
Also no warnings for missing useEffect dependencies
Here's what it looks like on older scaffold build I started in ~March, 2024
I've started using https://github.com/scaffold-eth/scaffold-eth-2. And to be honest, my first experience with this tool is not good.
I think there should be warnings for missing useEffect
dependencies as it could lead to serious bugs. Actually, I've come across such bugs these days and it's really hard to find issues with useEffect
because of no warnings for missing useEffect
dependencies.
Could you possibly fix that issue as soon as possible?
cc @technophile-04 @MattPereira @rin-st
Umm @rin-st I don't feel confident about this PR, seems like eslint v9 / flat config doesn't go well with NextJs yet checkout https://github.com/vercel/next.js/issues/64409. People seems to suggest hacky workaround which I don't feel we should jump in and maybe wait until NextJS officially support eslint v9 and new flat config?
I tried a guide from this message + last message in thread + some updates and everything worked fine
I think it's better to use v9 since
But if you think v8 is better we can discuss it and probably rewrite to v8
I think it's better to use v9 since we don't know when nextjs will officially support eslint v9, it can take months eslint v8 can conflict with related packages (configs/plugins/types etc), we need to check which ones are for v8 and which ones are for v9
Yup agree but it would have been great if Next natively support it because if not there are some edge cases like this which will pop up.
But yeah I am not completely against it and kind of 49, 51% and we could go ahead with this PR if it nicely solves all the problem.
Also its wired that eslint works nicely for me on main
branch but it breaks on this branch, same problem as you all were having on main
but I have it on this branch :(. Might be something to do with my config we could totally ignore it!
Btw was debugging with @MattPereira and seems like if you checkout before the #875 i.e to #869 :
git checkout a78be8761e1d039218cccf57d60a4de56261d859 && yarn install
It does seem to solve the problem for him, maybe something to do with prettier update
I think it's better to use v9 since we don't know when nextjs will officially support eslint v9, it can take months
also, eslint v8 will not be maintained in two months, see top of the page https://eslint.org/docs/v8.x/
Also its wired that eslint works nicely for me on
main
branch but it breaks on this branch, same problem as you all were having onmain
but I have it on this branch :(. Might be something to do with my config we could totally ignore it!
Let's wait for others and see how it works. Looks like yes, you config is different
Demo video : Btw was debugging with @MattPereira and seems like if you checkout before the #875 i.e to #869 :
git checkout a78be8761e1d039218cccf57d60a4de56261d859 && yarn install
It does seem to solve the problem for him, maybe something to do with prettier update
It works for me too. But reverting is not so simple. Changing back versions of eslint/prettier libs from main
doesn't work for me, so I'm tend to v9
Tysm @rin-st for tinkering and exploring this path! We could surely come back to this PR soon or when next support v9. Closing this for now
Description
Fixes Typescript-eslint and updates eslint related packages
to test add this to any of the components:
also I removed this rule
because looks like it's redundant, also I think default
ls
is better. You can check how it works by removing last line in any of checked filesSee also https://typescript-eslint.io/getting-started/ https://typescript-eslint.io/rules/no-unused-vars#how-to-use https://typescript-eslint.io/rules/no-explicit-any https://typescript-eslint.io/rules/ban-ts-comment/ https://github.com/prettier/eslint-plugin-prettier?tab=readme-ov-file#configuration-new-eslintconfigjs
Additional Information
Related Issues
Fixes #901