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 4.1.3 to 4.2.0

test/data/config/bad.json

6

CHANGELOG.md
# Changelog
## 4.2.0 (2017-10-24)
* Updated `postcss-selector-parser` to `3.0.0`. ([6fac21a](https://github.com/lesshint/lesshint/commit/6fac21a404a8c8ff48564fa21e5357efaca9b94d))
* The `parseSelector` util can also accept PostCSS `Rule` nodes which gives better errors. ([6fac21a](https://github.com/lesshint/lesshint/commit/6fac21a404a8c8ff48564fa21e5357efaca9b94d))
* Updated `sinon` to `4.0.0`.
([82ee2aa](https://github.com/lesshint/lesshint/commit/82ee2aa8c4bb2116dc7010375cec46483e506c3c))
## 4.1.3 (2017-09-25)

@@ -3,0 +9,0 @@ * Fixed an issue where `finalNewline` would erroneously report files with CRLF line endings. ([5aff629](https://github.com/lesshint/lesshint/commit/5aff62999cb00dbf323a0001cefe640f3f48334c))

3

docs/developer-guide/api/utils.md

@@ -26,6 +26,7 @@ # Utils

## `parseSelector(selector)`
Parse a selector using [`postcss-selector-parser`](https://github.com/postcss/postcss-selector-parser).
Parse a selector using [`postcss-selector-parser`](https://github.com/postcss/postcss-selector-parser). Accepts a selector string or a PostCSS `Rule` node.
```js
utils.parseSelector('.foo'); // Parser tree
utils.parseSelector(ruleNode); // Parser tree
```

@@ -32,0 +33,0 @@

@@ -15,3 +15,3 @@ 'use strict';

const selectors = parseSelector(node.selector);
const selectors = parseSelector(node);
const results = [];

@@ -18,0 +18,0 @@

@@ -11,3 +11,3 @@ 'use strict';

lint: function idSelectorLinter (config, node) {
const tree = parseSelector(node.selector);
const tree = parseSelector(node);
const excludes = config.exclude.map((id) => {

@@ -14,0 +14,0 @@ // Remove #

@@ -43,3 +43,3 @@ 'use strict';

lint: function qualifyingElementLinter (config, node) {
const selectors = parseSelector(node.selector);
const selectors = parseSelector(node);
const selectorTypes = ['nesting', 'tag'];

@@ -46,0 +46,0 @@ const results = [];

@@ -12,3 +12,3 @@ 'use strict';

lint: function selectorNamingLinter (config, node) {
const selectors = parseSelector(node.selector);
const selectors = parseSelector(node);
const selectorTypes = ['class', 'id'];

@@ -15,0 +15,0 @@ const exclude = config.exclude || [];

@@ -11,3 +11,3 @@ 'use strict';

lint: function singleLinePerSelectorLinter (config, node) {
const tree = parseSelector(node.selector);
const tree = parseSelector(node);
const results = [];

@@ -14,0 +14,0 @@

@@ -97,3 +97,3 @@ 'use strict';

default:
tree = parseSelector(node.selector);
tree = parseSelector(node);

@@ -100,0 +100,0 @@ tree.walkAttributes((selector) => {

@@ -11,3 +11,3 @@ 'use strict';

lint: function universalSelectorLinter (config, node) {
const tree = parseSelector(node.selector);
const tree = parseSelector(node);
const results = [];

@@ -14,0 +14,0 @@

@@ -6,9 +6,3 @@ 'use strict';

module.exports = function (selector) {
let tree;
parser((selectors) => {
tree = selectors;
}).process(selector);
return tree;
return parser().astSync(selector);
};
{
"name": "lesshint",
"description": "A tool to aid you in writing clean and consistent Less.",
"version": "4.1.3",
"version": "4.2.0",
"main": "./lib/index.js",

@@ -29,3 +29,3 @@ "author": {

"postcss-less": "^1.0.0",
"postcss-selector-parser": "^2.0.0",
"postcss-selector-parser": "^3.0.0",
"postcss-values-parser": "~1.2.2",

@@ -44,3 +44,3 @@ "rcfinder": "^0.1.8",

"rimraf": "^2.4.2",
"sinon": "^3.0.0"
"sinon": "^4.0.0"
},

@@ -47,0 +47,0 @@ "bin": {

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