Skip to content

Target property with decorator #662

@jerone

Description

@jerone

How can I make the rule jsdoc/require-jsdoc work with properties that have a specific decorator/annotation in TypeScript?

Configuration: https://repl.it/@jerone/eslint-jsdoc-requiredoc-decorator#.eslintrc.json

{
  "parser": "@typescript-eslint/parser",
  "plugins": ["jsdoc"],
  "rules": {
    "jsdoc/require-jsdoc": [
      "error",
      {
        "contexts": ["Property:has(Decorator[name=\"Input\"])"]
      }
    ]
  }
}
export class User {
  @Input()
  public name: string;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions