Comparing version 1.3.0 to 1.3.1
# Changelog | ||
## 1.3.1 (2016-02-12) | ||
* Fixed an issue where `spaceAroundOperator` would erroneously try to check negative values. ([fe37b21](https://github.com/lesshint/lesshint/commit/fe37b21b29c2d5ae9e1a18b5060a16ba4eec9168)) | ||
* Fixed an issue where `spaceAroundOperator` would erroneously report `font-size/line-height` shorthand declarations. ([4819346](https://github.com/lesshint/lesshint/commit/4819346b2f07ee3138d2c7a2612c6db9e6510643)) | ||
## 1.3.0 (2016-02-12) | ||
* Added the following linters: | ||
* `spaceAroundOperator` ([2490d93](https://github.com/lesshint/lesshint/commit/2490d937d008dc0fd56ce77245fbf49fda892eef)) | ||
* `spaceAroundOperator` ([ac689c7](https://github.com/lesshint/lesshint/commit/ac689c7d9658bd5609df8286361864e73f42339a)) | ||
* Added the possibility to override linter `severity` and added a new exit status code for it. See linter docs for more info. ([0bc95e1](https://github.com/lesshint/lesshint/commit/0bc95e1750a5d4c2312db9f0de47e707b2eebcf2), [062950f](https://github.com/lesshint/lesshint/commit/062950f5df9c29df22af91e6fc9c023ac293b584), [e1d6831](https://github.com/lesshint/lesshint/commit/e1d68311705ea2691671b728b2178bb5c6b59a9c)) | ||
@@ -6,0 +10,0 @@ * Fixed an issue where excludedFiles in the config file weren't honored in the CLI. ([974d0fa](https://github.com/lesshint/lesshint/commit/974d0fa6debfa5033c01c6b50a66a94c34e31a41)) |
@@ -28,2 +28,12 @@ 'use strict'; | ||
if (typeof prevElement === 'undefined' || typeof nextElement === 'undefined') { | ||
return; | ||
} | ||
// Ignore font-size/line-height shorthand declaration | ||
if ((element.content === '/' && prevElement.type === 'dimension') && | ||
(nextElement.type === 'dimension' || nextElement.type === 'number')) { | ||
return; | ||
} | ||
switch (config.style) { | ||
@@ -30,0 +40,0 @@ case 'both': |
{ | ||
"name": "lesshint", | ||
"description": "A tool to aid you in writing clean and consistent Less.", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"main": "./lib/lesshint.js", | ||
@@ -6,0 +6,0 @@ "author": { |
# lesshint | ||
[![npm](https://img.shields.io/npm/v/lesshint.svg)]() | ||
[![npm](https://img.shields.io/npm/v/lesshint.svg)](https://www.npmjs.com/package/lesshint) | ||
[![Build Status](https://travis-ci.org/lesshint/lesshint.svg?branch=master)](https://travis-ci.org/lesshint/lesshint) | ||
@@ -4,0 +4,0 @@ [![Build status](https://ci.appveyor.com/api/projects/status/6ig85uac52imq1i6/branch/master?svg=true)](https://ci.appveyor.com/project/jwilsson/lesshint/branch/master) |
@@ -170,2 +170,36 @@ 'use strict'; | ||
it('should not report on minus values', function () { | ||
var source = '.foo { margin-left: -10px; }'; | ||
var result; | ||
var ast; | ||
var options = { | ||
style: 'both' | ||
}; | ||
ast = parseAST(source); | ||
ast = ast.first(); | ||
result = linter.lint(options, ast); | ||
expect(result).to.be.undefined; | ||
}); | ||
it('should not report on font-size/line-height shorthand declaration', function () { | ||
var source = '.foo { font: 12px/1.5 Arial; }'; | ||
var result; | ||
var ast; | ||
var options = { | ||
style: 'both' | ||
}; | ||
ast = parseAST(source); | ||
ast = ast.first(); | ||
result = linter.lint(options, ast); | ||
expect(result).to.be.undefined; | ||
}); | ||
it('should throw on invalid "style" value', function () { | ||
@@ -172,0 +206,0 @@ var source = '.foo { height: calc(10px+10px); }'; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
312818
7262