Comparing version 2.0.0 to 2.0.1
# Changelog | ||
## 2.0.1 (2016-07-25) | ||
* Fixed an issue where `finalNewline` and `trailingWhitespace` weren't called. ([6386b4c](https://github.com/lesshint/lesshint/commit/6386b4c846e5bbb5aa9ba834a78f3a3fb0241925)) | ||
## 2.0.0 (2016-07-13) | ||
@@ -3,0 +6,0 @@ * Added the possibility to use custom linters. ([97e7268](https://github.com/lesshint/lesshint/commit/97e7268f639dfe956cf337885fdd44de2ac61982)) |
@@ -102,25 +102,3 @@ 'use strict'; | ||
// Freeze the AST so linters won't accidentally change it | ||
Object.freeze(ast); | ||
// Fetch inline options and merge it with whatever passed | ||
inlineOptions = getInlineOptions(ast.root.first); | ||
config = merge(config, inlineOptions); | ||
// Load any additional linters | ||
linters = mergeLintersFromConfig(defaultLinters, config); | ||
// Fetch all single line options before we start the actual linting | ||
ast.root.walkComments(function (node) { | ||
var option = parseRules(node); | ||
var key = Object.keys(option)[0]; | ||
option[key] = merge(option[key], { | ||
line: node.source.start.line | ||
}); | ||
lineOptions.push(option); | ||
}); | ||
ast.root.walk(function (node) { | ||
var checkNode = function (node) { | ||
linters.forEach(function (linter) { | ||
@@ -196,4 +174,34 @@ var options = config[linter.name]; | ||
}); | ||
}; | ||
// Freeze the AST so linters won't accidentally change it | ||
Object.freeze(ast); | ||
// Fetch inline options and merge it with whatever passed | ||
inlineOptions = getInlineOptions(ast.root.first); | ||
config = merge(config, inlineOptions); | ||
// Load any additional linters | ||
linters = mergeLintersFromConfig(defaultLinters, config); | ||
// Fetch all single line options before we start the actual linting | ||
ast.root.walkComments(function (node) { | ||
var option = parseRules(node); | ||
var key = Object.keys(option)[0]; | ||
option[key] = merge(option[key], { | ||
line: node.source.start.line | ||
}); | ||
lineOptions.push(option); | ||
}); | ||
// Check top-level root node | ||
checkNode(ast.root); | ||
// Walk through and check each node within (but not including) root | ||
ast.root.walk(function (node) { | ||
checkNode(node); | ||
}); | ||
return results; | ||
@@ -200,0 +208,0 @@ }; |
{ | ||
"name": "lesshint", | ||
"description": "A tool to aid you in writing clean and consistent Less.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "./lib/lesshint.js", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -33,12 +33,14 @@ # lesshint | ||
Each option is then specified by it's own JSON object, for example: | ||
Each option is then specified by its own JSON object, for example: | ||
```js | ||
"fileExtensions": [".less", ".css"], | ||
"excludedFiles": ["vendor.less"], | ||
"spaceAfterPropertyColon": { | ||
"enabled": true, | ||
"style": "one_space" // Comments are allowed | ||
{ | ||
"fileExtensions": [".less", ".css"], | ||
"excludedFiles": ["vendor.less"], | ||
"spaceAfterPropertyColon": { | ||
"enabled": true, | ||
"style": "one_space" // Comments are allowed | ||
} | ||
} | ||
@@ -45,0 +47,0 @@ ``` |
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
364784
7834
263