-
-
Couldn't load subscription status.
- Fork 169
Closed
stacksjs/eslint-plugin
#62Description
Expected behavior
The @typedef tag cannot find a type created in JavaScript. No error should be reported by no-undefined-types.
Actual behavior
This bug has been present since v60.4.0.
npm installnpx eslint/home/regseb/testcase/index.js 14:1 error The type 'Severities' is undefined jsdoc/no-undefined-types 14:1 error The type 'Severities' is undefined jsdoc/no-undefined-types ✖ 2 problems (2 errors, 0 warnings)
eslint.config.js
import jsdoc from "eslint-plugin-jsdoc"; export default [ { plugins: { jsdoc }, rules: { "jsdoc/no-undefined-types": "error", } } ];index.js
/** * La liste des sévérités. * * @type {Object<string, number>} */ const Severities = { FATAL: 1, ERROR: 2, WARN: 3, INFO: 4, }; /** * @typedef {Severities[keyof Severities]} Severity Le type des sévérités. */ export default Severities;package.json
{ "name": "testcase", "version": "1.0.0", "type": "module", "dependencies": { "eslint": "9.38.0", "eslint-plugin-jsdoc": "61.1.7" } }Environment
- Node version: v22.20.0
- ESLint version: v9.38.0
eslint-plugin-jsdocversion: 61.1.7