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 false positives for two double slashed comments in *-empty-line-before #4917
Comments
I'm having a related issue. The following SCSS code snippet will skip the suppress comment as well and yield 2 lint errors. .icon {
// TODO use variable instead
// stylelint-disable-next-line
font-size: 21px;
} Result:
And if I change |
Ah probably related to #4911 |
@Eugeno Thanks for the report and for using the template. I can reproduce this using the demo: a {
// 1
// 2
margin: 0;
} I've labelled the issue as ready to implement. Please consider contributing if you have time. There are steps on how to fix a bug in a rule in the Developer guide. @sebastianhaeni Can you create a separate issue, please? Your issue is likely related to this one, but I think it's slightly different and will need a separate discussion. Thanks. |
@sebastianhaeni Can you try I think your issue is related to the change in #4895, which in hindsight may have been a breaking one. If // stylelint-disable-next-line -- TODO use variable instead or: // stylelint-disable-next-line
// -- TODO use variable instead |
@jeddy3 you are right. It's not fixed. Thanks for explaining the way how to write these comments. |
In our case it affects // stylelint-disable color-no-hex
a { color: #FFF }
// stylelint-enable color-no-hex
// some other unrelated comment causing Adding double dash in the end works as a workaround We have it in several places in the codebase. Any idea if this is going to be patched soon, so we can wait for updated version that fixes this regression, or should we update our codebase? |
Please see Draft PR #5050. I’ve added test cases which I believe accurately represent the issue observed with More details in the PR. Any help or guidance will be appreciated! |
As far as I can tell, this issue has been fixed in
I followed these steps using the sample code and configuration in duplicate tickets #4924 and #4938 for good measure, with identical results. I’m closing #5050 and recommend closing this issue as well. Special thanks to @jeddy3 for the assist on my draft PR! |
Yep, I can confirm, in 13.8.0 it's ok. |
Good job |
There are expected empty line before declaration after 2 or more lines of comments (with
//
). Neither in case of single line nor in case of version 13.6.1.declaration-empty-line-before
stylelint-config-standard
13.7.0
CLI
Yep, comments at SCSS.
No requirement for an empty line after comments (as said in configuration,
ignore: ["after-comment"]
).The text was updated successfully, but these errors were encountered: