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 8 commits into from Dec 29, 2021


Copy link

@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 
alert("buzz"); // ignored

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


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

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
Copy link

@mdjermanovic mdjermanovic commented Dec 23, 2021

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

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

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

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
accepted core enhancement feature
None yet

Successfully merging this pull request may close these issues.

3 participants