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

postcss-bem-linter

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-bem-linter - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

lib/should-ignore-selector.js

4

CHANGELOG.md

@@ -0,1 +1,5 @@

=== 1.2.0 (October 12, 2015)
* Support array of patterns for `ignoreSelectors`.
=== 1.1.0 (September 18, 2015)

@@ -2,0 +6,0 @@

3

lib/validate-selectors.js
var listSequences = require('./list-sequences');
var shouldIgnoreRule = require('./should-ignore-rule');
var shouldIgnoreSelector = require('./should-ignore-selector');

@@ -35,3 +36,3 @@ /**

sequence = allSequences[i];
if (config.ignorePattern && config.ignorePattern.test(sequence)) continue;
if (config.ignorePattern && shouldIgnoreSelector(sequence, config.ignorePattern)) continue;
if (i === 0 && initialPattern.test(sequence)) continue;

@@ -38,0 +39,0 @@ if (i !== 0 && combinedPattern.test(sequence)) continue;

var listSequences = require('./list-sequences');
var shouldIgnoreRule = require('./should-ignore-rule');
var shouldIgnoreSelector = require('./should-ignore-selector');

@@ -19,3 +20,3 @@ /**

sequence = allSequences[i];
if (config.ignorePattern && config.ignorePattern.test(sequence)) continue;
if (config.ignorePattern && shouldIgnoreSelector(sequence, config.ignorePattern)) continue;
if (config.utilityPattern.test(sequence)) continue;

@@ -22,0 +23,0 @@ config.result.warn(

{
"name": "postcss-bem-linter",
"version": "1.1.0",
"version": "1.2.0",
"description": "A BEM linter for postcss",

@@ -5,0 +5,0 @@ "files": [

@@ -99,4 +99,4 @@ # postcss-bem-linter

if the stylesheet defines a group of utilities, as explained below.
- `ignoreSelectors`: A regular expression describing selector sequences to ignore. You can use this to
systematically ignore selectors matching this pattern, instead of having to add a
- `ignoreSelectors`: A regular expression or an array of regular expressions describing selector sequences to ignore. You can use this to
systematically ignore selectors matching certain patterns, instead of having to add a
`/* postcss-bem-linter: ignore */` comment above each one (see below).

@@ -159,3 +159,13 @@

ignoreSelectors: /\.no-.+/
})
});
// using an array for `ignoreSelectors`
bemLinter({
preset: 'bem',
componentName: /cmpnt_[a-zA-Z]+/,
ignoreSelectors: [
/\.no-.+/,
/\.isok-.+/
]
});
```

@@ -270,3 +280,3 @@

As describe above, you can include an `ignoreSelectors` regular expression in your configuration.
As describe above, you can include an `ignoreSelectors` regular expression (or array of regular expressions) in your configuration.
This is the best approach if you want to systematically ignore all selectors matching a pattern (e.g. all Modernizr classes).

@@ -273,0 +283,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