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

feat: allow to define eslint-disable-next-line in multiple lines #15436

Merged
merged 8 commits into from Dec 29, 2021

Conversation

snitin315
Copy link
Contributor

@snitin315 snitin315 commented Dec 18, 2021

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[X] Other, please explain: Allow eslint-disable-next-line directive to be of multiple lines

What changes did you make? (Give an overview)

Fixes #14284

/* eslint-disable-next-line global-require --
   description on why this exception is seen as appropriate but past a 
   comfortable reading line length */
const fizz = require(buzz); // ignored

/* eslint-disable-next-line 
    no-alert
*/
alert("buzz"); // ignored

Is there anything you'd like reviewers to focus on?

None

@eslint-github-bot eslint-github-bot bot added the triage label Dec 18, 2021
@eslint-github-bot

This comment has been minimized.

@snitin315 snitin315 changed the title feat: allow to defineeslint-disable-next-line directive in multiple lines feat: allow to define eslint-disable-next-line in multiple lines Dec 18, 2021
@eslint-github-bot eslint-github-bot bot added the feature label Dec 18, 2021
@snitin315 snitin315 marked this pull request as ready for review Dec 18, 2021
@mdjermanovic mdjermanovic added accepted core enhancement and removed triage labels Dec 22, 2021
@mdjermanovic
Copy link
Member

@mdjermanovic mdjermanovic commented Dec 23, 2021

It would be good to update this section in the docs with multiline eslint-disable-next-line comments:

https://eslint.org/docs/user-guide/configuring/rules#using-configuration-comments-1

@snitin315 snitin315 force-pushed the feat/multiline-eslint-disable-next-line-directives branch from 4c831ed to e10efd6 Compare Dec 24, 2021
Copy link
Member

@mdjermanovic mdjermanovic left a comment

LGTM, thanks!

Since this is a change in the core, I'll leave it open for a few days in case someone else wants to review it, and then merge.

@mdjermanovic mdjermanovic merged commit 3b38018 into main Dec 29, 2021
14 checks passed
@mdjermanovic mdjermanovic deleted the feat/multiline-eslint-disable-next-line-directives branch Dec 29, 2021
@thernstig
Copy link

@thernstig thernstig commented Feb 2, 2022

@snitin315 some of us prefer to reserver /* just for JSDoc comments and instead use multi-line // for the rest of the comments.

Is there any chance support could be added for this? I assume it was not as part of this as I cannot see it in the docs:

// 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

@snitin315
Copy link
Contributor Author

@snitin315 snitin315 commented Feb 2, 2022

@thernstig please open a new issue for this.

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

Successfully merging this pull request may close these issues.

3 participants