Parsing error: visit is not a function
See original GitHub issueInitial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
2.0.0
Link to runnable example
No response
Steps to reproduce
The following sample file fails to lint:
---
title: "Summer Duran"
type: art
draft: false
created: "2021-05-28"
---
<SummerDuran1 />
eslint config:
"eslintConfig": {
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"overrides": [
{
"files": [
"*.mdx"
],
"extends": [
"plugin:mdx/recommended"
],
"globals": {
"AwesomeCutScenes": "readonly"
},
"rules": {
"react/jsx-no-undef": [
2,
{
"allowGlobals": true
}
]
}
}
],
"env": {
"es6": true,
"browser": true,
"jest": true,
"node": true
},
"rules": {
"react/react-in-jsx-scope": 0,
"react/display-name": 0,
"react/prop-types": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/no-unused-vars": [
2,
{
"argsIgnorePattern": "^_"
}
],
"no-console": [
2,
{
"allow": [
"warn",
"error"
]
}
]
},
"settings": {
"react": {
"version": "detect"
}
}
},
Expected behavior
- should lint
- but upgrading to eslint 8.X breaks the MDX parser
Actual behavior
- the above error
environment
"eslint": "8.18.0",
"eslint-config-prettier": "8.1.0",
"eslint-plugin-mdx": "2.0.0",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "4.6.0",
Runtime
Node v16
Package manager
yarn v1
OS
macOS
Build and bundle tools
Next.js
Issue Analytics
- State:
- Created a year ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
Parsing error: parser.parse is not a function #512 - GitHub
On codeclimate.com the PR is failing but the only error message shown on the site is Parsing error: parser.parse is not a function...
Read more >meteor - ESLint React Parsing Error - Stack Overflow
It works fine until I try and use React. main.js: Meteor.startup(() => { render(<App ...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >Help! Now getting 'Parsing Error "" is not a function' on all ...
I've been working on debugging this, non-stop for the past week, searching issues, forums, etc.
Read more >ESLint@8.23: TypeError: this.libOptions.parse is not a function
Upon lint a file, ESLint failed with the following error: this.libOptions.parse is not a function 3. I use tabs instead of spaces, in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry, it’s
vfile
.And a new temporary fixed version of
eslint-plugin-mdx
isSee https://ci.codesandbox.io/status/mdx-js/eslint-mdx/pr/405/builds/265745 for more installation details for other npm clients.
I do get the same error:
Parsing error: visit is not a function eslint