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
I guess it does ignore all template-strings, because I get a list of all these translation-keys reported as being unused.
What will the rule do after it's changed?
It recognizes, that the only available values (based on the given types) are global.loading, global.error and global.success, and will remember all those as being used. If not already, this could also be used in the rule @intlify/vue-i18n/no-missing-keys to determine possibly missing keys.
What rule do you want to change?
no-unused-keys
Does this change cause the rule to produce more or fewer warnings?
fewer
How will the change be implemented? (New option, new default behavior, etc.)?
Read the type for the input of the translation-function to determine the possible strings.
Please provide some example code that this change will affect:
What does the rule currently do for this code?
I guess it does ignore all template-strings, because I get a list of all these translation-keys reported as being unused.
What will the rule do after it's changed?
It recognizes, that the only available values (based on the given types) are
global.loading
,global.error
andglobal.success
, and will remember all those as being used. If not already, this could also be used in the rule@intlify/vue-i18n/no-missing-keys
to determine possibly missing keys.To be clear, this rule is not for variables typed as
string
. There are ways of mapping a union of fixed strings or extending it (see https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html).Additional context
no-unused-keys
is very slow #354).as
forno-dynamic-keys
rule #602. This rule could also reduce the need for implementing Allowas
forno-dynamic-keys
rule #602 to a bare minimum.The text was updated successfully, but these errors were encountered: