Open
Description
What rule do you want to change?
@intlify/vue-i18n/no-dynamic-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.)?
new option (skipTSAsExpression
)
Please provide some example code that this change will affect:
<template>
<span>{{ t(`binary-question.${isPositive.toString()}.title` as `binary-question.${'true' | 'false'}.title` }}</span>
</template>
<script lang="ts" setup>
let isPositive: bool = true;
</script>
What does the rule currently do for this code?
Disallow any dynamic translation key
What will the rule do after it's changed?
Only disallow dynamic translation keys when their type isn't narrowed down via template string literal type.
Additional context
Metadata
Metadata
Assignees
Labels
No labels