scss-lint 0.17.3 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea4994ca70c2a812ea9cb5ca269d62d579ca272e
4
- data.tar.gz: b3a746fdffecb51ce4a3e90321a817388383ff65
3
+ metadata.gz: 4ba79ac6014b4db405c0954003c2ec1ac2753419
4
+ data.tar.gz: 3a6d1cf5b8453c4766d6f95d9ff1df3e8267515c
5
5
  SHA512:
6
- metadata.gz: 783e51dfd9b4d79dacd2389e631f553b781e4c6d9982ca92e6cb6abd373328e6fe06ecc4554be4009defd19a5be8719dac2085aed387ffd5fc640b9b58db3f1a
7
- data.tar.gz: ea959ec532513917df55f1d27d01052c9ce20718392a01cf5218de756e5c555eb869f0a762611ffe0f5f14db9695b137011317deda3261d17f6a385364dea8c6
6
+ metadata.gz: 0971a5a157de5fd32506a46d2935dfa07a476d648580bdb4e72edbe435fc47754903a2356dde7c8ffa2f8825d11a631e07fa50bc954a99bafc6ef7ef2187d61e
7
+ data.tar.gz: 3b463780c5fdcef0d2e06fe17bd2dd1739ebbc7bf8c0f473acc0e18023633e69e7de37762c5efc1819a6c62f8372569c56612ba255dedc88c3cdc1ec0093c873
data/config/default.yml CHANGED
@@ -46,6 +46,9 @@ linters:
46
46
  PlaceholderInExtend:
47
47
  enabled: true
48
48
 
49
+ PropertySortOrder:
50
+ enabled: true
51
+
49
52
  PropertySpelling:
50
53
  enabled: true
51
54
  extra_properties: []
@@ -60,9 +63,6 @@ linters:
60
63
  SingleLinePerSelector:
61
64
  enabled: true
62
65
 
63
- SortedProperties:
64
- enabled: true
65
-
66
66
  SpaceAfterComma:
67
67
  enabled: true
68
68
 
@@ -1,6 +1,6 @@
1
1
  module SCSSLint
2
2
  # Checks the declaration order of properties.
3
- class Linter::SortedProperties < Linter
3
+ class Linter::PropertySortOrder < Linter
4
4
  include LinterRegistry
5
5
 
6
6
  def visit_rule(node)
@@ -30,7 +30,7 @@ module SCSSLint
30
30
  end
31
31
 
32
32
  def description
33
- 'Properties should be sorted in alphabetical order, with ' <<
33
+ 'Properties should be sorted in order, with ' <<
34
34
  'vendor-prefixed extensions before the standardized CSS property'
35
35
  end
36
36
 
@@ -62,7 +62,12 @@ module SCSSLint
62
62
  0
63
63
  end
64
64
  else
65
- a[:property] <=> b[:property]
65
+ if config['order']
66
+ (config['order'].index(a[:property]) || Float::INFINITY) <=>
67
+ (config['order'].index(b[:property]) || Float::INFINITY)
68
+ else
69
+ a[:property] <=> b[:property]
70
+ end
66
71
  end
67
72
  end
68
73
  end
@@ -1,4 +1,4 @@
1
1
  # Defines the gem version.
2
2
  module SCSSLint
3
- VERSION = '0.17.3'
3
+ VERSION = '0.18.0'
4
4
  end
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.17.3
4
+ version: 0.18.0
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-03-06 00:00:00.000000000 Z
12
+ date: 2014-03-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize
@@ -97,7 +97,6 @@ files:
97
97
  - lib/scss_lint/linter/space_before_brace.rb
98
98
  - lib/scss_lint/linter/capitalization_in_selector.rb
99
99
  - lib/scss_lint/linter/indentation.rb
100
- - lib/scss_lint/linter/sorted_properties.rb
101
100
  - lib/scss_lint/linter/trailing_semicolon_after_property_value.rb
102
101
  - lib/scss_lint/linter/shorthand.rb
103
102
  - lib/scss_lint/linter/id_with_extraneous_selector.rb
@@ -116,6 +115,7 @@ files:
116
115
  - lib/scss_lint/linter/space_after_property_colon.rb
117
116
  - lib/scss_lint/linter/debug_statement.rb
118
117
  - lib/scss_lint/linter/duplicate_property.rb
118
+ - lib/scss_lint/linter/property_sort_order.rb
119
119
  - lib/scss_lint/linter/hex_format.rb
120
120
  - lib/scss_lint/linter/color_keyword.rb
121
121
  - lib/scss_lint/linter/string_quotes.rb