I am using stylelints and I have some rules that I want to disable :
in less I have to do calc this way top: calc(~'50% + 30px');
but "function-calc-no-invalid" prevent it
https://stylelint.io/user-guide/rules/function-calc-no-invalid
also, I want to allow my less code to apply css to component directly so
my-componet { width:100px}
so I need to disable "selector-type-no-unknown"
https://stylelint.io/user-guide/rules/selector-type-no-unknown
I tried to create a .styllelintrc file and add the following
"selector-type-no-unknown": "custom-elements",
"function-calc-no-invalid": "false",
and manyvariation, but I keep getting
Invalid Option: Unexpected option value "false" for rule "function-calc-no-invalid" Invalid Option: Unexpected option value "custom-elements" for rule "selector-type-no-unknown"
You can learn more about how rules are configured in the stylelint user guide, e.g. how to turn rules off rules using null and configure optional secondary options like ignore: ["custom-elements"] .
You can also specify a path to your ignore patterns file (absolute or relative to process. cwd() ) using the --ignore-path (in the CLI) and ignorePath (in JS) options. Alternatively, you can add an ignoreFiles property within your configuration object.
Your stylelint configuration object in your .stylelintrc
file should be:
{
"rules": {
"function-calc-no-invalid": null,
"selector-type-no-unknown": [
true,
{
"ignore": [
"custom-elements"
]
}
]
}
}
You can learn more about how rules are configured in the stylelint user guide, e.g. how to turn rules off rules using null
and configure optional secondary options like ignore: ["custom-elements"]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With