eslint-plugin-jsdoc
eslint-plugin-jsdoc copied to clipboard
report an error when a package imported in a `@type` is not present in `package.json`
Motivation
i use import/no-extraneous-dependencies to ensure that i don't accidentally install and import dependencies without adding to package.json.
it would be nice to have that functionality in jsdoc @types as well
Current behavior
no error when eslint and/or @types/eslint is not present in dependencies or devDependencies in `package.json
/** @type {import('eslint').Linter.ParserOptions} */
const foo = {}
Desired behavior
error
Alternatives considered
raised an issue on eslint-plugin-import but it was suggested that i raise it here as it's apparently not able to check jsdocs - https://github.com/import-js/eslint-plugin-import/issues/2508#issuecomment-1193764236