# require-tags Requires tags be present, optionally for specific contexts. ## Options A single options object has the following properties. ### tags May be an array of either strings or objects with a string `tag` property and `context` string property. ||| |---|---| |Context|everywhere| |Tags|(Any)| |Recommended|false| |Settings|| |Options|`tags`| ## Failing examples The following patterns are considered problems: ````ts /** * */ function quux () {} // "jsdoc/require-tags": ["error"|"warn", {"tags":["see"]}] // Message: Missing required tag "see" /** * */ function quux () {} // "jsdoc/require-tags": ["error"|"warn", {"tags":[{"context":"FunctionDeclaration","tag":"see"}]}] // Message: Missing required tag "see" /** * @type {SomeType} */ function quux () {} // "jsdoc/require-tags": ["error"|"warn", {"tags":[{"context":"FunctionDeclaration","tag":"see"}]}] // Message: Missing required tag "see" /** * @type {SomeType} */ function quux () {} // Message: Rule `require-tags` is missing a `tags` option. ```` ## Passing examples The following patterns are not considered problems: ````ts /** * @see */ function quux () {} // "jsdoc/require-tags": ["error"|"warn", {"tags":["see"]}] /** * */ class Quux {} // "jsdoc/require-tags": ["error"|"warn", {"tags":[{"context":"FunctionDeclaration","tag":"see"}]}] ````