Skip to content

Latest commit

 

History

History
441 lines (377 loc) · 40.2 KB

CHANGELOG.md

File metadata and controls

441 lines (377 loc) · 40.2 KB

Changelog

4.5.0 (2017-11-27)

  • Added a Lesshint.checkFiles() method. This is a more general-purpose method working on globs instead of directories/file names. (dc939cd)
  • Deprecated the following methods: (dc939cd)
    • Lesshint.checkDirectory()
    • Lesshint.checkFile()
    • Lesshint.checkPath()
  • The CLI will now also utilize the Lesshint.checkFiles() method. (dc939cd)

4.4.0 (2017-11-10)

  • Added a spaceAroundBang linter. (b459b8b)
  • CI tests are run on Node 9. (7f8e58a)

4.3.0 (2017-10-28)

  • Updated postcss-values-parser to 1.3.0. (218ca20)
  • Added a hasQuotes util. (86feef6)
  • Replaced some instances of string concatenation with template strings. (73fd66e)

4.2.0 (2017-10-24)

  • Updated postcss-selector-parser to 3.0.0. (6fac21a)
  • The parseSelector util can also accept PostCSS Rule nodes which gives better errors. (6fac21a)
  • Updated sinon to 4.0.0. (82ee2aa)

4.1.3 (2017-09-25)

  • Fixed an issue where finalNewline would erroneously report files with CRLF line endings. (5aff629)

4.1.2 (2017-09-20)

  • Fixed an issue where spaceBeforeBrace would erroneously report whitespace before a new line. (8078c85)
  • Fixed an issue where the inline config rule name check wouldn't properly accept all characters in rule names. (9fde6bf)
  • Fixed a typo in the trailingWhitespace error message. (a5fa514)
  • Fixed a typo in the trailingWhitespace docs. (bc94cdc)
  • Added docs on allowed characters in rule names. (3bb78af)

4.1.1 (2017-07-26)

  • Downgraded postcss-values-parser to 1.2.2. (c26f1e6)

4.1.0 (2017-07-24)

4.0.2 (2017-07-20)

  • Lockdown postcss-values-parser to ~ range. (d198ed6)

4.0.1 (2017-07-10)

  • Fixed an issue where incomplete rules would crash lesshint. (31b54c1)
  • Fixed faulty column reporting in spaceAroundOperator. (87cb546)
  • Added fr to propertyUnits defaults. (80fb2b4)
  • The isColor from postcss-values-parser is now used where applicable. (2c038af)

4.0.0 (2017-06-25)

  • Breaking Updated postcss-less to 1.0.0, could cause issues if custom linters are used. (03107e5)
  • Breaking Updated postcss to 6.0.0, could cause issues if custom linters are used. (4e49588)
  • Breaking Warnings no longer give exit code 1, and errors give exit code 1 instead of 2. (5bc9e3f)
  • Fixed an issue where config objects passed to the Linter class would be modified. (da93ccb)
  • Added docs for the at_least_one_space option on spaceAfterPropertyColon. (767e022)
  • Updated ESLint to 4.0. (63c2a11)
  • Updated nyc to 11.0. (e6318a5)
  • Updated chai to 4.0. (f79cea4)

3.3.1 (2017-05-08)

  • Updated postcss-less to 0.16.0. (03107e5)
  • Updated postcss-values-parser to 1.2.1. (1728ff1)

3.3.0 (2017-05-03)

  • Added a colorVariables linter. (a4b46fc)
  • Added utils to help with common operations:
  • Fixed an issue with spaceAfterPropertyValue and !important. (b69ff98)

3.2.0 (2017-04-22)

  • Added a custom linter loading fallback where the path will be resolved against the .lesshintrc location. (40cffa2)
  • The Linter class was refactored. (49b7e3b)
  • Added docs on linter loading. (0101934)

