Description
Attempting to run npx eslint --inspect-config in project using eslint-plugin-mdx results in the following error:
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)
The check for require cache in the plugin seems to be a problem:
The failure since to be OS agnostic (not related to paths), since it happens on macOS and Windows.
Reproduction steps
- Check out https://github.com/facebook/react-native-website.
- Run
npx eslint --inspect-config at thge root to see the failure.
- Comment out
eslint-plugin-mdx import and its usages in eslint.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.
Description
Attempting to run
npx eslint --inspect-configin project usingeslint-plugin-mdxresults in the following error:The check for require cache in the plugin seems to be a problem:
The failure since to be OS agnostic (not related to paths), since it happens on macOS and Windows.
Reproduction steps
npx eslint --inspect-configat thge root to see the failure.eslint-plugin-mdximport and its usages ineslint.config.js:npx eslint --inspect-config, it should work now.