The wiki is now available again. However, some recent changes may not have been restored.
Please see Computing Services' blog post for more details
Skip to end of metadata
Go to start of metadata

Sublime Text linting setup

Icon

After installing Sublime Linter and Contrib SCSS lint visit https://packagecontrol.io/packages/SublimeLinter-contrib-scss-lint and follow the installation instructions.

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):

Default settings

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.

Merge selectors

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'.

Icon

It is worth noting that these merge recommendations from the linter are probably indicative of rules/selectors that could be made cleaner, smaller and more elegant.

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 _mixins.scss partial.

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.

Selectors on individual lines
  • No labels