3.1.1 (2017-03-27)

  • Fixed an issue where finalNewline would report the wrong position when double \n characters were used. (d234a20)
  • Fixed an issue where spaceAroundOperator would erroneously report numbers surrounded by parentheses. (98953c0)
  • Made sure internal error classes can handle both strings and error objects. (2a8a52a)
  • Fixed an issue where urlQuotes would erroneously report variables. (4508e81)
  • Updated gulp-mocha to 4.x. (7f392ee)
  • Replaced istanbul with nyc. (92d59f8)
  • Updated sinon to 2.x. (f94cae6)
  • Fixed an singleLinePerProperty example config typo. (5acc9d7)
  • Added a more prominent way to access rule docs from the README. (bc6cc3e)

3.1.0 (2017-02-16)

  • Added a variableValue linter. (1a9d48d)
  • Added a universalSelector linter. (781e372)
  • Fixed an issue where spaceAroundComma would crash on stray commas. (37aaa9a)
  • Fixed faulty line reporting issues in:

3.0.1 (2017-02-10)

  • Lockdown postcss-values-parser to ~ range. (7e03dbc)

3.0.0 (2017-02-08)

  • Breaking Dropped support for Node < 4. (7a142ee)
  • Breaking The public Node API now exposes multiple classes instead of just the Lesshint class. (5013aae)
  • Breaking All Promises returned from Lesshint methods are now native ones instead of Vow. (afda593)
  • Breaking Whenever an inaccessible file is encountered, lesshint will now throw an error. (63d258)
  • Added a Lesshint.getConfig() method to search for config files using lesshint's logic. (7850cbf)
  • A complete ES6 rewrite was performed. (879160f)
  • A new Runner class has been added, exposing the full CLI API to Node consumers. (7c9e76a)
  • excludedFiles will now be checked on all paths before lesshint tries to access them. (7bc3ab2)
  • The fullPath property in linting results will now always be a full, absolute path. (dab57d4)
  • Relative custom linter paths will now be resolved against process.cwd(). (6f2b5d9)
  • The default reporter can now be explicitly required. (587c215)
  • Replaced use of the exit module with process.exitCode. (004ae71)
  • Passing -1 to the --max-warnings flag is no longer supported. Simply omit the flag for the same behavior. (f8473d1)
  • postcss-values-parser was updated to 1.1.0. (a91aabb)
  • A huge documentation refresh. (3addaf0)
  • Added the engines field to package.json. (a62da86)
  • Added tests for the lesshint binary. (2a16a17)

2.4.0 (2016-12-14)

  • Added a allowSingleLineRules option to singleLinePerProperty. (52879a7)
  • Added a position field to results. (6292387)
  • Test console spies are now restored before doing assertions. (00f2f1d)
  • Added issue and PR templates. (33f767d)
  • Fixed a "there's"/"there are" typo in the README. (31e5eb3)

2.3.0 (2016-11-29)

  • Added a -x/--max-warnings CLI flag. (21e184d)
  • Added a JSON reporter. (a69bdee)
  • Reporters can now also be objects and not just file paths. (376940c)
  • Fixed a "is"/"are" typo in the README. (282fdea)

2.2.1 (2016-10-30)

  • Fixed a newlineAfterBlock regression from 2.2.0. (117a2b5)

2.2.0 (2016-10-27)

  • Rules without any options can now be enabled by just setting it to to true. (5071ce9)
  • Invalid inline rules are now properly reported. (df2fcac)
  • When lesshint fails for some reason, the currently checked file is now included in the output. (b783f9c)
  • Fixed an issue where duplicateProperty would erroneously report properties using the Less merge feature. (317a7af)
  • Fixed an issue where newlineAfterBlock would give false positives with lines containing trailing whitespace. (ed2c9f6)
  • Fixed an issue stringQuotes would erroneously report some at-rules. (5f1a2b6)
  • Fixed a typo in the "Unknown error" output. (059e162)
  • Fixed a typo in the CLI flags documentation. (a77fca0)

