Allow disabling rules inside JSDoc comments
See original GitHub issueTell 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:
- Created 7 years ago
- Reactions:1
- Comments:8 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
Closing, as there’s no support on the team for this change.