i18n function `$t` shows linting warning when used with more than one parameter
jojomatik opened this issue · comments
Describe the bug
Using i18n function $t
with more than one parameter directly in a template shows linting warning. Using it in the script
section works properly.
I've also opened an issue (jojomatik/nuxt-3-base#5) in my template repository for a nuxt3 project, as it is one of the blocking issues for release 1.0.0.
To Reproduce
Sourced from my template project:
<!-- warning: Invalid number of arguments, expected 1 -->
<v-card-text>{{ $t("hello", { name: name }) }}</v-card-text>
Expected behavior
No linting warning is shown.
Environment:
- WebStorm 2022.1 EAP (Webstorm Build #WS-221.4501.160, built on February 18, 2022)
- Version: 1.0.0-beta.3
Additional context
It is currently unclear whether this is an issue with Webstorm, vue-i18n, the linting configuration or if my template project missed an essential step of implementing vue-i18n in jojomatik/nuxt-3-base@9e4fd4b.
Switching to the new t
function returned by useI18n()
resolved the problem for me. See also jojomatik/nuxt-3-base@c47541d