Eslint should report unnecessary client client component #74591
Labels
bug
Issue was opened via the bug report template.
invalid link
The issue was auto-closed due to a missing/invalid reproduction link. A new issue should be opened.
Linting
Related to `next lint` or ESLint with Next.js.
Link to the code that reproduces this issue
#74520
To Reproduce
Consider the case of a very simple component like this:
The developer then realizes that the state variable was useless and removes it and is left with:
Now the component is a client component, but there is no reason for it to be. There should be a lint rule that checks for a useless client component in this case.
Current vs. Expected behavior
Should report error
Provide environment information
Which area(s) are affected? (Select all that apply)
Linting
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: