New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lesshint

Package Overview
Dependencies
Maintainers
1
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 0.7.0 to 0.7.1

3

CHANGELOG.md
# Changelog
### 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](https://github.com/lesshint/lesshint/issues/28)).
## 0.7.0 (2015-06-24)

@@ -4,0 +7,0 @@ * `lesshint` has a new home: https://github.com/lesshint/lesshint

5

lib/linter.js

@@ -38,5 +38,8 @@ 'use strict';

exports.lint = function (input, path, config) {
var ast = this.parseAST(input);
var errors = [];
var ast;
input = input.replace(/\r\n|\r|\n/g, '\n'); // Normalize line endings. See #40
ast = this.parseAST(input);
ast.traverse(function (node) {

@@ -43,0 +46,0 @@ var i;

{
"name": "lesshint",
"description": "A tool to aid you in writing clean and consistent Less.",
"version": "0.7.0",
"version": "0.7.1",
"main": "./lib/lesshint.js",

@@ -6,0 +6,0 @@ "author": {

# lesshint
[![Build Status](https://travis-ci.org/lesshint/lesshint.svg?branch=master)](https://travis-ci.org/lesshint/lesshint)
[![Windows CI](https://ci.appveyor.com/api/projects/status/github/jwilsson/lesshint?svg=true)](https://ci.appveyor.com/project/jwilsson/lesshint/branch/master)
[![Build status](https://ci.appveyor.com/api/projects/status/6ig85uac52imq1i6/branch/master?svg=true)](https://ci.appveyor.com/project/jwilsson/lesshint/branch/master)
[![Coverage Status](https://coveralls.io/repos/lesshint/lesshint/badge.svg?branch=master)](https://coveralls.io/r/lesshint/lesshint?branch=master)

@@ -6,0 +6,0 @@ [![Dependency Status](https://david-dm.org/lesshint/lesshint.svg?theme=shields.io&style=flat)](https://david-dm.org/lesshint/lesshint)

@@ -27,2 +27,27 @@ var assert = require('assert');

});
it('should handle all sorts of line endings (#40)', function () {
var source = '.foo {\r\n margin-right:10px; }\r\n';
var path = 'test.less';
var actual;
var expected = [{
column: 15,
file: 'test.less',
line: 2,
linter: 'spaceAfterPropertyColon',
message: 'Colon after property name should be followed by one space.'
}];
var config = {
spaceAfterPropertyColon: {
enabled: true,
style: 'one_space'
}
};
actual = linter.lint(source, path, config);
assert.deepEqual(actual, expected);
});
});

@@ -29,0 +54,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