scss-lint 0.25.0 → 0.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scss_lint/linter/indentation.rb +8 -3
- data/lib/scss_lint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4383a0ff6df66ae43c6b5a3a7b83fff68515a414
|
4
|
+
data.tar.gz: c4dd715631578ccba0f49bc2df013bd24d8c2488
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fe2aaf47a16df5179c6a15d6559d45ed756f5d86eb90cbc8b87822c930fb2369b705f84c4faa9b5e972e0418ff2b843533fca108737e3c15dc9a73bd23adad9
|
7
|
+
data.tar.gz: 095e7768edce611e4d91c9444d5db04fc9bec4a3c39489ef44a2809affeff4296e7eb7f5d5bab85d1a234da602fd3db442f44d6bc7294e2091b0721fba31eae2
|
@@ -25,9 +25,7 @@ module SCSSLint
|
|
25
25
|
|
26
26
|
# Ignore the case where the node is on the same line as its previous
|
27
27
|
# sibling or its parent, as indentation isn't possible
|
28
|
-
return if (
|
29
|
-
(previous.line == node.line ||
|
30
|
-
previous.source_range.end_pos.line == node.line)
|
28
|
+
return if nodes_on_same_line?(previous_node(node), node)
|
31
29
|
|
32
30
|
actual_indent = engine.lines[node.line - 1][/^(\s*)/, 1]
|
33
31
|
|
@@ -97,6 +95,13 @@ module SCSSLint
|
|
97
95
|
|
98
96
|
private
|
99
97
|
|
98
|
+
def nodes_on_same_line?(node1, node2)
|
99
|
+
return unless node1
|
100
|
+
|
101
|
+
node1.line == node2.line ||
|
102
|
+
(node1.source_range && node1.source_range.end_pos.line == node2.line)
|
103
|
+
end
|
104
|
+
|
100
105
|
def at_root_contains_inline_selector?(node)
|
101
106
|
return unless node.children.any?
|
102
107
|
|
data/lib/scss_lint/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scss-lint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-06-
|
12
|
+
date: 2014-06-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rainbow
|