Closed rdgomt closed 1 year ago
Hey! Great to hear about more adoption :)
It should be fixed in the rule. This package produces AST (Abstract Syntax Tree) where property value is everything that comes after :
. So in your case is is ${props => showBottomBorder ? 1 : 0}px
. Many rules would not be prepared for such values.
In Stylelint we use isStandardSyntaxValue helper function in rules to ignore properties which have non-standard values like in your example. Then in rule we return early for non-standard syntax before rule make any checks. This approach ignores properties, which rule can't understand and produces no violations.
Please, open an issue in matterialize/stylelint-require-units
repository, so they could adopt what Stylelint does.
Thank you for the explanation.
Hi! I am trying to migrate from postcss-styled-components, but I am facing an issue with a stylelint plugin called matterialize/stylelint-require-units. Here are the false positives that are showing: