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

Doesn't validate JSDoc comments that aren't above a function definition #253

Closed
snoack opened this issue May 23, 2019 · 1 comment
Closed

Comments

@snoack
Copy link

snoack commented May 23, 2019

The valid-types rule doesn't identify the missing > in the type expression below, yet when running jsdoc on that source code it fails.

class Matcher
{
  constructor()
  {
    ...

    /**
     * Lookup table of compiled patterns for simple filters by their associated
     * keyword
     * @type {Map.<string,?CompiledPatterns}
     * @private
     */
    this._compiledPatternsByKeyword = new Map();
  }
}
@brettz9
Copy link
Collaborator

brettz9 commented May 23, 2019

The issue in this case is actually that valid-types only checks comment blocks above function scopes, so it isn't checking that block at all (but when placing such a type on the function instead, it handles the type ok). I'll close this therefore, but you can subscribe to #214 which is tracking the desire to see the scope expanded, e.g., to adding above properties/variables as in your case.

@brettz9 brettz9 closed this as completed May 23, 2019
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

No branches or pull requests

2 participants