linter-scss-lint
This linter plugin for Linter provides an interface to scss-lint. It will be used with files that have the “SCSS” syntax.
Installation
Linter package will automatically be installed for you if you do not already have it.
scss-lint installation
Before using this plugin, you must ensure that scss-lint
is installed on your system. To install scss-lint
, do the following:
Now you can proceed to install the linter-scss-lint plugin.
Plugin installation
$ apm install linter-scss-lint
Settings
You can configure linter-scss-lint by editing ~/.atom/config.cson (choose Open Your Config in Atom menu):
'linter-scss-lint':
# Optionally specify additional arguments to be passed to `scss-lint`.
# Run `scss-lint -h` to see available options.
'additionalArguments': null
# Optionally disable `scss-lint` if you don't have an ``.scss-lint.yml` in
# your project directory
'disableWhenNoConfigFileInPath': false
# The `scss-lint` path. Run `which scss-lint` to find this path.
'executablePath': null
Config file
Linter will start looking for .scss-lint.yml
file in the same directory as the file that's being linted. If not found, it will move one level up the directory tree all the way up to the filesystem root (If you enabled disableWhenNoConfigFileInPath
, then it will not search further).
rvm
Using If you are using rvm
, you will need a wrapper for scss-lint
to run properly. There are a couple options for this (see below).
NOTE: If you are seeing Error: env: ruby_executable_hooks: No such file or directory
then you need to do this!
Consult rvm docs for further info not covered in this README - https://rvm.io/
Wrapper just for atom
This will create a wrapper just for atom using your current ruby version:
$ rvm wrapper current atom scss-lint
Then in linter-scss-lint
set executablePath
to /path/to/rvm/bin/atom_scss-lint
Note: you can find rvm path using which rvm
Wrapper for ruby version
You can also just use the wrapper generated for a particular ruby version. This may already be generated. To check:
$ ls -al /path/to/rvm/gems/ruby-x.y.z/wrappers
If scss-lint
isn't in there, generate the wrappers:
$ rvm wrapper current
Then in linter-scss-lint
set executablePath
to /path/to/rvm/gems/ruby-x.y.z/wrappers/scss-lint
Contributing
If you would like to contribute enhancements or fixes, please do the following:
- Fork the plugin repository.
- Hack on a separate topic branch created from the latest
master
. - Commit and push the topic branch.
- Make a pull request.
- welcome to the club
Please note that modifications should follow these coding guidelines:
- Indent is 2 spaces.
- Code should pass coffeelint linter.
- Vertical whitespace helps readability, don’t be afraid to use it.
Thank you for helping out!