Releases: sds/scss-lint
SCSS-Lint 0.40.0
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_directoriesand
plugin_gemsconfiguration options (experimental) - Add
ExtendDirectivelinter which checks for any usage of the@extend
directive. - Add
TrailingWhitespacelinter which reports whitespace characters at the
end of a line - Add
SpaceAfterVariableNamelinter which checks that there are no spaces
between a variable name and a colon
Changes
- Change
NameFormatto no longer check placeholder names, as this is handled
by theSelectorFormatlinter - Change
NestingDepthto allow parent selectors to be ignored in depth count
via theignore_parent_selectorsconfiguration option
Bug Fixes
- Fix
ColorVariablefrom crashing when variable interpolation occurs in
multiline comments - Fix
PropertySortOrder'signore_unspecified: falsebehavior to not care
about the relative order of unspecified properties at the end of a list of
properties - Fix
PropertyUnitsfor properties that have multiple unit-like values (e.g.
shorthand properties) and quoted values - Fix control comment processing for
FinalNewline,SpaceBetweenParens, and
TrailingNewline - Fix
ElsePlacementto lint nested@ifstatements
SCSS-Lint 0.39.0
A relatively minor release with mostly bug fixes.
New Features
- Add
BemDepthwhich 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
XMLformatter (see the
Checkstyleformatter
for an XML-based alternative)
Bug Fixes
- Fix
Indentationto not report@importdirectives spread across multiple
lines - Fix
Indentationlinter from crashing on@elsestatements with
allow_non_nested_indentationset totrue - Update default configuration to work with projects using the
syckYAML parser - Fix
ColorKeywordto not report lints for map keys with color keyword names
SCSS-Lint 0.38.0
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_shorthandsoption forShorthandlinter - Add
allowedoption toCommentlinter specifying regex of allowed
multi-line comments, such as copyright notices - Add
min_propertiesoption toPropertySortOrderto allow specifying a
threshold number of properties that must be present before linting occurs - Add
one_space_or_newlinestyleoption toSpaceAfterPropertyColon
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-lintgem toscss_lintto follow RubyGems conventions for
naming gems. This only affects
the name you use inGemfiles or when yougem install; everything else
remains the same.
Bug Fixes
- Fix
DeclarationOrderlinter 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, andtransparentvalues in
VariableForProperty - Fix
PropertySortOrderto lint sort order of nested properties - Fix
ColorVariableto ignore literal strings containing color keywords
SCSS-Lint 0.37.0
A relatively minor release that may require you to update your configuration if you utilize the BEM-related conventions in NameFormat or SelectorFormat.
- Rename
BEMoption onSelectorFormattostrict_BEMto emphasize that
this is a particular dialect which may not be what developers expect - Allow
SelectorFormatconvention explanations to be customized via the
#{type}_convention_explanationandconvention_explanationoptions - Add
camel_caseandsnake_caseconventions toNameFormat - Remove
BEMconvention fromNameFormat, as it didn't make sense in this
context sinceNameFormatdoes 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
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
PropertyUnitsto not error on properties with function call values - Fix
DeclarationOrderfalse positives on lines of the same type of node - Fix
PropertyUnitsfalse 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
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
SpaceAfterPropertyColonto report nested properties - Add
PropertyUnitsallowing customization of which units are allowed for specific properties - Allow color literals in map declarations and the
rgbahelper function inColorVariable - Gracefully handle when a library specified via
-r/--requireis not found
and return a semantic exit codeEX_UNAVAILABLE(69) - Improve message of
DeclarationOrderto 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
--excludeflags and
excludeconfiguration 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
This is primarily a bugfix release, but with some backwards incompatible changes to the VendorPrefixes (now called VendorPrefix) linter and its configuration options.
- Fix
ColorVariableto not report occurrences oftransparentwhen 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
VendorPrefixconfig optionsincludeandexcludeto
additional_identifersandexcluded_identifers, respectively - Rename
VendorPrefixestoVendorPrefix - 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
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
ImportantRulelinter which reports uses of!importantin properties - Add
VariableForPropertylinter which enforces using variables for
specified property values instead of literal values - Add
conventionoption toBorderZeroallowingnoneto be preferred over
zero - Add
separate_groupsoption toPropertySortOrderto specify that groups
of properties should be visually separated - Add
PropertyCountlinter which reports rule sets with a large number of
properties - Add
ColorVariablelinter which enforces the use of color literals in
variable declarations only - Add
break-after,break-before,break-inside, andtext-size-adjust
to list of recognized properties - Add
allow_non_nested_indentationoption toIndentationlinter - Allow files without
.scss/.cssextension 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_fromfrom
the configuration system
Bug Fixes
- Fix bug in
StringQuoteswhere Sass script in non-silent comments would
cause a crash - Fix control comments placed before
@includeblocks to apply within them - Fix crash in
PropertySortOrderwhen 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, andVendorPrefixeswhen linting
properties with list literals containing empty lists
SCSS-Lint 0.33.0
This release includes a infinite loop bugfix and some changes to the rake task that comes with scss-lint.
- Call
Kernel.exitwith 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
SpaceAfterCommafor arguments spanning multiple
lines
SCSS-Lint 0.32.0
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
--requireswitch that caused custom formatters to
not berequired before they were created - Fix bug in
BangFormatwhere lines without a semicolon would cause an
infinite loop