org.sonar.css.checks.l10n.common.semicolon-declaration.html Maven / Gradle / Ivy
Adding a semicolon after the last declaration of a rule is not mandatory. But omitting this semicolon could lead to
unexpected issues.
Noncompliant Code Example
Let's take the following piece of code as an example:
.foo {
background-color: red;
color: green /* Noncompliant */
}
Then, add some properties:
.foo {
background-color: red;
color: green /* Noncompliant */
width: 30px;
}
Now, you might waste time figuring out why the width declaration isn't working. Even worse, you can even fail
noticing that it's not working.
Compliant Solution
.foo {
background-color: red;
color: green;
width: 30px;
}
stylelint Related Rules
© 2015 - 2024 Weber Informatics LLC | Privacy Policy