scss_lint-auto_correct 1.2.2 → 1.2.3
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/auto_correct/cli.rb +5 -1
- data/lib/scss_lint/auto_correct/correctors/string_quotes.rb +1 -1
- data/lib/scss_lint/auto_correct/property_sorter.rb +3 -0
- data/lib/scss_lint/auto_correct/version.rb +1 -1
- data/test/fixtures/variable_declarations.scss +4 -0
- data/test/unit/property_sort_order_test.rb +7 -0
- data/test/unit/string_quotes_test.rb +6 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba31ad11e01bc97606f3bf7ea0a8f01d4495aa74
|
4
|
+
data.tar.gz: 7d4724e51e377269ae3327ddd0c12af40c1d1a69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5795bece705bd92b234a86cb8547bb3d8a64c6ff26af39c5f5e86c4182f0f882bf9454bd1d21cbbeca377108fe0d12b880e4dd30c41afa866a25b116e3bde657
|
7
|
+
data.tar.gz: a0a7be4773f3b483fa665c0b1ee481e295d3c49e1e0c933c506bcbd515c04b95df09dc09535940daa64e2ef1b54973b1a5abcf37185b2fdd19ec593744948501
|
@@ -36,6 +36,10 @@ module SCSSLint::AutoCorrect
|
|
36
36
|
|
37
37
|
def run(argv)
|
38
38
|
parse_args! argv
|
39
|
+
if option? :version
|
40
|
+
puts VERSION
|
41
|
+
return 0
|
42
|
+
end
|
39
43
|
load_config!
|
40
44
|
if option? :help, :h
|
41
45
|
print_help
|
@@ -116,7 +120,7 @@ module SCSSLint::AutoCorrect
|
|
116
120
|
def selected_correctors
|
117
121
|
selected = []
|
118
122
|
unselected = []
|
119
|
-
|
123
|
+
@correctors.each do |c|
|
120
124
|
selected << c if option? c.short_name
|
121
125
|
unselected << c if option? "no-#{c.short_name}"
|
122
126
|
end
|
@@ -20,5 +20,12 @@ class PropertySortOrderTest < Minitest::Test
|
|
20
20
|
output = corrector.new.call input
|
21
21
|
assert_equal input, output
|
22
22
|
end
|
23
|
+
|
24
|
+
it "doesnt try to sort variable declarations" do
|
25
|
+
input = load_file "variable_declarations.scss"
|
26
|
+
expected = input
|
27
|
+
output = corrector.new.call input
|
28
|
+
assert_equal expected, output
|
29
|
+
end
|
23
30
|
end
|
24
31
|
end
|
@@ -20,5 +20,11 @@ class StringQuotesTest < Minitest::Test
|
|
20
20
|
output = corrector.new.call(input)
|
21
21
|
assert_equal input, output
|
22
22
|
end
|
23
|
+
|
24
|
+
it "respectfully deals with backslashes" do
|
25
|
+
input = ".lorem { content: \"\\f078\\\\foo\" }"
|
26
|
+
output = corrector.new.call(input)
|
27
|
+
assert_equal input, output
|
28
|
+
end
|
23
29
|
end
|
24
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scss_lint-auto_correct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- test/fixtures/unsorted_properties.scss
|
81
81
|
- test/fixtures/unsorted_properties_corrected.scss
|
82
82
|
- test/fixtures/unsorted_properties_disable_rule.scss
|
83
|
+
- test/fixtures/variable_declarations.scss
|
83
84
|
- test/test_helper.rb
|
84
85
|
- test/unit/cli_test.rb
|
85
86
|
- test/unit/color_keyword.rb
|
@@ -144,6 +145,7 @@ test_files:
|
|
144
145
|
- test/fixtures/unsorted_properties.scss
|
145
146
|
- test/fixtures/unsorted_properties_corrected.scss
|
146
147
|
- test/fixtures/unsorted_properties_disable_rule.scss
|
148
|
+
- test/fixtures/variable_declarations.scss
|
147
149
|
- test/test_helper.rb
|
148
150
|
- test/unit/cli_test.rb
|
149
151
|
- test/unit/color_keyword.rb
|