In a typescript interface i can document it like this
interface Foo {
/** A description for the property. */
bar: string
}
I would like to be able to enforce jsdoc descriptions on all properties
Use the jsdoc/require-jsdoc rule with the following option object (including other contexts you need to support):
{
contexts: [
'TSPropertySignature'
]
}
I will close, as that should address the issue, but feel free to comment further.
That was it! I couldn't find that name anywhere in this repo though. Is there somewhere where TSPropertySignature and other contexts are listed?
The TypeScript types can be found at https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/typescript-estree/src/ts-estree/ts-estree.ts and for background, one can look them up at https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md (noting one would search for "property signature" at the latter rather than TSPropertySignature).