eslint-plugin-vue-i18n
eslint-plugin-vue-i18n copied to clipboard
Support for js based locales
I switched my locale files from js to json to get the benefits of this package, there are still gaps though, for example, I build some translations dynamically out of the main set, which means I am now seeing erroneous no-missing-keys
warnings, it'd be great to be able to use js-based locales
After a few months the translations started to get unwieldy, so I've now broken them up into multiple json files that I stitch together with path-based rules for vue-i18n, and again I'm running into issues here, it'd be great there was an ability to supply a messages object ala vue-i18n so that I could thus construct it however I want and feed it into this plugin.
Also would be nice to have typescript resources (strong type):
and something like: $t(r => r.My.Resource.MyString)
with IntelliSense and type check.
I'm looking for support for .TS based locales. That's just one step farther from js based locales.
Also looking for support for locales in *.ts files. It took me a while to realize it's not supported yet (mainly thanks to this issue), perhaps a sentence or two in documentation mentioning supported file types for locales might be helpful for future users.
Sharing my experience here. I also have locales in typescript files and I've been trying to figure out why I had the Cannot convert undefined or null to object
error when linting. Eventually realized that the plugin could not find my locales.
I see that it's been almost 2 years, is this something supported now?
I think you can load js locale files and lint them. However, I don't think linting to js locale files is supported.