A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mdx-js/eslint-mdx/issues/251 below:

.vue files cause parsing error after enabling plugin:mdx/recommended · Issue #251 · mdx-js/eslint-mdx · GitHub

Subject of the issue

After enabling "plugin:mdx/recommended" extension in .eslintrc.js, .vue files of a Vue project suddenly start incorrectly reporting syntax error during eslint --ext .js,.ts,.vue,.mdx --ignore-path .gitignore ., even though this extension shouldn't affect .vue files at all (at least I wasn't able to find anything similar in provided documentations after hours of searching).

/sandbox/components/IconLink.vue
  22:8  error  Parsing error: '}' expected

/sandbox/components/Logo.vue
  3:4  error  Parsing error: Identifier expected

/sandbox/layouts/default.vue
  9:13  error  Parsing error: '}' expected

/sandbox/pages/about.vue
  15:14  error  Parsing error: '}' expected

/sandbox/pages/index.vue
  4:12  error  Parsing error: Identifier expected

✖ 5 problems (5 errors, 0 warnings)
Your environment
"devDependencies": {
    "@nuxt/typescript-build": "^2.0.3",
    "@nuxtjs/eslint-config-typescript": "^5.0.0",
    "@nuxtjs/eslint-module": "^3.0.1",
    "eslint": "^7.14.0",
    "eslint-config-prettier": "^6.15.0",
    "eslint-plugin-mdx": "^1.8.2",
    "eslint-plugin-nuxt": "^2.0.0",
    "eslint-plugin-prettier": "^3.1.4",
    "prettier": "^2.2.1"
  }
Steps to reproduce
  1. Open https://codesandbox.io/s/modest-bird-4p917?file=/.eslintrc.js
    -> A sample Nuxt project with minor modifications and additional (eslint) dependencies
  2. Run yarn lint in a new terminal
Expected behaviour

Documentation of this library claims that it only affects .mdx files, so there should be no new sudden errors.

Actual behaviour

The valid .vue files fail on lint. If you remove "plugin:mdx/recommended" from .eslintrc.js and try again, this time there's no error.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4