2.1.1 (2016-09-11)

  • Fixed a false positive in newlineAfterBlock with nested blocks. (e64c360)
  • Fixed an issue where singleLinePerSelector would report the same selector multiple times. (507e89)
  • Fixed an issue in spaceBeforeBrace where indented blocks would be erroneously reported with the new_line setting. (45d166e)
  • Fixed an issue in spaceBeforeBrace where the one_space option would erroneously allow other spaces than just a single one. (45d166e)
  • Removed old spaceBeforeComma setting in the default config. (d7bb4f6)

2.1.0 (2016-09-02)

  • Added maxCharPerLine linter. (af69e95)
  • Added newlineAfterBlock linter. (05d48e1)
  • Fixed an issue where stringQuotes wouldn't check at-rules. (aaf1d84)
  • Fixed an issue where spaceBetweenParens would report the wrong line. (fa6ff41)
  • Added tests for failing linter plugins. (02aeef0)
  • Added some examples on how to use lesshint from custom code. (0a87b24)

2.0.3 (2016-08-09)

  • Fixed an issue where importPath wouldn't handle Less import options. (dc099ee)
  • Fixed two issues where urlFormat and urlQuotes wouldn't report multiple URLs in the same declaration. (ec5bd4a)
  • Updated gulp-mocha to 3.x. (28c80b8)

2.0.2 (2016-07-31)

  • Fixed an issue where the wrong line was reported in decimalZero. (e0c8e94)
  • Removed unnecessary gulp-debug-finder dependency. (967968b)
  • Bumped postcss-values-parser to 0.1.7 and added tests for a bug fixed there. (22e11eb)
  • Fixed some broken tests. (44b542f)

2.0.1 (2016-07-25)

  • Fixed an issue where finalNewline and trailingWhitespace weren't called. (6386b4c)

2.0.0 (2016-07-13)

  • Added the possibility to use custom linters. (97e7268)
  • Added a allowNewline option to spaceAroundComma. (1cb009a)
  • Made a small behavioral change in decimalZero where it now only checks if there's always/never a leading/trailing decimal number. (95e8037)
  • Fixed an issue where qualifyingElement would report &.classname. (af37172)
  • Fixed an issue where spaceBetweenParens would fail on mulitiline definitions. (846ebb0)
  • Fixed an issue where decimalZero would erroneously report whole numbers when style was none. (b46be32)
  • Fixed a ton of other bugs found after the parser back-end switch. (Full diff from 2.0.0-rc1)

2.0.0-rc1 (2016-05-16)

  • Completely new parser back-end, using PostCSS. Please report any issues! (1894408)
  • Removed support for old reporter style. (49a2dba)
  • Added a Lesshint.getReporter() method for loading of reporters using lesshint's logic. (6fc0041)
  • Fixed an issue where paths would sometimes include double slashes. (0a197db)

1.5.2 (2016-03-31)

  • Changed gonzales-pe full URL to GitHub pattern. (e83e665)

1.5.1 (2016-03-29)

  • Fixed an issue where zeroUnit would crash in certain cases. (34606cc)

1.5.0 (2016-03-24)

  • Added a at_least_one_space value for the style option in spaceAfterPropertyColon. (5e9fd1e)
  • Added units and exclude options to zeroUnit. (728f37a)
  • Fixed an issue where decimalZero wouldn't check all numbers. (661cc57)
  • Fixed an issue where zeroUnit would erroneously report properties without units. (728f37a)

1.4.0 (2016-03-01)

  • Added the following linters:
  • Added support for configuration using inline comments. (cf757cd)
  • Added a 18f option to singleLinePerSelector. (2f65c31)
  • Fixed an issue where singleLinePerProperty would erroneously report mixins without semicolons. (ef97361)
  • Fixed an issue where spaceAroundOperator would erroneously report negative numbers. (2569d73)
  • Fixed an issue where trailingWhitespace would output errors when checking empty files. (26ba39b)
  • Fixed an issue where importPath would erroneously report files with different file extensions than .less. (b7610dd)
  • Fixed an issue where singleLinePerSelector would erroneously report selectors with the comma on a new line. (637ff49)
  • Fixed an issue where finalNewline would sometimes report the wrong line. (12981cd)
  • Updated ESLint to 2.x (4c14d3a)

