I’m running stylelint
on my files and this is the last error I’m left with:
1:1 ✖ Unknown rule function-calc-no-invalid function-calc-no-invalid
The first line:
@import url('https://fonts.googleapis.com/css?family=Poppins:400,700,900');
I need troubleshooting here, but I’m clueless. It’s my first time asking question here so please excuse if my forum manners are little out of sync.
I’m running stylelint --fix styles.css
and don’t expect any errors now.
2
Answers
Add
"function-calc-no-invalid": null
to the "rules" section of your.stylelintrc
/.stylintrc.json
config file, e.g.:to explicitly turn off that rule, however, more likely to solve your issue (given that clearly you must be using a version of
stylelint
since that rule has been removed), check to see if"function-calc-no-invalid"
is already mentioned in any.stylelintrc
config file, and if it is, remove it altogether.If you are using the latest version of
stylelint
, then that rule won’t be recognized and should not be in your configuration object. You may want to make sure you have the correct up-to-date configuration.You might try running:
too/instead, and see if that creates a new configuration object for you and eliminates the rule error you are seeing. Somewhere in your config, it seems, the removed rule is being listed when it should not be (anymore).
(See: https://stylelint.io/user-guide/errors#unknown-rule-error)
As of 14.0.0, support for this rule has been removed due to a security vulnerability.
https://stylelint.io/migration-guide/to-14/#function-calc-no-invalid-rule