You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the .esclintrc.json, the @typescript-eslint/no-unused-expressions and @typescript-eslint/no-unused-vars are set to report valid syntax that must be written in the process of doing any development as an error. This causes code editors with eslint plugins to turn red the same as if it was invalid syntax. This means that real errors that break code are visually indistinguishable from valid syntax that cannot be avoided during development.
Current behavior indicates that new vars and expressions should never be introduced to a code base because they cannot be used before they are defined, and they can't be defined before they are used without generating an error.
I know this is consistent with upstream behavior, but insanity does not have to be copied like lemmings running off a cliff. A quick search of the codebase shows eslint-disable and eslint-disable-next-line comments littered throughout, so obviously this behavior is not strictly endorsed. Should it really be the default? Is this the experience that Next.js devs want to have?
Should valid code be reported as an error?
Yes, I want my code editor to be red all the time for valid syntax
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the .esclintrc.json, the
@typescript-eslint/no-unused-expressions
and@typescript-eslint/no-unused-vars
are set to report valid syntax that must be written in the process of doing any development as an error. This causes code editors with eslint plugins to turn red the same as if it was invalid syntax. This means that real errors that break code are visually indistinguishable from valid syntax that cannot be avoided during development.Current behavior indicates that new vars and expressions should never be introduced to a code base because they cannot be used before they are defined, and they can't be defined before they are used without generating an error.
I know this is consistent with upstream behavior, but insanity does not have to be copied like lemmings running off a cliff. A quick search of the codebase shows
eslint-disable
andeslint-disable-next-line
comments littered throughout, so obviously this behavior is not strictly endorsed. Should it really be the default? Is this the experience that Next.js devs want to have?1 vote ·
Beta Was this translation helpful? Give feedback.
All reactions