-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
How can I require an @author tag in every JSDoc? #876
Comments
Glad to hear you're enjoying the plugin. Yes, you can use the `jsdoc/no-missing-syntax`: ['error', {
contexts: [
{
comment: 'JsdocBlock:has(JsdocTag[tag=author])',
context: 'any'
}
]
}
] Closing as that should resolve, though feel free to reply further as needed. |
If you are looking for the tags at the beginning of the document, you can use the following which insists that they be at the beginning: 'jsdoc/require-file-overview': ['error', {
tags: {
author: {
initialCommentsOnly: true,
mustExist: true,
preventDuplicates: false,
},
},
}] Although there is no special recognized enforcement for tags ending in
|
Apologies explained clumsily, I want to enforce |
Try {
contexts: [
{
comment: 'JsdocBlock:not(*:has(JsdocTag[tag=author]))',
context: 'any',
},
],
}, |
that works, really appreciate your help @brettz9 |
I am loving this plugin and have been trying to work out if there was a way to require each JSDoc comment to have an @author tag as per our development standards we use?
The text was updated successfully, but these errors were encountered: