Closed ChristianIvicevic closed 3 weeks ago
Thanks for the careful reproduction! 🙏
I've opened https://github.com/amannn/next-intl/pull/1445 to address this.
As a side note, if you consider upgrading to Next.js 15 already, you might want to consider https://github.com/amannn/next-intl/issues/1442.
Thanks for looking into it! Regarding your warning, I don't use i18n routing anyways, so one less thing to keep track of when migrating.
Description
After attempting to migrate to Next v15 I noticed a false positive during linting causing linting to fail and I narrowed it down to
t.rich
behaving differently in terms of types. Without looking into the implementation details it feels like thatt.rich
relies on some React specific types that were changed in v19.Verifications
Mandatory reproduction URL
https://github.com/ChristianIvicevic/next-intl-bug-repro-app-router/tree/next-15
Reproduction description
Steps to reproduce:
next-15
branch (that is the result of applying the codemod from Next v15 onto themain
branch of the reproduction, refer to the commit)app/[locale]/page.tsx
in your editort.rich
returnsany
Expected behaviour
In the
main
branch of the same reproduction you will notice howt.rich
is correctly typed and returnsstring | ReactElement | ReactNodeArray
as expected. It beingany
in the reproduction causes eslint to complain with theno-unsafe-return
error.