Oops! Something went wrong! :(
ESLint: 8.57.0
Error: Failed to load plugin 'jsdoc' declared in '.eslintrc.json': eslint-plugin-jsdoc tried to access espree, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
Required package: espree
Required by: eslint-plugin-jsdoc@virtual:9e2d75c26d812ba07f2548643e31c2f0eb2cb6f6eca268f33f7e7f2f00bc9a60e5174f4187df59beb0c43929d43a06842c0155865f0f7f541c96499f2ed6aada#npm:48.9.3 (via /…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/)
Require stack:
- /…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/getJsdocProcessorPlugin.cjs
- /…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/index.cjs
- /…/@eslint-eslintrc-npm-2.1.4-1ff4b5f908-10c0.zip/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
Referenced from: /…/packages/backend/.eslintrc.json
at require$$0.Module._resolveFilename (/…/.pnp.cjs:16695:13)
at Module._load (node:internal/modules/cjs/loader:1045:27)
at require$$0.Module._load (/…/.pnp.cjs:16586:31)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
at Module.require (node:internal/modules/cjs/loader:1304:12)
at require (node:internal/modules/helpers:123:16)
at Object.<anonymous> (/…/eslint-plugin-jsdoc-npm-48.9.3-8f2d22eed0-10c0.zip/node_modules/eslint-plugin-jsdoc/dist/getJsdocProcessorPlugin.cjs:10:38)
at Module._compile (node:internal/modules/cjs/loader:1504:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1588:10)
This is likely caused by 3ba475e589bc1dc83a7f57950378b2da0228e7fc (as espree is imported in src/getJsdocProcessorPlugin.js) and can be fixed by moving espree from devDependencies to dependencies.
Expected behavior
ESLint succeeds without errors.
Actual behavior
ESLint fails with:
This is likely caused by 3ba475e589bc1dc83a7f57950378b2da0228e7fc (as
espree
is imported insrc/getJsdocProcessorPlugin.js
) and can be fixed by movingespree
fromdevDependencies
todependencies
.ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: 48.9.3