In Ally stylelint config, we should add an additional rule that would flag any duplication of properties.
It would involve adding"declaration-block-no-duplicate-properties": true, and ignore: ["consecutive-duplicates-with-different-values"] in the .stylelintrc.json settings.
When a developer is writing two identical properties in CSS, the linter should warn them that the first property will be overrided and effectively useless. If someone needs a duplicative property for a specific reason, they would have to disable stylelint for that line intentionally.
padding: 20px;
padding: 30px;
One concern is that it will start to flag css code that looks like:
Description
In Ally stylelint config, we should add an additional rule that would flag any duplication of properties.
It would involve adding
"declaration-block-no-duplicate-properties": true,
andignore: ["consecutive-duplicates-with-different-values"]
in the.stylelintrc.json
settings.StyleLinter Documentation found here https://stylelint.io/user-guide/rules/declaration-block-no-duplicate-properties/
Use Case
When a developer is writing two identical properties in CSS, the linter should warn them that the first property will be overrided and effectively useless. If someone needs a duplicative property for a specific reason, they would have to disable stylelint for that line intentionally.
One concern is that it will start to flag css code that looks like:
Depending on how many errors like that are flagged, we may have to put a pin in this and have a broader discussion.