gajus / eslint-plugin-jsdoc

JSDoc specific linting rules for ESLint.
Other
1.09k stars 157 forks source link

Add support for in-line openapi #1300

Closed Virus288 closed 1 month ago

Virus288 commented 1 month ago

Motivation

I use package Swagger-Jsdoc . This plugin seems to be complaining about

/ **
* @openapi
*/

Which is used by Swagger-jsdoc, to mark openapi syntax. image

I would love for this plugin to have option to ignore jsdoc, which includes @openapi.

Sample code: https://github.com/Monsters-RPG-game/Gateway/blob/dev/src/structure/modules/user/register/router.ts Minimal eslint rules. related this issue

{
         "jsdoc/check-tag-names": 1,
         "jsdoc/check-indentation": 1
}

Current behavior

Currently plugin complains about jsdoc, which has @openapi

Desired behavior

Add some way to ignore jsdoc, which include @openapi, or add a way to ignore jsdoc blocks, which include specific tag

Alternatives considered

N/A

brettz9 commented 1 month ago

For check-tag-names, there is this option.

For check-indentation, you can either disable the rule or set this option.

For example:

"rules: {
  "jsdoc/check-tag-names": ["warn", {"definedTags": ["openapi"]}],
  "jsdoc/check-indentation": ["warn", {"excludeTags": ["openapi"]}]
}
brettz9 commented 1 month ago

Closing as that should resolve, but feel free to comment further as needed.

Virus288 commented 1 month ago

Thanks. I couldn't find it