-
Notifications
You must be signed in to change notification settings - Fork 3
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
False positive on useTranslations()
from next-intl
#9
Comments
Added an option to make exceptions for hooks in 1.2.0 https://github.com/roginfarrer/eslint-plugin-react-server-components/releases/tag/v1.2.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using the line
const t = useTranslations();
(from next-intl) in a Next.js React component, it falsely triggers thereact-server-components/use-client
rule. At a guess I would assume this to be becauseuseTranslations()
support both server and client side rendering and as such the inspection may be falsely flagging something inside of it.In the short term we are going to just individually prefix all of our
useTranslations
lines with// eslint-disable-next-line react-server-components/use-client
lines above them, but this is unwieldy and would prefer to be avoided. It would be good if this false positive can be fixed, or if we could configure some global pattern for lines that can be ignored by this rule.The text was updated successfully, but these errors were encountered: