Skip to content

False positive with check-tag-names using js/ts decorator in @example #395

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

Closed
BBosman opened this issue Oct 6, 2019 · 1 comment
Closed

Comments

@BBosman
Copy link

BBosman commented Oct 6, 2019

I have a Java-/TypeScript decorator (named transient) inside my @example and the check-tag-names flags it as "Invalid JSDoc tag name". I would have expected everything between the backticks to be ignored by that rule?

Sample code:

/**
 * Registers the `target` class as a transient dependency; each time the dependency is resolved a new instance will be created.
 *
 * @param target - The class / constructor function to register as transient.
 *
 * @example ```ts
@transient()
class Foo { }
```
 */
export function transient<T>(target?: T): T {
  // ...
}

Rules:

{
  "jsdoc/check-tag-names": ["error", {
      "definedTags": [
        "chainable",
        "internal"
      ]
  }]
}

Am I doing something wrong, or is this an issue with the rule?

@brettz9 brettz9 added the bug label Oct 6, 2019
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Oct 24, 2019
…ment-parser` update

fix(check-tag-names): ensure that the fenced block content of `@example` tags are not treated as jsdoc tags; fixes gajus#395

Avoids decorators being treated as jsdoc tags
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Oct 27, 2019
…ment-parser` update

fix(check-tag-names): ensure that the fenced block content of `@example` tags are not treated as jsdoc tags; fixes gajus#395

Avoids decorators being treated as jsdoc tags
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Oct 29, 2019
…ment-parser` update

fix(check-tag-names): ensure that the fenced block content of `@example` tags are not treated as jsdoc tags; fixes gajus#395

Avoids decorators being treated as jsdoc tags
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Oct 29, 2019
…ment-parser` update

fix(check-tag-names): ensure that the fenced block content of `@example` tags are not treated as jsdoc tags; fixes gajus#395

Avoids decorators being treated as jsdoc tags
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Nov 3, 2019
…ment-parser` update

fix(check-tag-names): ensure that the fenced block content of `@example` tags are not treated as jsdoc tags; fixes gajus#395

Avoids decorators being treated as jsdoc tags
brettz9 added a commit to brettz9/eslint-plugin-jsdoc that referenced this issue Nov 3, 2019
…mple` tags are not treated as jsdoc tags; fixes gajus#395

Avoids decorators being treated as jsdoc tags
@brettz9 brettz9 closed this as completed in bfa237b Nov 3, 2019
@gajus
Copy link
Owner

gajus commented Nov 3, 2019

🎉 This issue has been resolved in version 17.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants