
rules.scsslint.Indentation.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sonar-web-frontend-scss Show documentation
Show all versions of sonar-web-frontend-scss Show documentation
Consume reports generated by scsslint for code quality. Also consume reports for code duplication (either simian or cpd). The information generated by reports are added in Sonar
Details
Use two spaces per indentation level.
Bad: four spaces
p {
color: #f00;
}
Good: two spaces
p {
color: #f00;
}
You can configure this linter to prefer tabs if you like.
For projects that follow BEM, you may prefer to allow arbitrary indentation for
rule sets that aren't nested in order to give the visual hints of hierarchy
without actually nesting selectors (which has a performance cost). For example:
.component {}
.component__image {}
.component__text {}
.component-subblock {}
.component-subblock__text {}
.component-category {}
.component-other {}
You can set allow_non_nested_indentation
to true
if this convention is
preferred.
Configuration Option
Description
allow_non_nested_indentation
Whether non-nested rule sets can be arbitrarily indented (default false)
character
tab
or space
(default space)
width
Number of character
s per indentation level (default 2)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy