Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lesshint

Package Overview
Dependencies
Maintainers
2
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lesshint - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

3

CHANGELOG.md
# 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))

54

lib/linter.js

@@ -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 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc