- Fixed an issue where
spaceAroundOperator
would erroneously try to check negative values. (fe37b21) - Fixed an issue where
spaceAroundOperator
would erroneously reportfont-size/line-height
shorthand declarations. (4819346)
- Added the following linters:
spaceAroundOperator
(ac689c7)
- Added the possibility to override linter
severity
and added a new exit status code for it. See linter docs for more info. (0bc95e1, 062950f, e1d6831) - Fixed an issue where excludedFiles in the config file weren't honored in the CLI. (974d0fa)
- Updated lodash to
4.x
. (ac52619) - Some other minor improvements to
singleLinePerProperty
. (072664d, bc439e7)
- Fixed an issue where local variable declarations would crash
duplicateProperty
. (2955198)
- Fixed an issue in
selectorNaming
where it would sometimes fail if there is no selector name. (8b48fee) - Fixed an issue in
singleLinePerProperty
where it would erroneously report "chained" mixins. (71f2afe) - Fixed an issue in
qualifyingElement
where it wouldn't check parent selectors. (8b090c9)
- Added
selectorNaming
linter. (94639fa) - Reporters now require a
report
method, and the old use is now deprecated. (72263bc) - Fixed an issue where nested media queries would be erroneously reported by
singleLinePerProperty
. (3f251e1) - Fixed an issue where declarations without a semicolon would erroneously trigger
singleLinePerProperty
. (3f251e1)
- Replaced our Less parser,
gonzales-pe
, with our own fork to solve various parsing issues. (a31a790) - Byte order marks are now stripped from config files. (9d2721e)
- New test suite, using Chai and Gulp. (7915ac5, 44a367c)
- Updated dependencies. (fc714bd, 62f3d72)
- Fixed an issue where local variable declarations would crash
propertyUnits
. (06bee99) - Fixed an issue where
importPath
wouldn't checkurl()
statements. (91cf906) - Fixed an issue where
urlQuotes
wouldn't check@import url()
statements. (a038ec5) - Fixed issues where
singleLinePerProperty
wouldn't check mixins, variables, and detached rulesets. (ae16888) - Fixed incorrect checking of absolute URLs in
importPath
. (2709dc9, 0756cba)
- Complete linter refactor. (92bb70a)
- Merged
spaceAfterComma
andspaceBeforeComma
intospaceAroundComma
(28497b0). - Merged
leadingZero
andtrailingZero
intodecimalZero
(12d34a5). - Removed the quote style option from
attributeQuotes
. (c0b229e) - The
comment
linter is now disabled by default. (c93121f) - The default value for
zeroUnit
is nowkeep_unit
. (0c9ef81) - The following changes has been made to
propertyUnits
: (8b85210)- Renamed
global
tovalid
. - Added an
invalid
option.
- Renamed
- Lint results are now sorted by line and column numbers. (50d223f)
- Better handling of parse errors, they are now returned together with the lint results. (f6efb3c)
- Updated
gonzales-pe
to3.x
. (ac47970, 9cba245) - Updated other dependencies. (acb5e10, fcdf05d)
- Fix for bad
0.9.3
.
- Fixed an issue where
propertyOrdering
would try to check variables and crash.
- Fixed an issue where
spaceBeforeBrace
wouldn't check@media
queries. Props @kokarn. (#61). - Fixed an issue where
finalNewline
would fail on empty files. - Fixed an issue where
trailingWhitespace
would fail on empty files.
- Fixed an issue in
propertyOrdering
where identical properties weren't handled correctly (#59). - Fixed an issue in
idSelector
where it would sometimes crash. - Fixed error message language in
urlQuotes
Props @shellscape. (#60).
lesshint
now reports Less parse errors. Props @shellscape. (#46, #47).- All reporters now receive a
severity
property with the valueserror
for parse errors andwarning
for rule violations. This feature will be developed further in future releases. - A
propertyOrdering
linter has been added. Props @srogers202. (#48) - Fixed an issue where
spaceBeforeComma
andspaceAfterComma
would erroneously report on all operators. (#49). - Fixed an issue where
singleLinePerProperty
would erroneously report lines with trailing comments. Props @CITguy. (#54). - Fixed an issue where
attributeQuotes
would erroneously report on boolean attributes. Props @CITguy. (#54). - Fixed message grammar in
singleLinePerSelector
(#42).
- This release contains possible breaking changes. Check this list before updating.
- Support for custom reporters has been added. This enables users to do whatever they want with the lint results, not just log it to the console.
- Added the following linters:
singleLinePerProperty
singleLinePerSelector
trailingWhitespace
- The Less AST passed to each linter is now frozen to prevent accidental modifying by a linter.
- All linters now returns the complete source of each offending line.
- Linters are no longer passed a filename.
- Fixed an issue where Windows line endings in the Less source would cause the wrong line to be reported (#28).
lesshint
has a new home: https://github.com/lesshint/lesshint- Added the following linters
importPath
propertyUnits
spaceAfterComma
spaceBeforeComma
spaceBetweenParens
- Updated
gonzales-pe
dependency, adding support for all forms of:extend()
. - Added the possibility to exclude files. See the
excludedFiles
option and-e
/--exclude
flags. - Added the possibility to specify which file extensions to check, see the
fileExtensions
option. - Fixed an issue where
lesshint
wouldn't report any more errors when the parser encountered a problem. - Fixed an issue where
hexNotation
would report hex codes with invalid characters. - Fixed an issue where
spaceAfterPropertyValue
wouldn't report multiple errors in the same block.
- Stopped
hexLength
andhexNotation
from reporting on invalid hex colors.
- Lock
gonzales-pe
dependency to stop things from breaking due to changes there.
- Added the following linters:
qualifyingElement
spaceAfterPropertyValue
- Fixed an issue where
trailingSemicolon
would fail when a space was preceding the semicolon. - Fixed an issue where
hexNotation
would incorrectly report colors with only numbers. - Fixed an issue in
idSelector
due to a changed AST fromgonzales-pe
. - The
detached rulesets
feature of Less is now supported thanks to a upstream patch ingonzales-pe
. - Increased test coverage.
- Fixed issues with
hexLength
,hexNotation
, andhexValidation
where they wouldn't check for hex colors outside declarations (in variables for example) (#28).
- Added the following linters:
attributeQuotes
comment
leadingZero
trailingZero
zeroUnit
- Added an
exclude
option to the following linters:duplicateProperty
idSelector
- The
stringQuotes
linter now checks strings everywhere, not just in rulesets.
- Fixed two issues with
urlFormat
andurlQuotes
where they would incorrectly report errors when the URLs were surrounded by spaces (#22).
- Breaking change: The
LessHint
class is now calledLesshint
. - The following linters have been added:
importantRule
stringQuotes
urlFormat
urlQuotes
- All linters can now be disabled by simply setting the respective property to
false
. No need to setenabled: false
anymore. - Some other improvements to the linters.
- When running from the CLI and a line or column is
null
, it's no longer printed. - Fixed an issue where the only error reported was a missing final newline.
- Fixed an issue that prevented errors on the last ruleset from being shown when a final newline was missing.
- Fixed an issue where
emptyRule
would incorrectly report errors on rules that only contain a mixin (#16). - Fixed an issue where
trailingSemicolon
would fail on an empty rule. - Fixed an issue where
trailingSemicolon
would incorrectly report errors in rules containing variables inside@media
directives (#15).
- Added the following linters:
duplicateProperty
emptyRule
finalNewline
idSelector
trailingSemicolon
- Better error messages, the property or value that caused the error are now more clearly described.
- Internal code cleanup.
- Added the following linters:
borderZero
hexLength
hexNotation
hexValidation
spaceAfterPropertyName
lesshint
will now exit with proper status codes. E.g.1
when there's a lint error in a checked file, thus failing builds etc.- Made some improvements to CLI output, added colors and made it easier to read.
- Fixed an issue where the
spaceBeforeBrace
linter would report the wrong column whenstyle
isone_space
(#4
).
- The default options are now always loaded, regardless if
lesshint
is running from the CLI or another module. - If no files are passed via the CLI, an error is now printed.
- When something's wrong with a passed config file, the error message from
JSON.parse()
is also shown.
- Fixed incorrect dependency name.
- Fixed some issues where the default config wasn't properly loaded.
- Fixed an issue when the CLI was passed multiple directories and files, they weren't all linted.
- Another version bump for npm.
- Version bump for npm after some old files were deleted.
- Initial release