jscs-jsdoc
jscs-jsdoc copied to clipboard
Is there a way to switch off jsdoc enforceExistence for anonymous arrow functions?
Jscs "2.10.1" requires jsdoc for any anonymous arrow function. It's very inconvenient to write jsdoc for functions inside Array.sort, Array.map, Array.filter etc.
Example:

Next config does not help:
"jsDoc": {
"enforceExistence": {
"allExcept": [
"expressions",
"paramless-procedures"
]
}
}
Looks like you are looking for 'arrow': https://github.com/jscs-dev/jscs-jsdoc/blob/master/lib/rules/validate-jsdoc/enforce-existence.js#L19
Thank you, I thought that option 'anonymous': false should cover my case. Is it supported fully, because official docs don't contain this option?
Uhm, yeah, it's supported. It's excepted by default as I see, but if you specify another exception it's reenabled. I think all be fine if you will add 'anonymous' to your exceptions list.
And yes, it's a problem with docs. Thanks!