Releases: sds/scss-lint
SCSS-Lint 0.31.0
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
smacsssort order option forPropertySortOrder - Add
recesssort order option forPropertySortOrder - Add
allow_leading_underscoreoption toNameFormatto allow the leading
underscore convention to denote private functions
Changes
- Change
IdWithExtraneousSelectortoIdSelectorand modify behavior to
always report a lint when an ID appears as part of a selector.
Bug Fixes
- Fix regression in default configuration for
QualifyingElementso that
elements with attributes, classes, or ids are disallowed by default - Fix error message for
TrailingSemicolonwhere lines without a semicolon
would incorrectly be reported as having a space before the semicolon - Fix
BangFormatlinter to not report lints for exclamation points in
strings - Update minimum version of
sassgem to 3.4.1 to fix a parser bug - Fix
DuplicatePropertynot reporting duplicate properties in nested rule
sets - Fix
TrailingSemicolonhandling of comma-separated@imports - Fix
SelectorFormatto not allow format of pseudo-selectors to be defined,
as they are always hyphenated lowercase - Fix
Indentationto not crash on@at-rootdirectives with comments inside - Fix
DuplicatePropertyto report correct name of duplicated property - Fix
EmptyLineBetweenBlocksto allow trailing comments after rule sets
(e.g. control comments disabling linters)
SCSS-Lint 0.30.0
New Features
- Add
VendorPrefixeslinter which ensures only whitelisted vendor-prefixed
properties are used - Add
scss_filesconfiguration option allowing a default set of files to be
linted if no files are explicitly specified - Add
BangFormatlinter which enforces spacing around the!for
!importantand!default - Add
new_lineoption toSpaceBeforeBracelinter enforcing opening curly
braces start on a new line - Add
NestingDepthlinter which ensures selectors are nested only up to a
specified maximum depth - Add support to
SelectorFormatfor specifying different conventions for
different types of selectors via the<type>_conventionoptions - Add
@importcheck toTrailingSemicolon - Add support for differentiating
@includes with actual content versus
no-content@includes inDeclarationOrder - Add support for checking the ordering of content within
@includes - Add
ImportPathlinter which ensures paths for@importdirectives follow
a certain format - Add
QualifyingElementlinter which checks for unnecessarily-qualified
element selectors - Add
--outflag which allows the output of the last formatter specified via
the--formatflag to be redirected to a file - Add
--requireflag allowing arbitrary Ruby modules to be loaded (facilitating
custom reporters)
Changes
- Improve message reported by
PropertySortOrderto specify the expected sort
order - Enforce UTF-8 encoding by default
- Change
BEMconvention ofSelectorFormatconventionoption to
hyphenated_BEM, and introduceBEMformat as specified in
https://bem.info/method/definitions/ - Prefix all syntax error messages with "Syntax Error:"
Bug Fixes
- Fix bug in
SpaceAfterPropertyName/TrailingSemicolonlinters 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
PropertySpellinglinter to check the names of nested properties
SCSS-Lint 0.29.0
Mostly bug fixes with a few new features. Most notable is the new linter SelectorFormat which renders the CapitalizationInSelector linter obsolete.
New features
- Add
TrailingZerolinter which checks for unnecessary zeros following a
decimal point - Add
SelectorFormatlinter 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
PropertySpellinglint - Enhance
TrailingSemicolonto check for more than one semicolon at the end
of a statement - Remove
CapitalizationInSelector, which has been superseded by the more
powerfulSelectorFormatlinter
Bug Fixes
- Fix bug where SassScript selectors referring to the current selector would
result in a crash - Fix bug in
EmptyLineBetweenBlockslinter where lint would incorrectly be
reported when comments immediately followed the closing brace of a rule set - Fix bug in
PropertySortOrderwhere properties within media queries were
not checked for sort order - Fix bug in
UrlQuoteslinter where lint would be reported for data URIs - Fix bug in
UnnecessaryParentReferencewhere selectors with multiple&
references where one&was concatenated would incorrectly report a lint
SCSS-Lint 0.28.0
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
StringQuoteswhere strings with interpolation were incorrectly
being linted - Upgrade minimum
sassversion dependency to 3.4.x series
SCSS-Lint 0.27.0
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_unspecifiedoption inPropertySortOrder - Add linting of
@includeand@if/@elseblocks inPropertySortOrder - Fix
HexValidationbug incorrectly reporting lints for 8 character hex
codes in Microsoftfilterproperty - Fix
UnnecessaryParentReferenceincorrectly reporting lints for nested
selectors with more than one parent reference
SCSS-Lint 0.26.2
Another bugfix release intended to fix some additional cases with the TrailingSemicolon linter.
- Fix
TrailingSemicolonbug with@includeblocks that didn't contain properties - Add more properties to
concentricpreset order
SCSS-Lint 0.26.1
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
TrailingSemicolonincorrectly reporting@includes with block contents - Fix
UnnecessaryParentReferenceincorrectly reporting using of&with
concatenation - Fix
SingleLinePerSelectorcrashing for selectors that contained
interpolated function calls - Add additional properties to the
concentricpreset order - Fix
LeadingZerocrashing on multi-line strings with interpolation
SCSS-Lint 0.26.0
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
severityoption allowing the severity level of a lint to be configured - Include linter name in lint description
- Add
characteroption toIndentationlinter which allows specifying
tabs or spaces as the indentation character of choice - Add
SingleLinePerPropertylinter which checks that properties each reside
on their own line - Add support to
PropertySortOrderto specify a preset sort order via the
orderproperty - Add
concentricpreset
sort order to thePropertySortOrderlinter - Add
ignore_unspecifiedoption toPropertySortOrderto indicate that
unspecified properties in custom sort orderings are to be ignored (i.e. they
can appear anywhere) - Add
ignoreoption toCompass::PropertyWithMixinlinter allowing you to
not warn for certain properties - Add
ignored_namesoption toCapitalizationInSelector, allowing you to
whitelist certain names as not needing to follow the convention - Add
ignored_typesoption toCapitalizationInSelector, allowing you to
selectively ignore capitalization in certain types of selectors - Add
UnnecessaryParentReferencelinter which checks nested selectors for
extraneous parent references - Teach
TrailingSemicolonto report lints for uses of@extend,@include,
or variable declarations without semicolons
Changes
- Change CLI to return exit code of
1if only warnings are reported, or2
if any errors are reported (was previously65for either) - Update
sassdependency to require 3.3.7 or later (fixes a parsing bug) - Include test files in gem distribution
- Rename
TrailingSemicolonAfterPropertyValuetoTrailingSemicolon
Bug Fixes
- Fix bug in
SpaceBeforeBracelinter where an erroneous lint would
be reported for a brace on its own line - Fix bug in
SpaceAfterCommawhere trailing spaces followed by a newline after
a comma would incorrectly report a lint - Fix
SingleLinePerSelectorto ignore any selectors that contain interpolation
SCSS-Lint 0.25.1
Includes a hotfix for a bug where the Indentation linter would crash on lines preceded by a comment.
SCSS-Lint 0.25.0
Mostly bug fixes along with a new linter ElsePlacement. See below for details.
- Fix bug in
Indentationlinter where@at-rootdirectives with inline
selectors would erroneously report incorrect indentation levels - Fix bug in
Indentationlinter where rule nodes with selectors spread
over multiple lines and a single inline property would incorrectly report
a lint - Add
ElsePlacementlinter which checks the position of@elsedirectives
with respect to the previous curly brace - Replace
allow_extra_spacesoption onSpaceAfterPropertyColonlinter with
stylewhich accepts multiple different property spacing styles - Fix bug in
PlaceholderInExtendlinter which erroneously report lints for
selectors with interpolated strings