postcss-bem-linter
Advanced tools
Comparing version 2.3.2 to 2.3.3
@@ -0,1 +1,5 @@ | ||
=== 2.3.3 (February 15, 2015) | ||
* Skip nodes that do not have `source` properties. | ||
=== 2.3.2 (February 14, 2015) | ||
@@ -2,0 +6,0 @@ |
10
index.js
@@ -39,7 +39,8 @@ var postcss = require('postcss'); | ||
if (rule.parent && rule.parent.name === 'keyframes') return; | ||
if (!rule.source) return; | ||
var ruleStartLine = (rule.source) ? rule.source.start.line : null; | ||
var ruleStartLine = rule.source.start.line; | ||
ranges.forEach(function(range) { | ||
if (ruleStartLine && ruleStartLine < range.start) return; | ||
if (ruleStartLine && range.end && ruleStartLine > range.end) return; | ||
if (ruleStartLine < range.start) return; | ||
if (range.end && ruleStartLine > range.end) return; | ||
checkRule(rule, range); | ||
@@ -92,3 +93,4 @@ }) | ||
root.walkComments(function(comment) { | ||
var commentStartLine = (comment.source) ? comment.source.start.line : 0; | ||
var commentStartLine = (comment.source) ? comment.source.start.line : null; | ||
if (!commentStartLine) return; | ||
@@ -95,0 +97,0 @@ if (END_DIRECTIVE.test(comment.text)) { |
{ | ||
"name": "postcss-bem-linter", | ||
"version": "2.3.2", | ||
"version": "2.3.3", | ||
"description": "A BEM linter for postcss", | ||
@@ -5,0 +5,0 @@ "files": [ |
32306
393