You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
disableFix: true in any stylelint rule breaks the output of the node api if the fix: true option is set.
If this configuration is provided for any rule, instead of containing the fixed code, the regular output that would have been shown without the fix: true flag is returned.
A symptom of this issue is that the VSCode eidtor integration can not autofix any issues.
And configuration:
Example stylelint config:
used packages: stylelint-order, stylelint-scss, stylelint-declaration-strict-value.
module.exports={customSyntax: "postcss-scss",plugins: ["stylelint-declaration-strict-value","stylelint-order"],rules: {"order/properties-order": [["margin","border"],{unspecified: "bottom"}],"scale-unlimited/declaration-strict-value": ["/border/",{disableFix: true},// this one breaks the autofix],},};
What Stylelint configuration is needed to reproduce the bug?
module.exports={plugins: ["stylelint-declaration-strict-value","stylelint-order"],rules: {"order/properties-order": [["margin","border"],{unspecified: "bottom"}],"scale-unlimited/declaration-strict-value": ["/border/",{disableFix: true},// this one breaks the autofix],},};
How did you run Stylelint?
NodeJS script, provided in steps to reproduce bug
Which version of Stylelint are you using?
14.15.0
What did you expect to happen?
I expect the intResult.output to contain the fixed CSS
…ue` stylelint#6542fixesstylelint#6542 and bv that should also fixstylelint/vscode-stylelint#369
Issue: The API did not return the fixed css in `output` if any rule contained `ruleDisableFix`.
I have removed the `ruleDisableFix` code, because it did not affect the code fixing itself and was assumingly wrongly used to change the content format of `output`.
I have adjusted some tests to adapt to the changed behaviour and extended the test conditions to check that the returned code has the correct fixes applied.
Issue was introduced in stylelint#5460
What steps are needed to reproduce the bug?
disableFix: true
in any stylelint rule breaks theoutput
of the node api if thefix: true
option is set.If this configuration is provided for any rule, instead of containing the fixed code, the regular output that would have been shown without the
fix: true
flag is returned.A symptom of this issue is that the VSCode eidtor integration can not autofix any issues.
Example Script
And configuration:
Example stylelint config:
used packages: stylelint-order, stylelint-scss, stylelint-declaration-strict-value.
What Stylelint configuration is needed to reproduce the bug?
How did you run Stylelint?
NodeJS script, provided in steps to reproduce bug
Which version of Stylelint are you using?
14.15.0
What did you expect to happen?
I expect the
intResult.output
to contain the fixed CSSWhat actually happened?
But as soon as
disableFix: true
is set, I get the following result:which is similar to the result that I get when I remvoe the
fix: true
option from the node script.Does the bug relate to non-standard syntax?
I don't think so
Proposal to fix the bug
Not yet, will try to look into it.
The text was updated successfully, but these errors were encountered: