eslint-plugin-vue-i18n
eslint-plugin-vue-i18n copied to clipboard
Forbid `$t` and friends in `data`
Please describe what the rule should do:
Use of $t and friends in components' data sections should be forbidden because it results in non-dynamic translations.
What category should the rule belong to?
- [ ] Enforces code style (layout)
- [x] Warns about a potential error (problem)
- [ ] Suggests an alternate way of doing something (suggestion)
- [ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
data() {
return {
foo: this.$t('foo'),
}
},
Additional context