Skip to content

Releases: sds/scss-lint

SCSS-Lint 0.40.0

30 Jun 19:48
@sds sds
Compare
Choose a tag to compare

This release represents a major milestone for scss-lint in that it now supports custom linters and third-party plugins. Plugins allow anyone to create linters and distribute them to others, which is useful for linters that are specific to a particular framework or development style. See the README for details on how to write custom linters.

A big thanks to @cih for implementing the support for plugins.

New Features

  • Add support for loading custom linters via the plugin_directories and
    plugin_gems configuration options (experimental)
  • Add ExtendDirective linter which checks for any usage of the @extend
    directive.
  • Add TrailingWhitespace linter which reports whitespace characters at the
    end of a line
  • Add SpaceAfterVariableName linter which checks that there are no spaces
    between a variable name and a colon

Changes

  • Change NameFormat to no longer check placeholder names, as this is handled
    by the SelectorFormat linter
  • Change NestingDepth to allow parent selectors to be ignored in depth count
    via the ignore_parent_selectors configuration option

Bug Fixes

  • Fix ColorVariable from crashing when variable interpolation occurs in
    multiline comments
  • Fix PropertySortOrder's ignore_unspecified: false behavior to not care
    about the relative order of unspecified properties at the end of a list of
    properties
  • Fix PropertyUnits for properties that have multiple unit-like values (e.g.
    shorthand properties) and quoted values
  • Fix control comment processing for FinalNewline, SpaceBetweenParens, and
    TrailingNewline
  • Fix ElsePlacement to lint nested @if statements

SCSS-Lint 0.39.0

23 May 00:37
@sds sds
Compare
Choose a tag to compare

A relatively minor release with mostly bug fixes.

New Features

  • Add BemDepth which checks the number of BEM elements is under a specified
    maximum

Changes

  • Load configuration file from user's home directory if one exists and no other
    configuration file is specified or in the current working directory
  • Improve issue reporting instructions displayed when scss-lint crashes
  • Remove XML formatter (see the
    Checkstyle formatter
    for an XML-based alternative)

Bug Fixes

  • Fix Indentation to not report @import directives spread across multiple
    lines
  • Fix Indentation linter from crashing on @else statements with
    allow_non_nested_indentation set to true
  • Update default configuration to work with projects using the
    syck YAML parser
  • Fix ColorKeyword to not report lints for map keys with color keyword names

SCSS-Lint 0.38.0

03 May 01:15
@sds sds
Compare
Choose a tag to compare

While this is a relatively minor release, it includes a very significant change:

The scss-lint gem name has been changed to scss_lint
(i.e. the dash has been changed to an underscore)

Practically speaking, this means you only change the name you use in your Gemfile or when you install via gem install .... Everywhere else, the tool is still spelt with a dash (including the executable name).

Why was the name changed?

The name was changed to follow RubyGems conventions for naming gems, which can eliminate a source of confusion for those who are used to following those conventions. scss-lint was given its original gem name before the existence of this document was known.

New Features

  • Add allowed_shorthands option for Shorthand linter
  • Add allowed option to Comment linter specifying regex of allowed
    multi-line comments, such as copyright notices
  • Add min_properties option to PropertySortOrder to allow specifying a
    threshold number of properties that must be present before linting occurs
  • Add one_space_or_newline style option to SpaceAfterPropertyColon

Changes

  • Change configuration loading behavior so that defining lists in a custom
    configuration will completely override the old list instead of adding to it
  • Rename scss-lint gem to scss_lint to follow RubyGems conventions for
    naming gems
    . This only affects
    the name you use in Gemfiles or when you gem install; everything else
    remains the same.

Bug Fixes

  • Fix DeclarationOrder linter to report lints for items within media queries
  • Fix bug where control comments could filter out lints from other files
    depending on scan order
  • Ignore currentColor, inherit, and transparent values in
    VariableForProperty
  • Fix PropertySortOrder to lint sort order of nested properties
  • Fix ColorVariable to ignore literal strings containing color keywords

SCSS-Lint 0.37.0

13 Apr 01:15
@sds sds
Compare
Choose a tag to compare

A relatively minor release that may require you to update your configuration if you utilize the BEM-related conventions in NameFormat or SelectorFormat.

  • Rename BEM option on SelectorFormat to strict_BEM to emphasize that
    this is a particular dialect which may not be what developers expect
  • Allow SelectorFormat convention explanations to be customized via the
    #{type}_convention_explanation and convention_explanation options
  • Add camel_case and snake_case conventions to NameFormat
  • Remove BEM convention from NameFormat, as it didn't make sense in this
    context since NameFormat does not deal with selectors
  • Add support for function, mixin, or variable-specific conventions to
    NameFormat
  • Add support for custom convention explanations to NameFormat

SCSS-Lint 0.36.1

