Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING: Update jsdoc/require-jsdoc to require documentation for more things #394

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 1, 2025

This updates the jsdoc/require-jsdoc rule to require documentation for:

  • Arrow functions.

    const myFunction = () => {
      // ...
    };
  • Class declarations.

    class MyClass {
      // ...
    }
  • TypeScript enum declarations.

    enum MyEnum {
      // ...
    };
  • Function expressions.

    const myFunction = function () {
      // ...
    };
  • TypeScript interface declarations.

    interface MyInterface {
      // ...
    };
  • Method definitions.

    const myObject = {
      myFunction() {
        // ...
      },
    };
  • TypeScript type alias declarations.

    type MyType = {
      // ...
    };
  • TypeScript property signatures.

    type MyType = {
      myProperty: string;
    };

Breaking changes

Each of the code blocks above was previously valid, but will now produce an error.

Closes #223.

@Mrtenz Mrtenz requested review from a team as code owners March 1, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Verify that type aliases and interfaces, as well as members for these, have documentation
1 participant