-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
Hey! I want to contribute to this package with a new rule - no-dynamic-keys.
The rule aims to prevent developers to use dynamic keys for i18next.
Example of incorrect code:
<>
<div>{i18next.t("hello" + "." + "world")}</div>
<div>{i18next.t(`enum.${dynamicValue}`)}</div>
</>Example of correct code:
<>
<div>{i18next.t("hello.world"}</div>
<div>{i18next.t('enum', { returnObjects: true })[dynamicValue]}</div>
</>Do you think something like this could be useful?
GeoffreyParrier
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed