Skip to content

SCSS-Lint 0.24.0

Choose a tag to compare

@sds sds released this 14 May 18:36
· 873 commits to main since this release

Includes a variety of new features and bug fixes. Big feature to look out for is the MergeableSelector linter, which can report selectors which can be merged into other selectors, for example turning:

h1 {
  margin: 10px;
}

// Second copy of h1 rule
h1 {
  text-transform: uppercase;
}

into:

h1 {
  margin: 10px;
  text-transform: uppercase;
}

Full list of changes is below.

  • Extend DuplicateRoot to MergeableSelector linter to check for nested
    rule sets that can be merged in addition to root-level ones
  • Add ConfigReporter formatter which returns a valid .scss-lint.yml
    configuration file where all linters that caused a lint are disabled
  • Fix bug in Indentation linter where @at-root directives were not
    treated as an increase in indentation level
  • Fix ZeroUnit to only report lints for zero values in
    lengths
  • Fix crash in SingleLinePerSelector for selectors containing only
    interpolation
  • Add --show-formatters option to display all available formatters
  • Add HexValidation to validate hex colors
  • Split HexFormat into HexLength (checking length) and HexNotation
    (checking lowercase / uppercase)