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"
}
yarn --version
is 1.22.4
yarn lint
in a new terminalDocumentation of this library claims that it only affects .mdx
files, so there should be no new sudden errors.
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