Closed Arichy closed 2 years ago
It is not a bug. To turn off rule in Stylelint you need to set it's value to null
:
{
"extends": ["stylelint-config-standard-scss"],
"plugins": ["stylelint-order"],
"rules": {
"order/properties-alphabetical-order": null
}
}
It is not a bug. To turn off rule in Stylelint you need to set it's value to
null
:{ "extends": ["stylelint-config-standard-scss"], "plugins": ["stylelint-order"], "rules": { "order/properties-alphabetical-order": null } }
Ok, it works. But the doc of order/order/properties-alphabetical-order
says the option is boolean. Maybe it's better to update the doc.
@Arichy good idea.
This PR is a bug fix. Here is my
.stylelintrc.json
After I run
stylelint
, it threw the errorInvalid Option: Invalid option "false" for rule "order/properties-alphabetical-order"
. I checked your code, found thatstylelint.utils.validateOptions
threw this (at rules/properties-alphabetical-order/index.js line14) It seems that you set thepossible
asBoolean
, and if the option is a falsy value likefalse
,stylelint
will throw the error because the check result is false. So nobody can turn off the rule.I think the following code may meet your expectation.