08 Apr 21:43
@sds sds
Compare
Choose a tag to compare

A hotfix release that fixes some issues introduced by the new PropertyUnits linter, as well as a number of false positives caused by new behavior in the DeclarationOrder linter.

  • Fix PropertyUnits to not error on properties with function call values
  • Fix DeclarationOrder false positives on lines of the same type of node
  • Fix PropertyUnits false positives on unicode escape sequences and string
    values that look like units
  • Add additional units to default configuration for PropertyUnits, including
    durations, frequencies, angles, and resolutions

SCSS-Lint 0.36.0

08 Apr 19:06
@sds sds
Compare
Choose a tag to compare

Includes a few changes to exit codes returned by scss-lint in special conditions. One new linter to look out for is the PropertyUnits linter, which allows you to enforce the kind of units you allow on certain properties throughout your SCSS code.

  • Fix SpaceAfterPropertyColon to report nested properties
  • Add PropertyUnits allowing customization of which units are allowed for specific properties
  • Allow color literals in map declarations and the rgba helper function in ColorVariable
  • Gracefully handle when a library specified via -r/--require is not found
    and return a semantic exit code EX_UNAVAILABLE (69)
  • Improve message of DeclarationOrder to specify the line number of the
    out-of-order item and the line number of where it was expected to be
  • Return helpful error message and unsuccessful exit code when all files matched by specified glob patterns are excluded by --exclude flags and
    exclude configuration settings * Change exit code returned when file globs patterns did not match any files to
    be different from the exit code returned when a specified file does not exist

SCSS-Lint 0.35.0

20 Mar 17:18
@sds sds
Compare
Choose a tag to compare

This is primarily a bugfix release, but with some backwards incompatible changes to the VendorPrefixes (now called VendorPrefix) linter and its configuration options.

  • Fix ColorVariable to not report occurrences of transparent when appearing
    in function calls or list literals
  • Fix infinite loop in control comment processor when dealing with parse nodes
    with no children with line numbers
  • Change VendorPrefix config options include and exclude to
    additional_identifers and excluded_identifers, respectively
  • Rename VendorPrefixes to VendorPrefix
  • Add animation* properties to concentric.txt
  • Fix bug where attempting to lint a non-existent file would result in a crash

SCSS-Lint 0.34.0

23 Feb 03:55
@sds sds
Compare
Choose a tag to compare

This release includes a large number of new linters.

One major change of note is removal of support for per-directory configuration files and the inherit_from directive in configuration files. From now on, only the .scss-lint.yml file found in the current directory that scss-lint is being run from will be loaded (or specified via the --config flag).

New Features

  • Add ImportantRule linter which reports uses of !important in properties
  • Add VariableForProperty linter which enforces using variables for
    specified property values instead of literal values
  • Add convention option to BorderZero allowing none to be preferred over
    zero
  • Add separate_groups option to PropertySortOrder to specify that groups
    of properties should be visually separated
  • Add PropertyCount linter which reports rule sets with a large number of
    properties
  • Add ColorVariable linter which enforces the use of color literals in
    variable declarations only
  • Add break-after, break-before, break-inside, and text-size-adjust
    to list of recognized properties
  • Add allow_non_nested_indentation option to Indentation linter
  • Allow files without .scss/.css extension to be linted if they are
    passed explicitly (i.e. you do not specify a directory, but the file itself)

Changes

  • Remove support for per-directory configuration and inherit_from from
    the configuration system

Bug Fixes

  • Fix bug in StringQuotes where Sass script in non-silent comments would
    cause a crash
  • Fix control comments placed before @include blocks to apply within them
  • Fix crash in PropertySortOrder when non-existent preset sort order or
    otherwise invalid sort order are specified in the configuration
  • Fix recognition of control comments in selector comma sequences
  • Fix crash in BangFormat, ImportantRule, and VendorPrefixes when linting
    properties with list literals containing empty lists

SCSS-Lint 0.33.0

21 Jan 22:09
@sds sds
Compare
Choose a tag to compare

This release includes a infinite loop bugfix and some changes to the rake task that comes with scss-lint.

  • Call Kernel.exit with status code returned by CLI in rake task (unless 0)
  • Allow list of files and glob patterns to be passed as task arguments
    to rake task
  • Allow custom configuration file to be specified in rake task
  • Fix infinite loop in SpaceAfterComma for arguments spanning multiple
    lines

SCSS-Lint 0.32.0

07 Jan 18:49
@sds sds
Compare
Choose a tag to compare

This is a bug fix release that a addresses a few issues introduced by version 0.31.0.

  • Fix regression in rake task
  • Fix grammar of lints reported by SelectorFormat
  • Fix regression in --require switch that caused custom formatters to
    not be required before they were created
  • Fix bug in BangFormat where lines without a semicolon would cause an
    infinite loop