Pattern: Missing use of variable
Issue: -
Preprocessers like SCSS, Less uses variables to make the code clean, maintainable and reusable. This rule enforces the use of variables based on custom configuration.
Example of incorrect code:
$some-cool-color: #efefef;
.panel {
display: inline-block;
text-align: center;
color: #efefef; // Wait a min! there should be a variable.
}
Example of correct code:
$some-cool-color: #efefef;
.panel {
display: inline-block;
text-align: center;
color: $some-cool-color;
}