Open soullivaneuh opened 5 years ago
It looks like your CSS file has already been sorted according to the plugin settings. Try to reorder rules and run the command again to make sure the plugin works.
same issue here :
I have this minimal config :
{
"extends": [
"stylelint-config-standard",
"stylelint-config-sass-guidelines",
"stylelint-config-rational-order"
],
"rules": {
"selector-class-pattern": ["[a-z]",{
"resolveNestedSelectors": true
}],
"max-nesting-depth": [2, {}]
}
}
When i run stylelint
, I get the following output :
When I then run stylelint --fix
, I have no output from styleint (like when all the warnings have been fixed). But there is no change in the files. And then when I rerun stylelint
, I get the previous errors again
Weirdly, when i had this line to the config :
{
"extends": [
"stylelint-config-standard",
"stylelint-config-sass-guidelines",
"stylelint-config-rational-order"
],
"rules": {
"order/properties-alphabetical-order": [false], // <-- This line
"selector-class-pattern": ["[a-z]",{
"resolveNestedSelectors": true
}],
"max-nesting-depth": [2, {}]
}
}
The stylelint --fix
works as expected. But then I get warnings from order/properties-alphabetical-order whereas it should be disabled by the config... Weird.
Ok, so after looking it up, it's not "[false]" to disable alphabetical-order, but "null".
So with this config :
{
"extends": [
"stylelint-config-standard",
"stylelint-config-sass-guidelines",
"stylelint-config-rational-order"
],
"rules": {
"order/properties-alphabetical-order": null,
"selector-class-pattern": ["[a-z]",{
"resolveNestedSelectors": true
}],
"max-nesting-depth": [2, {}]
}
}
The --fix is working as expected. But I don't understand why I have to add this line manually. Shouldn't the plugin do it for me ?
With this css:
This configuration (basically copy/pasta).
And the command:
Strictly nothing happen.