Raduken Raduken - 1 year ago 167
CSS Question

scss-lint.yml is not working

I got small problem with scss-lint, I am trying to run in a simple file and after changes in the scss-lint.yml , still not loading my config.

scss file: _headlines.scss

// Headlines

%headline-primary {
@include rem-size(60px);
color: palette(grey, light);
font-weight: $font-weight--book;
line-height: $line-height-base;
margin-top: 0;


# Default application configuration that all configurations inherit from.

scss_files: "scss/**/*.scss"
plugin_directories: ['.scss-linters']

# List of gem names to load custom linters from (make sure they are already
# installed)
plugin_gems: []

# Default severity of all linters.
severity: warning

enabled: false

enabled: false

command line used:

scss-lint scss/_headlines.scss

file sctrucute:

enter image description here

scss/_headlines.scss:5:1 [W] TrailingWhitespace: Line contains trailing whitespace
scss/_headlines.scss:5:18 [W] ColorKeyword: Color `grey` should be written in hexadecimal form as `#808080`
scss/_headlines.scss:5:18 [W] ColorVariable: Color literals like `grey` should only be used in variable declarations; they should be referred to via variable everywhere else.
scss/_headlines.scss:9:1 [W] FinalNewline: Files should end with a trailing newline

ColorKeyword is defined as false in my scss-lint.yml but still runing someone know what is happen?

Answer Source

In the scss-lint documentation, the following is specified:


scss-lint loads configuration in the following order of precedence:

  1. Configuration file specified via the --config flag
  2. Configuration from .scss-lint.yml in the current working directory, if it exists
  3. Configuration from .scss-lint.yml in the user's home directory, if it exists

All configurations extend the default configuration.

There is no .scss-lint.yml in your current working directory, scss-lint-test. Therefore, it will be using the default configuration.

To solve this, either move your YML file into scss-lint-test, or run scss-lint from the scss folder.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download