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
@intlify/vue-i18n/no-unused-keys and @intlify/vue-i18n/key-format-style should show errors
<scriptsetup>import { useI18n } from'vue-i18n';const { t } =useI18n();</script>
<template>
<main>
<!-- ================================ TEST ================================ --><!-- OK -->
<div>RAW TEXT</div>
<!-- DOES NOT WORK -->
<div>{{ t('unknown') }}</div>
<!-- DOES NOT WORK -->
<div>{{ t('kebab-case') }}</div>
<!-- DOES NOT WORK -->
<div>{{ t('snake_case') }}</div>
<!-- ================================ TEST ================================ -->
</main>
</template>
<stylescoped>.logo {display: block;margin: 0auto2rem;}</style>
What actually happened?
It ONLY shows the raw text warning which is in @intlify/vue-i18n/recommended but not other rules, and also custom "@intlify/vue-i18n/no-raw-text": "error" worked as well when I added in rules: { ... }.
$ yarn lint master
yarn run v1.22.21
$ eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore
/.../src/App.vue
11:10 warning raw text 'RAW TEXT' is used @intlify/vue-i18n/no-raw-text
✖ 1 problem (0 errors, 1 warning)
✨ Done in 0.79s.
Tell us about your environment
v8.57.0
"eslint-plugin-vue": "^9.17.0"
"@intlify/eslint-plugin-vue-i18n": "^2.0.0"
v20.11.1
Please show your full configuration:
What did you do?
I just followed https://eslint-plugin-vue-i18n.intlify.dev/started.html and spent few days to figure out why. Tried parser option, different vite plugin for i18n, all did not work.
What did you expect to happen?
@intlify/vue-i18n/no-unused-keys
and@intlify/vue-i18n/key-format-style
should show errorsWhat actually happened?
It ONLY shows the raw text warning which is in
@intlify/vue-i18n/recommended
but not other rules, and also custom"@intlify/vue-i18n/no-raw-text": "error"
worked as well when I added inrules: { ... }
.Repository to reproduce this issue
https://github.com/daenamkim/eslint-plugin-vue-i18n-test
The text was updated successfully, but these errors were encountered: