Rule no-duplicate-properties
will enforce that duplicate properties are not allowed within the same block.
exclude
:[array of property names to be excluded from this rule]
(defaults to empty array[]
)
When enabled, the following are disallowed:
.foo {
margin: 0 0 15px;
margin: 0;
}
When a property is added to the exclude array as shown below then you may place duplicate properties immediately after one another, this is to prevent accidental duplication of properties.
no-duplicate-properties:
- 1
-
exclude:
- display
When display
is added to the exclude array the following would be allowed:
.display-block {
display: flex;
display: inline-block;
float: right;
}
When display
is added to the exclude array the following would still be disallowed as the duplicate properties are separated by another property:
.display-block {
display: flex;
float: right;
display: inline-block;
}