I see some work has been done recently to support TypeScript interfaces for the require-jsdoc rule. Thanks! I can get it to require documentation for the interface itself, but unfortunately not for any of its members.
Given this TypeScript interface:
export interface Foo {
bar: number;
baz: string;
quux(): void;
}
I would expect lint warnings for missing documentation for bar, baz, and quux, given the presence of "TSPropertySignature" and "TSMethodSignature" in contexts in my config (see below).
I only receive a lint warning for the missing docs on the Foo interface, but not for any of its properties or methods.
"jsdoc/require-jsdoc": [
"warn",
{
"publicOnly": true,
"require": {
"ArrowFunctionExpression": true,
"ClassDeclaration": true,
"ClassExpression": true,
"FunctionDeclaration": true,
"FunctionExpression": true,
"MethodDefinition": true
},
"contexts": [
"ArrowFunctionExpression",
"FunctionDeclaration",
"FunctionExpression",
"MethodDefinition",
"Property",
"TSDeclareFunction",
"TSEnumDeclaration",
"TSInterfaceDeclaration",
"TSMethodSignature",
"TSPropertySignature",
"TSTypeAliasDeclaration",
"VariableDeclaration"
],
"checkGetters": true,
"enableFixer": false
}
]
See interface in Actual behavior above.
eslint-plugin-jsdoc version: 30.6.3:tada: This issue has been resolved in version 30.6.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for the quick fix! Seems to be working. Now I have a bunch of documentation to write :smile:.
Most helpful comment
Thanks for the quick fix! Seems to be working. Now I have a bunch of documentation to write :smile:.