Eslint-plugin-jsdoc: Incorporating now deprecated `valid-jsdoc` ESLint jsdoc rules and options which we do not already support

Created on 29 Nov 2018  路  12Comments  路  Source: gajus/eslint-plugin-jsdoc

If you weren't aware, ESLint has end-of-lifed their jsdoc support: https://eslint.org/blog/2018/11/jsdoc-end-of-life (and are recommending eslint-plugin-jsdoc as a replacement).

~Besides this it would be very nice to incorporate the functionality of ~require-jsdoc and~ valid-jsdoc which are not part of eslint-plugin-jsdoc and document how to transition...~ See https://github.com/gajus/eslint-plugin-jsdoc/wiki/Comparison-with-deprecated-JSdoc-related-ESLint-rules for already existing equivalents or near-equivalents and below for the remaining.

~For require-jsdoc, see #162. (original source and tests)~ Merged

~For our need to deal with the deprecation of sourceCode.getJSDocComment, see #189.~ Merged

~We have no equivalents yet for the following behaviors:~

We have no equally powerful/granular replacements for the following options:

  • [x] - ~matchDescription option: require-description-complete-sentence and newline-after-description can handle subsets of this, but matchDescription is more flexible and powerful.~
  • [x] - ~Review valid-jsdoc source for any discrepancies or missing subfeatures with existing equivalent behaviors (require-jsdoc has already been reimplemented); this should also assist in closing #1 ; current PRs should handle all behavior differences.~
  • [x] - preferType option: check-types is only able to enforce one specific set of types, rather than arbitrary remapping of preferred types (I've suggested at #166 that we also allow the values to be false to indicate there is no preferred replacement--just a blanket prohibition of that type.) Update wiki mentions of preferType when done
help wanted released

Most helpful comment

:tada: This issue has been resolved in version 6.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

All 12 comments

FWIW, I also had filed this issue related to improving the support they had:

Is there a mapping for whatever ESLint's jsdoc did to whatever of your plugin rules would apply?

I am not aware of any, but you could take a look at the two ESLint rules which they are planning to remove and compare with the plugin's:

Note that while there are only two rules, there are a good number of options for the latter.

I have been using eslint-plugin-jsdoc and these rules both in my config as each does some things the other does not.

Not 100% related, but maybe it will be beneficial to write a document (or a segment in the README) explaining how to transition from the built-in ESLint rules to the plugin?

I've updated my original comment just now to also request documenting of this...

It'd be really nice to have a require-jsdoc equivalent.

162 relates to this issue

I've updated this issue to focus exclusively on valid-jsdoc and implementing those aspects/options which we don't already support. Tracking for require-jsdoc as mentioned is in #162

I've also moved mention of our need to replace reliance on ESLint's SourceCode#getJSDocComment over to #189.

And I've started a wiki page at https://github.com/gajus/eslint-plugin-jsdoc/wiki/Comparison-with-deprecated-JSdoc-related-ESLint-rules to try to map any existing equivalents or tracking issues for planned future equivalents for the various dimensions and options of the deprecated valid-jsdoc feature (though up to this moment, I've mostly just set up the tables and haven't listed existing equivalents yet).

Ok, the wiki pages should now be complete, and I've revised my original comment in this issue to summarize the 5 capabilities remaining from ESLint which are not available at the moment in eslint-plugin-jsdoc (3 of which relate to require-returns behavior).

Regarding the matchDescription regex string setting allowed by valid-jsdoc, @gajus , where would you suggest putting an equivalent? As a setting accessible to require-description-complete-sentence which would override its behavior or a new rule with an option (or with a setting)?

:tada: This issue has been resolved in version 6.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hipstersmoothie picture hipstersmoothie  路  3Comments

OmgImAlexis picture OmgImAlexis  路  5Comments

kirkstrobeck picture kirkstrobeck  路  4Comments

Fiyin-Anne picture Fiyin-Anne  路  4Comments

lgaticaq picture lgaticaq  路  6Comments