Skip to content

Releases: sds/scss-lint

SCSS-Lint 0.31.0

10 Dec 21:58
@sds sds

Choose a tag to compare

This release contains a large number of bug fixes for new features introduced by version 0.30.0.

A new feature that will be of interest to many is the ability to enable/disable lints via inline comments. A big thanks to @mbertolacci for the implementation!

New Features

  • Add support for disabling/enabling linters via inline comments
  • Add smacss sort order option for PropertySortOrder
  • Add recess sort order option for PropertySortOrder
  • Add allow_leading_underscore option to NameFormat to allow the leading
    underscore convention to denote private functions

Changes

  • Change IdWithExtraneousSelector to IdSelector and modify behavior to
    always report a lint when an ID appears as part of a selector.

Bug Fixes

  • Fix regression in default configuration for QualifyingElement so that
    elements with attributes, classes, or ids are disallowed by default
  • Fix error message for TrailingSemicolon where lines without a semicolon
    would incorrectly be reported as having a space before the semicolon
  • Fix BangFormat linter to not report lints for exclamation points in
    strings
  • Update minimum version of sass gem to 3.4.1 to fix a parser bug
  • Fix DuplicateProperty not reporting duplicate properties in nested rule
    sets
  • Fix TrailingSemicolon handling of comma-separated @imports
  • Fix SelectorFormat to not allow format of pseudo-selectors to be defined,
    as they are always hyphenated lowercase
  • Fix Indentation to not crash on @at-root directives with comments inside
  • Fix DuplicateProperty to report correct name of duplicated property
  • Fix EmptyLineBetweenBlocks to allow trailing comments after rule sets
    (e.g. control comments disabling linters)

SCSS-Lint 0.30.0

11 Nov 02:59
@sds sds

Choose a tag to compare

New Features

  • Add VendorPrefixes linter which ensures only whitelisted vendor-prefixed
    properties are used
  • Add scss_files configuration option allowing a default set of files to be
    linted if no files are explicitly specified
  • Add BangFormat linter which enforces spacing around the ! for
    !important and !default
  • Add new_line option to SpaceBeforeBrace linter enforcing opening curly
    braces start on a new line
  • Add NestingDepth linter which ensures selectors are nested only up to a
    specified maximum depth
  • Add support to SelectorFormat for specifying different conventions for
    different types of selectors via the <type>_convention options
  • Add @import check to TrailingSemicolon
  • Add support for differentiating @includes with actual content versus
    no-content @includes in DeclarationOrder
  • Add support for checking the ordering of content within @includes
  • Add ImportPath linter which ensures paths for @import directives follow
    a certain format
  • Add QualifyingElement linter which checks for unnecessarily-qualified
    element selectors
  • Add --out flag which allows the output of the last formatter specified via
    the --format flag to be redirected to a file
  • Add --require flag allowing arbitrary Ruby modules to be loaded (facilitating
    custom reporters)

Changes

  • Improve message reported by PropertySortOrder to specify the expected sort
    order
  • Enforce UTF-8 encoding by default
  • Change BEM convention of SelectorFormat convention option to
    hyphenated_BEM, and introduce BEM format as specified in
    https://bem.info/method/definitions/
  • Prefix all syntax error messages with "Syntax Error:"

Bug Fixes

  • Fix bug in SpaceAfterPropertyName/TrailingSemicolon linters where lint
    would be reported for oneline properties following a selector with
    interpolation
  • Fix bug in SpaceAfterPropertyColon/SpaceAfterPropertyName/TrailingSemicolon
    linters where lint would be reported for one-line properties following a
    selector with interpolation
  • Fix PropertySpelling linter to check the names of nested properties

SCSS-Lint 0.29.0

07 Oct 18:23
@sds sds

Choose a tag to compare

Mostly bug fixes with a few new features. Most notable is the new linter SelectorFormat which renders the CapitalizationInSelector linter obsolete.

