-
Notifications
You must be signed in to change notification settings - Fork 86
eslint-plugin-jsdoc is ignorant about TypeDoc & TSDoc tags #3151
Description
eslint-plugin-jsdoc does some nice things, but it does not recognize the full set of tags as supported by TypeDoc (nor TSDoc, I imagine).
AFAICT the place to edit the rules for the JSDoc plugin is packages/eslint-plugin-lib/configs/style.js.
Some possible solutions:
- Add all of the missing tags to the rules (which incurs a maintenance burden)
- Disable checking of tags entirely; TypeDoc will warn if it encounters an unknown tag (and we can cause warnings to break in CI if we aren't already)
- Remove
eslint-plugin-jsdocsince we're mostly just disabling its rules anyhow
My personal preference is for either 2 or 3.
If we remove it, then I think we should add prettier-plugin-jsdoc which I can vouch for. They would probably fight like bettas if we tried to use both at once, though.
Note
Tangentially, the appearance of JSDoc tags in .ts sources will necessarily differ from those in .js sources, because types will be omitted from the former. I don't know how well eslint-plugin-jsdoc understands this or if it's currently just ignoring .ts sources. Furthermore, I'm of the opinion we should configure it to ignore types entirely (that is not its strong suit) and defer to typescript-eslint and/or tsc.
Note
#2682 is not a prerequisite to landing a solution here.
cc @turadg