Sublime Text linting setup
Atom linting setup
- Install linter-scss-lint through the Atom packages GUI (⌘,) or download here
Atom will be able to run the linter without any further action, however you will be constantly nagged for not providing a scss-config.yml file.
To quell the nagging you can run the following from your terminal (version numbers may vary):
We are currently using the default Sass lint configuration.
Current exceptions to the default config
Trailing line of white space at the end of every file
The linter expects to find a single line of whitespace at the end of every file. This conflicts with any Sublime Text user who has Trim Trailing Whitespace set to true in their ST3 prefs. Any space added to assuage the linter is immediately removed on save.
In certain situations some Sass selectors have been purposefully kept separated from each other for clarity's sake. The Sublime Linter aggressively recommends that these selectors are merged together for brevity.
These recommendations have been ignored in any case where concatenation might make the selector less 'scannable'.
Alphabetised selector hierarchy
The linter recommends that selectors are ordered alphabetically. This has been implemented in the majority of Sass files with the exception of the
The values in our mixins have been written as logically as possible. Arbitrary re-ordering of these into an alphabetised format would only complicate the implementation of each mixin.
One selector per line
Although in certain circumstances this can improve code legibility the majority of the time it simply looks ugly and unwieldy. Use your own discretion when implementing this rule.