question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ignore option on the require-jsdoc rule

See original GitHub issue

( I am using “eslint”: “^1.9.0” ) It will be nice if we can specify functions that the rule will ignore. e.g. the render function on React components is kinda obvious what is doing and a comment block is not really needed.

screen shot 2016-03-14 at 10 58 36

It will be nice if we can have something like:

        "require-jsdoc"              : [ 2,
        {
            "require":
            {
                "FunctionDeclaration" : true,
                "MethodDefinition" : true,
                "ClassDeclaration" : true
            },
            "ignore":
            {
                "render"  : true,
                "constructor" : true,
                "componentDidMount"  : true
            }
        }],

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
nzakascommented, Mar 30, 2016

This would be a pretty big hack and would likely have a lot of false positives, so I don’t think we can implement this.

0reactions
JakubRimalcommented, Jan 5, 2018

There is a quite new plugin for that: https://github.com/MaienM/eslint-plugin-require-jsdoc-except

It even supports regular expressions so you can add e.g. ignore rule "/^_.*$/" which will ignore require-jsdoc for all method/functions starting with _.

Read more comments on GitHub >

github_iconTop Results From Across the Web

require-jsdoc - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
eslint-plugin-require-jsdoc-except - npm
A modified version of the built-in eslint rule require-jsdoc that allows you to exclude certain methods from requiring a JSDoc.
Read more >
How to disable require-jsdoc eslint in webpack - Stack Overflow
I used the .eslintrc.json file and added this under rules. "require-jsdoc" : 0. I don't use webpack. Hope this helps.
Read more >
netsells/eslint-plugin-require-jsdoc-except - npm package - Snyk
A modified version of the built-in eslint rule require-jsdoc that allows you to exclude certain methods from requiring a JSDoc.
Read more >
README.md
```js // `.eslintrc.js` { rules: { 'jsdoc/require-example': [ // The Error level should be `error`, `warn`, or `off` (or 2, 1, or 0)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found