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

Fix multi-line double-slash command comments #5348

Open
Tracked by #5205
jeddy3 opened this issue Jun 6, 2021 · 3 comments
Open
Tracked by #5205

Fix multi-line double-slash command comments #5348

jeddy3 opened this issue Jun 6, 2021 · 3 comments
Labels
status: ask to implement ask before implementing as may no longer be relevant syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule
Milestone

Comments

@jeddy3
Copy link
Member

jeddy3 commented Jun 6, 2021

Refs: #4942 (comment) & #5346 (comment)

This issue only impacts users who are using Less and multi-line double-slash command comments, e.g.:

// stylelint-disable color-hex-case
// --
// description

a {color: #FFF; }

I doubt many, if any, users do this as Less isn't popular and support for multi-line double-slash command comments is a relatively new feature. As the workaround is to simply switch to /* style comments for these multi-line commands, I'd say this is a low priority. I'll add it to the 14.0.0 umbrella issue in case it does impact someone and they want to pick it up, but I don't see it as a blocker to releasing.

@jeddy3 jeddy3 added status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule syntax: less relates to Less and Less-like syntax labels Jun 6, 2021
@jeddy3 jeddy3 added this to the future-major milestone Jun 6, 2021
@jeddy3 jeddy3 mentioned this issue Jun 6, 2021
30 tasks
@nwalters512
Copy link

nwalters512 commented Aug 9, 2021

Wanted to add a +1 to this. We use a lot of such comments, and we started seeing Stylelint report issues in really weird places. For instance, a block of // comments in the middle of a file caused a lint error at the end of the file to be reported on a token in the middle of the comment. Here's a stripped-down version of that file illustrating the issue:

Screen Shot 2021-08-09 at 3 46 41 PM

I finally managed to figure out that the common link between all files with weird errors was the use of multi-line // comments and trace it back to this GitHub issues. As you pointed out, one can work around this by switching to /*-style comments, but it was a reallllly confusing 30 minutes spent banging my head against the table until I figured out that that's what I had to do to resolve this.

EDIT: this may be unrelated to this issue, looks like this is specifically about commands and possibly only applies to the upcoming v14. Digging into this more - will file another issue if needed.

SECOND EDIT: I'm pretty confident this is a separate issue. I submitted a bug report in #5438.

@jeddy3
Copy link
Member Author

jeddy3 commented Aug 10, 2021

EDIT: this may be unrelated to this issue, looks like this is specifically about commands and possibly only applies to the upcoming v14. Digging into this more - will file another issue if needed.
SECOND EDIT: I'm pretty confident this is a separate issue. I submitted a bug report in #5438.

Thanks for submitting the bug report. You're right that it's a separate issue. This issue specifically relates to a regression in the behaviour of multi-line double-slash command comments introduced by the migration to PostCSS@8 for the upcoming release.

@Mouvedia Mouvedia mentioned this issue Jun 27, 2023
10 tasks
Copy link
Contributor

This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant.

@github-actions github-actions bot added status: ask to implement ask before implementing as may no longer be relevant and removed status: ready to implement is ready to be worked on by someone labels Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ask to implement ask before implementing as may no longer be relevant syntax: less relates to Less and Less-like syntax type: bug a problem with a feature or rule
Development

No branches or pull requests

2 participants