-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
stacksjs/eslint-plugin
#62Description
First of all, thank you for your work on this plugin. I currently have the following issue. Currently, the jsdoc/no-undefined-types rule behaves strangely with the TypeScript is operator.
Expected behavior
/**
* @template {unknown} T
* @param {unknown} value
* @param {...T} validValues
* @returns {value is T}
*/
const checkIsOnOf = (value, ...validValues) => {
return validValues.includes(value);
};With no jsdoc/no-undefined-types error.
Actual behavior
The code above will fail with the error: "5:1 error The type 'value' is undefined jsdoc/no-undefined-types". Please note that the syntax is fully valid TypeScript, and TypeScript handles it just fine.
Environment
- Node version: 24.11.0
- ESLint version: 9.39.0
eslint-plugin-jsdocversion: 61.1.11
PS. I upgraded fromeslint-plugin-jsdocversion 46.9.0, and this issue did not exist in that version. Although I know that, in general,no-undefined-typesis a problematic rule 🫠