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.

Allow disabling rules inside JSDoc comments

See original GitHub issue

Tell us about your environment

  • ESLint Version: 3.12.2
  • Node Version: 6.9.1
  • npm Version: 4.0.2

What parser (default, Babel-ESLint, etc.) are you using? babel-eslint

Currently if to use disable a rule for a whole file I have to use the following comment before actual code:

/* eslint-disable no-console */
console.log('YAY!');

It works flawlessly, but I think It would be nice to also support another way, just like flowtype:

/**
 * YAY Module
 * @module foo/yay
 * @summary Outputs "YAY" on console
 * @eslint-disable no-console
 * @flow
 */

console.log('YAY!');

This allows files to have a single comment header.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Jan 10, 2017

Seems interesting. I don’t know how much change would be required in ESLint core or, for that matter, Doctrine (our JSDoc parser). If a lot of work is required, I’d be 👎 for this change just on cost/benefit analysis. If it’s not too hard to do this, I could be 👍 for it. But I want to hear what other team members think.

0reactions
nzakascommented, Jan 21, 2017

Closing, as there’s no support on the team for this change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

require-jsdoc - ESLint - Pluggable JavaScript Linter
This rule requires JSDoc comments for specified nodes. Supported nodes: "FunctionDeclaration"; "ClassDeclaration"; "MethodDefinition"; "ArrowFunctionExpression" ...
Read more >
How do I configure eslint-plugin-jsdoc to disallow '*' and 'any ...
I'm trying to set preferredTypes to prevent * or any as param/property types. I don't want to use most of the recommended rules...
Read more >
Eslint-plugin-jsdoc - npm.io
Allow tags (@private or @internal) to disable rules for that comment block. settings.jsdoc.ignorePrivate - Disables all rules for the comment block on which ......
Read more >
eslint-plugin-jsdoc/README.md - UNPKG
16, * [Settings](#eslint-plugin-jsdoc-settings). 17, * [Allow tags (`@private` or `@internal`) to disable rules for that comment ...
Read more >
JSDoc comments | CLion Documentation - JetBrains
To turn off automatic generation of JSDoc comments, open the Settings/Preferences dialog ( Ctrl ...
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