Closed aljones15 closed 5 years ago
docs that you referenced indicate that this rule is deprecated: https://eslint.org/blog/2018/11/jsdoc-end-of-life
wow... ok well let's add the plugin then
https://github.com/gajus/eslint-plugin-jsdoc
need to decide on rules for this.
@mattcollier I enabled all the rules going to test it out on the bedrock-web-account
this branch os crypto-ld is currently using this branch:
https://github.com/digitalbazaar/crypto-ld/tree/enhancement/jsdoc-to-readme
@aljones15 I used this some this week, and for projects that have jsdocs, I think it's fine.
However, we have use cases where we need nodejs linting without jsdocs, so I would like to somehow make the jsdoc stuff (and the requisite deps) optional. Our bedrock-foo-http
modules for instance do not have public nodejs APIs. So for those, there might be some jsdocs for some private functions or something, but we won't be using the jsdoc2markdown stuff. In the fullness of time, we may want a RAML to markdown thing going on, but not now.
So, do we need to do an extension like with vue? So we use eslint-config-digitalbazaar/jsdocs
when we want that enabled?
hey one idea might be something like this:
module.exports = function() {
const rules = {
eslintRuleshere...
}
try {
require('eslint-plugin-jsdoc');
return rules;
} catch(e) {
throw new Error('This rule set requires js-doc to be installed');
}
}
Hence we get something out of the .js file in addition to clearly warning the user that a dependency is needed.
@aljones15 I saw some conversation related having to specify @description
vs implicit. I thought this may have already been patched but that's not the case. Will you apply that patch?
@aljones15 I saw some conversation related having to specify
@description
vs implicit. I thought this may have already been patched but that's not the case. Will you apply that patch?
good catch here guess I forgot to change that to a 0. made the change should be in the repo in a second.
turns on these rules: