-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get require-jsdoc-on-export rule to work #5
Comments
This in interesting, thanks for raising an issue. On a personal note, I've mostly stopped using JSDoc in favor of an approach that has no comments as of a year and a half ago (hence the benderthecrime/no-comment rule) in favor of external documentation and code that is self-explanatory. This rule should have been marked deprecated then, but it wasn't broken at the time. I'm going to tell you right now that I have no idea what the original intent for the schema taking a number as it's second argument was or what configuring the types to false by default achieved. I think perhaps I'm going to show this rule some love by enabling all types by default and restructuring the rule to visit export AST types, checking against an "excludes" type list as a configuration parameter. example: {
"benderthecrime/require-jsdoc-on-export": [
2,
{
"excludes": [
"VariableDeclaration"
]
}
]
} any thoughts on this? |
Yes, I think it makes sense, since the rule already introduces reasonable limit on jsdoc requirements, enabling it for all exported entities by default is a good choice. If someone for any reason needs to limit it even more, |
Ok, I'll follow up when I get on solid ground and can make a PR.
…Sent from my iPhone
On Aug 15, 2017, at 7:43 AM, Andrej Mišustin ***@***.***> wrote:
Yes, I think it makes sense, since the rule already introduces reasonable limit on jsdoc requirements, enabling it for all exported entities by default is a good choice. If someone for any reason needs to limit it even more, excludes seems to be semantically adequate.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm trying to use the
benderthecrime/require-jsdoc-on-export
rule to work, by adding it to the .eslintrc file as:However, eslint is not happy with the configuration:
I guess the reason might be the rule schema, which doesn't make sense to me at the first glance:
eslint-plugin-benderthecrime/lib/rules/require-jsdoc-on-export.js
Line 86 in 9525036
I was trying to get rid of the standard-jsdoc eslint behaviour requiring comments for virtually everything to more reasonable documenting the exports only.
eslint is v4.4.1, eslint-plugin-benderthecrime is
^2.1.0
The text was updated successfully, but these errors were encountered: