Skip to content

SCSS-Lint 0.26.0

Choose a tag to compare

@sds sds released this 28 Jul 04:24
· 805 commits to main since this release

Includes a large number of new features along with some minor bug fixes.

Tools that use the exit status of the scss-lint executable should be aware that the status code for failure has changed from 65 to 2. This was due to the new feature of reporting a different status code when only warnings are reported, versus when errors are reported. Since there was no semantic exit code to differentiate warnings from errors, 65 split into 1 and 2, respectively. See Exit Status Codes for a full list of status codes.

This release also bumps the minimum required sass version to 3.3.7, since this fixes a bug in the upstream Sass parser that fixes issue #151.

New Features

  • Add severity option allowing the severity level of a lint to be configured
  • Include linter name in lint description
  • Add character option to Indentation linter which allows specifying
    tabs or spaces as the indentation character of choice
  • Add SingleLinePerProperty linter which checks that properties each reside
    on their own line
  • Add support to PropertySortOrder to specify a preset sort order via the
    order property
  • Add concentric preset
    sort order to the PropertySortOrder linter
  • Add ignore_unspecified option to PropertySortOrder to indicate that
    unspecified properties in custom sort orderings are to be ignored (i.e. they
    can appear anywhere)
  • Add ignore option to Compass::PropertyWithMixin linter allowing you to
    not warn for certain properties
  • Add ignored_names option to CapitalizationInSelector, allowing you to
    whitelist certain names as not needing to follow the convention
  • Add ignored_types option to CapitalizationInSelector, allowing you to
    selectively ignore capitalization in certain types of selectors
  • Add UnnecessaryParentReference linter which checks nested selectors for
    extraneous parent references
  • Teach TrailingSemicolon to report lints for uses of @extend, @include,
    or variable declarations without semicolons

Changes

  • Change CLI to return exit code of 1 if only warnings are reported, or 2
    if any errors are reported (was previously 65 for either)
  • Update sass dependency to require 3.3.7 or later (fixes a parsing bug)
  • Include test files in gem distribution
  • Rename TrailingSemicolonAfterPropertyValue to TrailingSemicolon

Bug Fixes

  • Fix bug in SpaceBeforeBrace linter where an erroneous lint would
    be reported for a brace on its own line
  • Fix bug in SpaceAfterComma where trailing spaces followed by a newline after
    a comma would incorrectly report a lint
  • Fix SingleLinePerSelector to ignore any selectors that contain interpolation