Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no-unused-keys w/ lazy #339

Open
schancel opened this issue Oct 24, 2022 · 0 comments
Open

no-unused-keys w/ lazy #339

schancel opened this issue Oct 24, 2022 · 0 comments

Comments

@schancel
Copy link

Is there any way to get this working with lazy loaded localization files?
I don't seem to get any linter errors for unusued keys with the following configs:

package.json:

    "@intlify/eslint-plugin-vue-i18n": "^2.0.0",
    "nuxt": "2.15.8",
    "vue-i18n": "8",

e.g. I have en-US.js:

export default () => {
  return new Promise(function (resolve) {
    resolve({

and a nuxt.config.js with:

    [
      '@nuxtjs/i18n',
      {
        // Options
        //to make it seo friendly remove below line and add baseUrl option to production domain
        seo: true,
        baseUrl: 'https://givelotus.org',
        lazy: true,
        locales: languages,
        defaultLocale: 'en-US',
        vueI18n: {
          fallbackLocale: 'en-US'
        },
        detectBrowserLanguage: {
          useCookie: true,
          cookieKey: 'i18n_redirected',
          alwaysRedirect: true
        },
        langDir: 'static/lang/'
      }
    ]

and eslintrc:

    '@intlify/vue-i18n/no-unused-keys': [
      'error',
      {
        extensions: ['.js', '.vue']
      }
    ],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant