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.

Change Request: allowing eslint-disable-next-line directives to have extra lines only for descriptions

See original GitHub issue

ESLint version

v8.8.0

What problem do you want to solve?

It is possible to allow eslint-disable-next-line directives to span multiple lines like this:

/* eslint-disable-next-line no-console --
 * Here's a very long description about why this configuration is necessary
 * along with some additional information
**/

But some of us prefer reserving // for plain comments using multiline-comment-style with the option "separate-lines".

We would like to support this:

// eslint-disable-next-line global-require -- Some text here as well
// description on why this exception is seen as appropriate but past a 
// comfortable reading line length

What do you think is the correct solution?

For ESLint to support it.

Participation

  • I am willing to submit a pull request for this change.

Additional comments

Original PR for the currently allowed multi-line eslint-disable-next-line directives seen here https://github.com/eslint/eslint/pull/15436

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mdjermanoviccommented, Feb 4, 2022

I agree with closing as it seems there is no good way to support the requested feature.

1reaction
thernstigcommented, Feb 4, 2022

@mdjermanovic very true, should we close this then? I assume from all this there is no good way to support the original request?

Read more comments on GitHub >

github_iconTop Results From Across the Web

allowing eslint-disable-next-line directives to have extra lines ...
A pit of success may be allowing eslint-disable-next-line directives to have extra lines but only for the description. e.g.. /* eslint-disable- ...
Read more >
Rules - 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 >
Turning off eslint rule for a specific file - Stack Overflow
1) Disabling "All rules"​​ Two ways you can do this: Put /* eslint-disable-line */ at the end of the line(s), or /* eslint-disable-next-line...
Read more >
eslint-comments/require-description - mysticatea
This rule warns directive comments without description. WARNING. This rule can only be used with ESLint v7.x or later. # Rule Details. Examples...
Read more >
ESLint | WebStorm Documentation - JetBrains
To configure ESLint automatically in the current project, open the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Languages & Frameworks | ...
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