-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
Expected behavior
no-undefined-types doesn't repport an error if the type used has been imported with @import tag.
Actual behavior
no-undefined-types doesn't know the @import types.
Files
package.json
{
"name": "testcase",
"version": "1.0.0",
"dependencies": {
"eslint": "9.5.0",
"eslint-plugin-jsdoc": "48.2.13"
}
}eslint.config.mjs
import jsdoc from "eslint-plugin-jsdoc";
export default [
{
plugins: { jsdoc },
rules: {
"jsdoc/no-undefined-types": "error"
}
}
];index.js
/**
* @import { Linter } from "eslint"
*/
/**
* @type {Linter.Config}
*/
const config = {};To reproduce
-
npm install -
npx eslint index.js/home/regseb/testcase/index.js 6:1 error The type 'Linter' is undefined jsdoc/no-undefined-types ✖ 1 problem (1 error, 0 warnings)
Environment
- Node version: 20.14.0
- ESLint version: 9.5.0
eslint-plugin-jsdocversion: 48.2.13