-
-
Notifications
You must be signed in to change notification settings - Fork 986
Closed
Labels
status: ready to implementis ready to be worked on by someoneis ready to be worked on by someonesyntax: scssrelates to SCSS and SCSS-like syntaxrelates to SCSS and SCSS-like syntax
Description
What minimal example or steps are needed to reproduce the bug?
// rule-empty-line-before
.foo {
padding: 10px;
}
// rule-empty-line-before
.baz {
margin: 10px;
}What minimal configuration is needed to reproduce the bug?
{
"extends": [
"stylelint-config-standard-scss"
],
"rules": {
"rule-empty-line-before": "always"
}
}How did you run Stylelint?
Which Stylelint-related dependencies are you using?
{
"postcss": "^8.5.6",
"stylelint": "^16.21.0",
"stylelint-config-standard-scss": "^15.0.0",
"stylelint-scss": "^6.12.1",
}What did you expect to happen?
I’ve encountered some inconsistencies when using --compute-edit-info with the rule-empty-line-before rule. The issues appear in how fixes are generated and applied, particularly in relation to comment placement and formatting.
Additional notes
- Why are silent comments being changed to loud (/* */) ones? While this might be helpful for clarity or tooling, this change can be disruptive in codebases that intentionally use silent comments. It would be great to make this optional or configurable.
Expected Behavior:
- Fixes should apply consistently to all violations where possible.
- If a fix is skipped due to a conflict or other rule, the reason should be clear.
- Comment transformation should not be enforced unless explicitly opted in.
What actually happened?
- Fixes are not consistently applied across matching violations.
- Some fixes include a conversion from silent to loud comments (
//→/* */) and insertion of a newline. - Others only change the comment notation without adding the expected newline. (See example)
- In some cases, no fix is provided at all, even when the violation is detected and is not overlapping with others. Demo
Do you have a proposal to fix the bug?
No response
Metadata
Metadata
Assignees
Labels
status: ready to implementis ready to be worked on by someoneis ready to be worked on by someonesyntax: scssrelates to SCSS and SCSS-like syntaxrelates to SCSS and SCSS-like syntax