Skip to content

jsdoc/no-types: Not reporting violations on TS interfaces #1249

@ej612

Description

@ej612

Hi there!

I have the following eslint config:

extends: [
  'plugin:jsdoc/recommended-typescript-error'
]

And the following code:

export class A {
    /**
     * @param {string} paramA
     */
    public methodA(paramA: string) {
        // ...
    }
}

no-types is warning me not to use types in my JSdoc (as expected):
image

If however, I don't declare a class, but an interface, like so:

export interface B {
    /**
     * @param {string} paramA
     */
    methodB(paramB: string): void
}

The rule no longer reports a violation.

Is this expected behavior? I would expect it to report a violation on interfaces as well.

Thanks a lot in advance!

Environment

  • Node version: 18
  • ESLint version 8.57.0
  • eslint-plugin-jsdoc version: 48.2.13

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions