eslint-plugin-jsdoc
eslint-plugin-jsdoc copied to clipboard
`no-undefined-types`: Include instance property names in the set of defined types
Expected behavior
I would like to be able to reference instance properties from an inline {@link ...} tag on a class and have the no-undefined-types rule recognise this as a defined type.
Actual behavior
Referencing an instance property name in an inline {@link } tag yields
The type 'foo' is undefined.
ESLint Config
{
"parserOptions": {
"ecmaVersion": "latest"
},
"extends": [
"plugin:jsdoc/recommended"
],
"rules": {
"jsdoc/no-undefined-types": "warn"
}
}
ESLint sample
class Foo {
foo = "foo";
/**
* Something related to {@link foo}
* @returns {string} Something awesome
*/
bar() {
return "bar";
}
}
Environment
- Node version: v18.9.0
- ESLint version v8.43.0
eslint-plugin-jsdocversion: v46.2.6
also having this issue. it's preventing me from upgrading: https://github.com/flex-development/tutils/actions/runs/5439784079/jobs/9892093691?pr=296