-
-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and discussions and couldn’t find anything (or linked relevant results below)
Affected package
eslint-plugin-mdx
Steps to reproduce
- Check out https://github.com/facebook/react-native-website.
- Run
npx eslint --inspect-configat the root to see the failure. - Comment out
eslint-plugin-mdximport and its usages ineslint.config.js:import * as eslintPluginMdx from 'eslint-plugin-mdx'; [...] ...eslintPluginMdx.flat, processor: eslintPluginMdx.createRemarkProcessor({ lintCodeBlocks: false, remarkConfigPath: 'website/.remarkrc.mjs', }),
- Re-run
npx eslint --inspect-config, it should work now.
Refs:
Actual behavior
ESLint Inspect Config tool fails to load the config which use eslint-plugin-mdx:
Failed to load eslint.config.js
Error: Could not find ESLint Linter in require cache
at file:///W:/GitHub/react-native-website/node_modules/eslint-plugin-mdx/lib/processors/options.js:5:11
at ModuleJob.run (node:internal/modules/esm/module_job:377:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:671:26)
at async extractResult (file:///C:/Users/Simek/AppData/Local/npm-cache/_npx/fadb285f08a830ab/node_modules/bundle-require/dist/index.js:169:15)
at async run (file:///C:/Users/Simek/AppData/Local/npm-cache/_npx/fadb285f08a830ab/node_modules/bundle-require/dist/index.js:211:17)
I look like the require cache check is a the root of the issue:
Expected behavior
ESLint Inspect Config should be able to load the config, and start correctly.
Runtime
[email protected] and [email protected]
Package manager
Operating system
OS agnostic (tested on macOS and Windows)
Build and bundle tools
Docusaurus
Metadata
Metadata
Assignees
Labels
No labels