Skip to content
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

Is there a way to switch off jsdoc enforceExistence for anonymous arrow functions? #193

Open
blazkovicz opened this issue Mar 3, 2016 · 3 comments

Comments

@blazkovicz
Copy link

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:

1

Next config does not help:

"jsDoc": {
    "enforceExistence": {
      "allExcept": [
        "expressions",
        "paramless-procedures"
      ]
    }
  }
@qfox
Copy link
Member

qfox commented Mar 3, 2016

Looks like you are looking for 'arrow': https://github.com/jscs-dev/jscs-jsdoc/blob/master/lib/rules/validate-jsdoc/enforce-existence.js#L19

@qfox qfox added the question label Mar 3, 2016
@blazkovicz
Copy link
Author

Thank you, I thought that option 'anonymous': false should cover my case. Is it supported fully, because official docs don't contain this option?

@qfox
Copy link
Member

qfox commented Mar 4, 2016

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants