Open iliubinskii opened 3 years ago
ESLint is not aware of the whole program, so if we were to support this, it would probably only check the current file. However, this is not something I'm really inclined to spend time on. PR would be fine.
My workaround is usually to add a @see
like
export class B implements A {
/** @see A.f */
public f(): void {
It works well with require-jsdoc
and on hover over the f
in B.f(…)
you get the correct docs in the editor.
The only downside is that it does not play well with require-param
, because require-param
does not know the content of A.f
(and probably never will).
Expected behavior
Method without documentation should pass when there is a documentation for it in an interface located in "implements" section.
I have checked that this situation is correctly handled by typedoc (https://www.npmjs.com/package/typedoc) and vscode editor. Both extract documentation from interface.
See that vscode undestands this situation:![Sample](https://user-images.githubusercontent.com/70687432/125608374-b4735e00-aa49-4bf3-b729-0b3a368948b5.jpg)
Actual behavior
The rule shows error in the situation described above.
ESLint Config
ESLint sample
Environment