New features

  • Add TrailingZero linter which checks for unnecessary zeros following a
    decimal point
  • Add SelectorFormat linter which checks that the names of ids, classes, etc.
    in selectors match a desired convention
  • Add JSON formatter

Changes

  • Update list of known properties recognized by PropertySpelling lint
  • Enhance TrailingSemicolon to check for more than one semicolon at the end
    of a statement
  • Remove CapitalizationInSelector, which has been superseded by the more
    powerful SelectorFormat linter

Bug Fixes

  • Fix bug where SassScript selectors referring to the current selector would
    result in a crash
  • Fix bug in EmptyLineBetweenBlocks linter where lint would incorrectly be
    reported when comments immediately followed the closing brace of a rule set
  • Fix bug in PropertySortOrder where properties within media queries were
    not checked for sort order
  • Fix bug in UrlQuotes linter where lint would be reported for data URIs
  • Fix bug in UnnecessaryParentReference where selectors with multiple &
    references where one & was concatenated would incorrectly report a lint

SCSS-Lint 0.28.0

04 Sep 06:08
@sds sds

Choose a tag to compare

This release adds support for Sass 3.4, officially dropping support for Sass 3.3. Due to the underlying changes in the parse tree representation between versions, it is not practical to simultaneously support both. Those who still need support for Sass 3.3 must use version 0.27.0.

  • Fix bug in StringQuotes where strings with interpolation were incorrectly
    being linted
  • Upgrade minimum sass version dependency to 3.4.x series

SCSS-Lint 0.27.0

19 Aug 18:46
@sds sds

Choose a tag to compare

This release includes some minor bug fixes. It will also be the last version to support Sass 3.3, as Sass 3.4 has just been released and includes breaking changes to the parser which scss-lint relies on for inspecting the parse tree.

  • Fix broken ignore_unspecified option in PropertySortOrder
  • Add linting of @include and @if/@else blocks in PropertySortOrder
  • Fix HexValidation bug incorrectly reporting lints for 8 character hex
    codes in Microsoft filter property
  • Fix UnnecessaryParentReference incorrectly reporting lints for nested
    selectors with more than one parent reference

SCSS-Lint 0.26.2

29 Jul 23:53
@sds sds

Choose a tag to compare

Another bugfix release intended to fix some additional cases with the TrailingSemicolon linter.

  • Fix TrailingSemicolon bug with @include blocks that didn't contain properties
  • Add more properties to concentric preset order

SCSS-Lint 0.26.1

28 Jul 22:54
@sds sds

Choose a tag to compare

This release contains a few bug fixes that were discovered after 0.26.0 was initially released. Given the large number of new features, it was expected that a number of new bugs would be discovered.

  • Fix TrailingSemicolon incorrectly reporting @includes with block contents
  • Fix UnnecessaryParentReference incorrectly reporting using of & with
    concatenation
  • Fix SingleLinePerSelector crashing for selectors that contained
    interpolated function calls
  • Add additional properties to the concentric preset order
  • Fix LeadingZero crashing on multi-line strings with interpolation

SCSS-Lint 0.26.0

28 Jul 04:24
@sds sds

Choose a tag to compare

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

SCSS-Lint 0.25.1

24 Jun 17:45
@sds sds

Choose a tag to compare

Includes a hotfix for a bug where the Indentation linter would crash on lines preceded by a comment.

SCSS-Lint 0.25.0

23 Jun 21:48
@sds sds

Choose a tag to compare

Mostly bug fixes along with a new linter ElsePlacement. See below for details.

  • Fix bug in Indentation linter where @at-root directives with inline
    selectors would erroneously report incorrect indentation levels
  • Fix bug in Indentation linter where rule nodes with selectors spread
    over multiple lines and a single inline property would incorrectly report
    a lint
  • Add ElsePlacement linter which checks the position of @else directives
    with respect to the previous curly brace
  • Replace allow_extra_spaces option on SpaceAfterPropertyColon linter with
    style which accepts multiple different property spacing styles
  • Fix bug in PlaceholderInExtend linter which erroneously report lints for
    selectors with interpolated strings