Eslint-plugin-vue: VSCode can't load config "plugin:vue/vue3-recommended" to extend from

Created on 29 May 2020  路  2Comments  路  Source: vuejs/eslint-plugin-vue

Tell us about your environment

  • ESLint version: 7.1.0
  • eslint-plugin-vue version: 7.0.0-alpha.4
  • Node version: 14.3.0

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    node: true,
  },
  extends: [
    'plugin:vue/vue3-recommended',
    '@vue/airbnb',
    '@vue/typescript/recommended',
  ],
  parserOptions: {
    ecmaVersion: 2020,
  },
  rules: {
    'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
    '@typescript-eslint/ban-ts-ignore': 'off',
    "vue/component-tags-order": ["error", {
      "order": ["template", "script", "style"]
    }]
  },
  overrides: [
    {
      files: [
        '**/__tests__/*.{j,t}s?(x)',
        '**/tests/unit/**/*.spec.{j,t}s?(x)',
      ],
      env: {
        jest: true,
      },
    },
  ],
};

What did you expect to happen?
I want to be able to have VSCode autocheck and fixOnSave with eslint. When I remove L7 ('plugin:vue/vue3-recommended',) everything works as expected.

What actually happened?
The ESLint output shows the following debug errors:

2020-05-29T06:36:57.108Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/node_modules/*', '/bower_components/*' ], basePath: '/Users/xxx/WWW/app', loose: false } ]
2020-05-29T06:36:57.108Z eslint:ignore-pattern   processed: { basePath: '/Users/xxx/WWW/app', patterns: [ '/node_modules/*', '/bower_components/*' ] }
2020-05-29T06:36:57.108Z eslint:ignore-pattern Create with: [ IgnorePattern { patterns: [ '/node_modules/*', '/bower_components/*' ], basePath: '/Users/xxx/WWW/app', loose: false } ]
2020-05-29T06:36:57.108Z eslint:ignore-pattern   processed: { basePath: '/Users/xxx/WWW/app', patterns: [ '/node_modules/*', '/bower_components/*' ] }
2020-05-29T06:36:57.108Z eslint:cascading-config-array-factory Load config files for /Users/xxx/WWW/app/src/components.
2020-05-29T06:36:57.108Z eslint:cascading-config-array-factory No cache found: /Users/xxx/WWW/app/src/components.
2020-05-29T06:36:57.108Z eslint:config-array-factory Config file not found on /Users/xxx/WWW/app/src/components
2020-05-29T06:36:57.108Z eslint:cascading-config-array-factory No cache found: /Users/xxx/WWW/app/src.
2020-05-29T06:36:57.109Z eslint:config-array-factory Config file not found on /Users/xxx/WWW/app/src
2020-05-29T06:36:57.109Z eslint:cascading-config-array-factory No cache found: /Users/xxx/WWW/app.
2020-05-29T06:36:57.109Z eslint:config-array-factory Loading JS config file: /Users/xxx/WWW/app/.eslintrc.js
2020-05-29T06:36:57.109Z eslint:config-array-factory Config file found: /Users/xxx/WWW/app/.eslintrc.js
2020-05-29T06:36:57.109Z eslint:config-array-factory Loading {extends:"plugin:vue/vue3-recommended"} relative to /Users/xxx/WWW/app/.eslintrc.js
2020-05-29T06:36:57.109Z eslint:config-array-factory Loading plugin "vue" from /Users/xxx/WWW/app/.eslintrc.js
2020-05-29T06:36:57.109Z eslint:config-array-factory Loaded: [email protected] (/Users/xxx/WWW/app/node_modules/eslint-plugin-vue/lib/index.js)
2020-05-29T06:36:57.109Z eslint:config-array-factory Plugin /Users/xxx/WWW/app/node_modules/eslint-plugin-vue/lib/index.js loaded in: 0ms
[Error - 8:36:57 AM] ESLint stack trace:
[Error - 8:36:57 AM] Error: Failed to load config "plugin:vue/vue3-recommended" to extend from.
Referenced from: /Users/xxx/WWW/app/.eslintrc.js
    at configMissingError (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:265:9)
    at ConfigArrayFactory._loadExtendedPluginConfig (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:792:31)
    at ConfigArrayFactory._loadExtends (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:725:29)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:660:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:596:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at createConfigArray (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:340:25)
    at ConfigArrayFactory.loadInDirectory (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/config-array-factory.js:433:16)
    at CascadingConfigArrayFactory._loadConfigInAncestors (/Users/xxx/WWW/app/node_modules/eslint/lib/cli-engine/cascading-config-array-factory.js:328:46)

Most helpful comment

I fixed it by appending '@next' at npm i --save-dev eslint-plugin-vue@next

All 2 comments

OK, I don't know what actually happened, but after another VSCode restart and propably some package upgrade, it works... 馃し
Sorry for the issue

I fixed it by appending '@next' at npm i --save-dev eslint-plugin-vue@next

Was this page helpful?
0 / 5 - 0 ratings