1.3.1 (2016-02-12)

  • Fixed an issue where spaceAroundOperator would erroneously try to check negative values. (fe37b21)
  • Fixed an issue where spaceAroundOperator would erroneously report font-size/line-height shorthand declarations. (4819346)

1.3.0 (2016-02-12)

  • Added the following linters:
  • 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)

1.2.2 (2016-01-26)

  • Fixed an issue where local variable declarations would crash duplicateProperty. (2955198)

1.2.1 (2015-12-14)

  • 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)

1.2.0 (2015-12-10)

  • 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)

1.1.0 (2015-11-21)

  • 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)

1.0.1 (2015-10-22)

  • Fixed an issue where local variable declarations would crash propertyUnits. (06bee99)
  • Fixed an issue where importPath wouldn't check url() 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)

1.0.0 (2015-10-19)

  • Complete linter refactor. (92bb70a)
  • Merged spaceAfterComma and spaceBeforeComma into spaceAroundComma (28497b0).
  • Merged leadingZero and trailingZero into decimalZero (12d34a5).
  • Removed the quote style option from attributeQuotes. (c0b229e)
  • The comment linter is now disabled by default. (c93121f)
  • The default value for zeroUnit is now keep_unit. (0c9ef81)
  • The following changes has been made to propertyUnits: (8b85210)
    • Renamed global to valid.
    • Added an invalid option.
  • 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 to 3.x. (ac47970, 9cba245)
  • Updated other dependencies. (acb5e10, fcdf05d)

0.9.4 (2015-09-25)

  • Fix for bad 0.9.3.

0.9.3 (2015-09-25)

  • Fixed an issue where propertyOrdering would try to check variables and crash.

0.9.2 (2015-09-23)

  • 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.

0.9.1 (2015-09-09)

  • 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).

0.9.0 (2015-08-31)

  • lesshint now reports Less parse errors. Props @shellscape. (#46, #47).
  • All reporters now receive a severity property with the values error for parse errors and warning 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 and spaceAfterComma 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).

0.8.0 (2015-08-16)

  • 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.

0.7.1 (2015-08-05)

  • Fixed an issue where Windows line endings in the Less source would cause the wrong line to be reported (#28).

0.7.0 (2015-06-24)

  • 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.

0.6.2 (2015-06-01)

  • Stopped hexLength and hexNotation from reporting on invalid hex colors.

0.6.1 (2015-05-28)

  • Lock gonzales-pe dependency to stop things from breaking due to changes there.

0.6.0 (2015-05-27)

  • 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 from gonzales-pe.
  • The detached rulesets feature of Less is now supported thanks to a upstream patch in gonzales-pe.
  • Increased test coverage.

0.5.1 (2015-05-19)

  • Fixed issues with hexLength, hexNotation, and hexValidation where they wouldn't check for hex colors outside declarations (in variables for example) (#28).

0.5.0 (2015-05-17)

  • 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.

0.4.1 (2015-05-11)

  • Fixed two issues with urlFormat and urlQuotes where they would incorrectly report errors when the URLs were surrounded by spaces (#22).

0.4.0 (2015-05-10)

  • Breaking change: The LessHint class is now called Lesshint.
  • 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 set enabled: false anymore.
  • Some other improvements to the linters.

0.3.1 (2015-05-03)

  • 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).

0.3.0 (2015-05-01)

  • 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.

0.2.0 (2015-04-27)

  • 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 when style is one_space (#4).

0.1.5 (2015-04-24)

  • 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.

0.1.4 (2015-04-20)

  • Fixed incorrect dependency name.

0.1.3 (2015-04-20)

  • 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.

0.1.2 (2015-04-19)

  • Another version bump for npm.

0.1.1 (2015-04-19)

  • Version bump for npm after some old files were deleted.

0.1.0 (2015-04-19)

  • Initial release