Ember CLI ScssLint
Lint your Ember app's Sass (.scss files) as part of the build process.
Currently only works on .scss files, not .sass syntax, and would seemingly only work on files in
First, you need to install the sass-lint ruby gem via
gem install scss-lint
or using bundler. Then install the addon via:
npm i ember-cli-scsslint
--save option to add the package to your package.json dependencies.
Now, when you run
ember build, the Scss Linting will be automatically run:
ember build version: 0.1.12 Building Building...Processing app.scss Processing components/_media_element.scss [default] Errors components/_media_element.scss:1 [W] SpaceAfterPropertyColon: Colon after property should be followed by at least one components/_media_element.scss:2 [W] SpaceAfterPropertyColon: Colon after property should be followed by at least one Processing modules/_user_box.scss Built project successfully. Stored in "dist/".
To customize your linting, create a
.scss-lint.yml file in
app/styles/. Below is an example file indicating how to include and exclude specific files:
scss_files: '**/*.css.scss'exclude: ['bootstrap-custom.scss', 'bootstrap-vb.scss']linters:BangFormat:enabled: truespace_before_bang: truespace_after_bang: falseBorderZero:enabled: trueconvention: zero # or `none`
For more information on the available rules see the scsslint linters documentation.
git clonethis repository
- Visit your app at http://localhost:4200.
ember test --server
For more information on using ember-cli, visit http://www.ember-cli.com/.
- Ensure the linting occurs on every build, including when the server is running.
- Create better tests
- Beautify the output (more).
- Allow configuration for the styles directory (in case
- Allow all of the configuration options in broccoli-scss-lint such as exporting results to a .json file.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request