-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Rule to report invalid inline jsdoc tags #1201
Comments
The rule Where you are putting the tags, TypeScript (and thus VSCode) expect escaping; the display issue is therefore not related to invalid tag names. You can either add a backslash in front of the If you still want to check inline tag names, indeed |
I don't want those to be jsdoc tag things, those are supposed to be code pieces that just happen to have the code blocks forgotten. We have I would like to have a way to mark these inline jsdoc tags as invalid (or needing wrapping) e.g. like this: Does this explain my feature request better? |
Yes, that helps clarify. And, I'm not sure we want such a rule to apply everywhere, at least if not in |
Ok, but there is still the likes of |
Though it won't provide a fixer, you could use 'jsdoc/no-restricted-syntax': ['warn', {
comment: 'JsdocBlock:has(JsdocDescriptionLine[description=/(?:^|\\s)@/])',
context: 'FunctionDeclaration',
}] |
Motivation
I recently discovered that one of my jsdocs was broken due to missing inline code blocks.
When hovered, this shows like this in vscode:
The same behavior is visible, when viewing at the TS-AST.
Current behavior
I couldn't find a rule here that reports unknown tags or typos in tags.
Desired behavior
A new rule/options that checks which jsdoc tags exist and check them against a (possibly configurable) allowed list of tags.
Alternatives considered
I tried using
but sadly that doesn't detect this kind of error either.
The text was updated successfully, but these errors were encountered: