-
-
Notifications
You must be signed in to change notification settings - Fork 169
Closed
Description
I'm using the publicOnly option on a TypeScript project, and while the contexts option is checked, the plugin is failing to find public interfaces that aren't documented.
More specifically, this pattern isn't being caught by jsdoc/require-jsdoc:
// Should be flagged for having no docs...
interface SomeComponentProps {
foo: number;
}
const SomeComponent: React.FC<SomeComponentProps> = () => null;
// ... due to this export.
export { SomeComponentProps };
export default SomeComponent;I experimented with the repo to see if I could isolate a test case, and I was (see below). When publicOnly is set to true, the interface isn't discovered as exported (the code option here is borrowed from another of the TS tests):
{
// This should raise 1 error but won't
code: `
export interface Foo extends Bar {
baz(): void;
meow(): void;
}
`,
errors: [{
message: 'Missing JSDoc comment.',
type: 'TSInterfaceDeclaration',
}],
options: [{
contexts: [
'TSInterfaceDeclaration',
],
publicOnly: true, // commenting out this line will result in a successful test
}],
parser: require.resolve('@typescript-eslint/parser'),
},Metadata
Metadata
Assignees
Labels
No labels