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

docs: 'Getting started' docs fail to specify @next in installation instructions #508

Open
birjj opened this issue May 7, 2024 · 1 comment

Comments

@birjj
Copy link

birjj commented May 7, 2024

Tell us about your environment

  • ESLint version: 9.2.0
  • eslint-plugin-vue version: ^9.24.1
  • eslint-plugin-vue-i18n version: ^2.0.0
  • Node version: v20.12.2

Please show your full configuration:

/* eslint-env node */
import pluginVue from 'eslint-plugin-vue';
import pluginVueI18n from '@intlify/eslint-plugin-vue-i18n';
import js from '@eslint/js';

export default [
  js.configs.recommended,
  ...pluginVue.configs['flat/recommended'],
  ...pluginVueI18n.configs['flat/recommended'],
];

What did you do?
I followed the "Getting started" documentation from the website, and ran:

npm install --save-dev eslint @intlify/eslint-plugin-vue-i18n

However, this installed version ^2.0.0 of @intlify/eslint-plugin-vue-i18n, which throws an error when running eslint using the provided configuration. A fix is to instead run npm install --save-dev @intlify/eslint-plugin-vue-i18n@next to install version ^3.0.0-next.11. The documentation should be updated to install the correct version.

What did you expect to happen?
The plugin should work when following the documentation.

What actually happened?
When attempting to run eslint using the provided configuration, it fails with:

TypeError: pluginVueI18n.configs.flat/recommended is not iterable
    at file:///Users/me/dev/test/eslint.config.mjs?mtime=1715082875973:10:21
    at ModuleJob.run (node:internal/modules/esm/module_job:222:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async loadFlatConfigFile (/Users/me/dev/test/node_modules/eslint/lib/eslint/eslint.js:317:21)
    at async calculateConfigArray (/Users/me/dev/test/node_modules/eslint/lib/eslint/eslint.js:396:28)
    at async ESLint.lintFiles (/Users/me/dev/test/node_modules/eslint/lib/eslint/eslint.js:815:25)
    at async Object.execute (/Users/me/dev/test/node_modules/eslint/lib/cli.js:500:23)
    at async main (/Users/me/dev/test/node_modules/eslint/bin/eslint.js:153:22)
@omarmir
Copy link

omarmir commented May 10, 2024

Thanks - this helped resolve my issue!

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

2 participants