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

Linter not working with <I18nT> keyword #447

Closed
ptoseklukas opened this issue Nov 10, 2023 · 0 comments · Fixed by #471
Closed

Linter not working with <I18nT> keyword #447

ptoseklukas opened this issue Nov 10, 2023 · 0 comments · Fixed by #471

Comments

@ptoseklukas
Copy link

Linter not working with I18nT keyword. But with i18n-t working.

  • ESLint version: 8.36
  • eslint-plugin-vue version: 9.9.0
  • eslint-plugin-vue-i18n version: 3.0.0-next.4
  • Node version: 18
module.exports = {
  root: true,
  env: {
    browser: true,
    es2021: true,
    node: true,
  },
  ignorePatterns: ['public/js/*.js'],
  extends: [
    'plugin:@typescript-eslint/recommended',
    'plugin:vue/vue3-recommended',
    'plugin:tailwindcss/recommended',
    'prettier',
    'plugin:@intlify/vue-i18n/recommended',
  ],
  parser: 'vue-eslint-parser',
  parserOptions: {
    ecmaVersion: 'latest',
    parser: '@typescript-eslint/parser',
    sourceType: 'module',
  },
  plugins: ['@typescript-eslint'],
  rules: {
    '@typescript-eslint/no-unused-vars': 2,
    '@typescript-eslint/no-explicit-any': 2,
    'vue/padding-line-between-blocks': [2, 'always'],
    'vue/multi-word-component-names': 0,
    'vue/require-default-prop': 2,
    'vue/define-props-declaration': 2,
    'vue/require-explicit-emits': 2,
    'vue/no-multiple-objects-in-class': 2,
    'vue/prefer-separate-static-class': 2,
    'vue/component-name-in-template-casing': [
      2,
      'PascalCase',
      {
        registeredComponentsOnly: false,
        ignores: ['i18n-t'],
      },
    ],
    'tailwindcss/no-custom-classname': [
      2,
      {
        whitelist: ['popper'],
      },
    ],
    '@intlify/vue-i18n/no-dynamic-keys': 0,
    '@intlify/vue-i18n/no-raw-text': 0,
    '@intlify/vue-i18n/valid-message-syntax': 2,
    '@intlify/vue-i18n/no-missing-keys': 2,
    '@intlify/vue-i18n/no-missing-keys-in-other-locales': [
      2,
      {
        ignoreLocales: ['en-alsendo-es', 'es-alsendo-es'],
      },
    ],
    '@intlify/vue-i18n/no-unused-keys': [
      2,
      {
        extensions: ['.js', '.vue', '.ts'],
        ignores: [
          '/countries/',
          '/payment.errors.reasons/',
          '/components.integration_form./',
          '/components.sidebar.lang_switch.languages./',
          '/components.tutorial./',
          '/pages.settings.integrations.ecom_type./',
          '/pages.register.info.perex_step/',
          '/pages.register.info.title_step/',
          '/pages.settings.integrations.modal.tutorial_url_/',
          '/components.registration.form.register_social/',
          '/pages.login.form.login_social/',
        ],
      },
    ],
  },
  settings: {
    'vue-i18n': {
      localeDir: './locales/*.json',
      messageSyntaxVersion: '^9.0.0',
    },
  },
  overrides: [
    {
      files: ['*.json'],
      extends: ['plugin:@intlify/vue-i18n/base'],
    },
    {
      files: ['*.ts', '*.tsx', '*.js'],
      parser: '@typescript-eslint/parser',
    },
    {
      files: ['*.vue'],
      parser: 'vue-eslint-parser',
    },
  ],
}

What did you do?

key pages.login.info.ratings not found
<I18nT keypath="pages.login.info.ratings">xxx</I18nT>

working
<i18n-t keypath="pages.login.info.ratings">xxx</i18n-t>
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

Successfully merging a pull request may close this issue.

1 participant