css/no-shorthand-property-overrides
disallow shorthand properties that override related longhand properties
- ⚙️ This rule is included in
"plugin:css/recommended"
and"plugin:css/standard"
.
📖 Rule Details
This rule reports when a shorthand property overrides a previously defined longhand property.
This rule was inspired by Stylelint's declaration-block-no-shorthand-property-overrides rule.
/* eslint css/no-shorthand-property-overrides: "error" */
/* ✓ GOOD */
var foo = <div
style={
{
backgroundRepeat: 'repeat',
backgroundColor: 'green'
}
} >
</div>
/* ✗ BAD */
var foo = <div
style={
{
backgroundRepeat: 'repeat',
background: 'green'
}
} >
</div>
🔧 Options
Nothing.
📚 Further reading
🚀 Version
This rule was introduced in eslint-plugin-css v0.3.0