scss_lint 0.57.1 → 0.58.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -2
  3. data/data/properties.txt +11 -0
  4. data/data/pseudo-elements.txt +2 -0
  5. data/lib/scss_lint/cli.rb +4 -4
  6. data/lib/scss_lint/config.rb +2 -5
  7. data/lib/scss_lint/constants.rb +1 -1
  8. data/lib/scss_lint/engine.rb +5 -5
  9. data/lib/scss_lint/linter.rb +1 -1
  10. data/lib/scss_lint/linter/color_variable.rb +0 -3
  11. data/lib/scss_lint/linter/disable_linter_reason.rb +3 -3
  12. data/lib/scss_lint/linter/hex_length.rb +1 -1
  13. data/lib/scss_lint/linter/hex_notation.rb +1 -1
  14. data/lib/scss_lint/linter/hex_validation.rb +2 -2
  15. data/lib/scss_lint/linter/indentation.rb +1 -1
  16. data/lib/scss_lint/linter/leading_zero.rb +1 -1
  17. data/lib/scss_lint/linter/length_variable.rb +1 -1
  18. data/lib/scss_lint/linter/property_units.rb +1 -1
  19. data/lib/scss_lint/linter/selector_depth.rb +1 -1
  20. data/lib/scss_lint/linter/shorthand.rb +1 -1
  21. data/lib/scss_lint/linter/space_around_operator.rb +1 -1
  22. data/lib/scss_lint/linter/space_between_parens.rb +2 -2
  23. data/lib/scss_lint/linter/string_quotes.rb +2 -2
  24. data/lib/scss_lint/linter/trailing_semicolon.rb +1 -1
  25. data/lib/scss_lint/linter/trailing_whitespace.rb +1 -1
  26. data/lib/scss_lint/linter/trailing_zero.rb +1 -1
  27. data/lib/scss_lint/linter/unnecessary_mantissa.rb +2 -2
  28. data/lib/scss_lint/linter/url_format.rb +2 -2
  29. data/lib/scss_lint/linter/url_quotes.rb +2 -2
  30. data/lib/scss_lint/linter/vendor_prefix.rb +1 -1
  31. data/lib/scss_lint/linter/zero_unit.rb +1 -1
  32. data/lib/scss_lint/options.rb +3 -3
  33. data/lib/scss_lint/rake_task.rb +1 -1
  34. data/lib/scss_lint/runner.rb +8 -8
  35. data/lib/scss_lint/utils.rb +1 -1
  36. data/lib/scss_lint/version.rb +1 -1
  37. data/spec/scss_lint/plugins/linter_dir_spec.rb +1 -1
  38. metadata +5 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adfca59ecf233f95713f55a90aea77f6cbf10a2546a0598225809b2381db2d83
4
- data.tar.gz: 14dfb730615d12c3395af9a36c14beb0e35a897ad24ab9e4e5387d3fd25b85b5
3
+ metadata.gz: 92e61fd011e43d17184d85050c0ade3bc1c523df0460690cd9bfb981a4e1e3eb
4
+ data.tar.gz: 57f90d69091f7da90fd470991011c28098622346f49e5ccdf42c44118e6f7c0c
5
5
  SHA512:
6
- metadata.gz: 673054a1230b817a048cf21ac011b7bc79b95cce16ae507821a09318a0c6d87ce1e857d4c24198a14d7d0333fa53c9ddcb95ced7049eb3c10ee3b169a05328cd
7
- data.tar.gz: c8428851d3399867f6e519419695b2cec1f496d12fad8e95f923789797ac1df990f7be17a56e98e1c954faa777ebe62e0caa3f4be1b7a2fcf7d944ab9b7be1d4
6
+ metadata.gz: ca68ec7818ecde8761f172cb23d0054280e6473a74f49b75dd3a424b8eede6effc2d8132006531da5c01800f8bc7d78661096d1ce151b8911d71d923da3a1ffd
7
+ data.tar.gz: 86824a7d4e3b21fb298a5a4e21668fa1c045a4691cfa0e0f967f279b49002fbf386919693d9f4dd3107db62fa8b1962389e3b01a99c2d6db5a7ceae6329d6fb6
@@ -1,5 +1,4 @@
1
- Copyright (c) 2014-2015 Brigade
2
- http://www.brigade.com/
1
+ Copyright (c) Shane da Silva
3
2
 
4
3
  Permission is hereby granted, free of charge, to any person obtaining
5
4
  a copy of this software and associated documentation files (the
@@ -125,6 +125,7 @@ break-before
125
125
  break-inside
126
126
  buffered-rendering
127
127
  caption-side
128
+ caret-color
128
129
  clear
129
130
  clip
130
131
  clip-path
@@ -155,6 +156,8 @@ counter-increment
155
156
  counter-reset
156
157
  crop
157
158
  cursor
159
+ cx
160
+ cy
158
161
  direction
159
162
  display
160
163
  dominant-baseline
@@ -198,6 +201,7 @@ font-stretch
198
201
  font-style
199
202
  font-variant
200
203
  font-variant-ligatures
204
+ font-variant-numeric
201
205
  font-weight
202
206
  glyph-orientation-horizontal
203
207
  glyph-orientation-vertical
@@ -390,11 +394,13 @@ perspective-origin
390
394
  perspective-origin-x
391
395
  perspective-origin-y
392
396
  phonemes
397
+ place-content
393
398
  pointer-events
394
399
  position
395
400
  print-color-adjust
396
401
  punctuation-trim
397
402
  quotes
403
+ r
398
404
  region-break-after
399
405
  region-break-before
400
406
  region-break-inside
@@ -412,7 +418,10 @@ ruby-align
412
418
  ruby-overhang
413
419
  ruby-position
414
420
  ruby-span
421
+ rx
422
+ ry
415
423
  scroll-behavior
424
+ scrollbar-width
416
425
  shape-image-threshold
417
426
  shape-inside
418
427
  shape-margin
@@ -524,5 +533,7 @@ word-wrap
524
533
  wrap-flow
525
534
  wrap-through
526
535
  writing-mode
536
+ x
537
+ y
527
538
  z-index
528
539
  zoom
@@ -29,6 +29,7 @@
29
29
  -moz-viewport
30
30
  -moz-viewport-scroll
31
31
  -moz-xul-anonymous-block
32
+ -ms-backdrop
32
33
  -ms-browse
33
34
  -ms-check
34
35
  -ms-clear
@@ -54,6 +55,7 @@
54
55
  -webkit-datetime-edit-month-field
55
56
  -webkit-datetime-edit-text
56
57
  -webkit-datetime-edit-year-field
58
+ -webkit-details-marker
57
59
  -webkit-file-upload-button
58
60
  -webkit-full-page-media
59
61
  -webkit-inner-spin-button
@@ -31,8 +31,8 @@ module SCSSLint
31
31
  def run(args)
32
32
  options = SCSSLint::Options.new.parse(args)
33
33
  act_on_options(options)
34
- rescue StandardError => ex
35
- handle_runtime_exception(ex, options)
34
+ rescue StandardError => e
35
+ handle_runtime_exception(e, options)
36
36
  end
37
37
 
38
38
  private
@@ -205,9 +205,9 @@ module SCSSLint
205
205
  Array(options[:required_paths]).each do |path|
206
206
  require path
207
207
  end
208
- rescue LoadError => ex
208
+ rescue LoadError => e
209
209
  raise SCSSLint::Exceptions::RequiredLibraryMissingError,
210
- "Required library not found: #{ex.message}"
210
+ "Required library not found: #{e.message}"
211
211
  end
212
212
 
213
213
  def load_reporters(options)
@@ -64,9 +64,9 @@ module SCSSLint
64
64
  else
65
65
  {}
66
66
  end
67
- rescue StandardError => ex
67
+ rescue StandardError => e
68
68
  raise SCSSLint::Exceptions::InvalidConfiguration,
69
- "Invalid configuration: #{ex.message}"
69
+ "Invalid configuration: #{e.message}"
70
70
  end
71
71
 
72
72
  options = convert_single_options_to_arrays(options)
@@ -94,8 +94,6 @@ module SCSSLint
94
94
  # Merge options from wildcard linters into individual linter configs
95
95
  def merge_wildcard_linter_options(options)
96
96
  options = options.dup
97
-
98
- # rubocop:disable Performance/HashEachMethods (FALSE POSITIVE)
99
97
  # Cannot use `each_key` because the cycle adds new keys during iteration
100
98
  options.fetch('linters', {}).keys.each do |class_name|
101
99
  next unless class_name.include?('*')
@@ -103,7 +101,6 @@ module SCSSLint
103
101
  wildcard_options = options['linters'].delete(class_name)
104
102
  apply_options_to_matching_linters(class_name, options, wildcard_options)
105
103
  end
106
- # rubocop:enable Performance/HashEachMethods
107
104
 
108
105
  options
109
106
  end
@@ -5,6 +5,6 @@ module SCSSLint
5
5
  SCSS_LINT_HOME = File.realpath(File.join(File.dirname(__FILE__), '..', '..')).freeze
6
6
  SCSS_LINT_DATA = File.join(SCSS_LINT_HOME, 'data').freeze
7
7
 
8
- REPO_URL = 'https://github.com/brigade/scss-lint'.freeze
8
+ REPO_URL = 'https://github.com/sds/scss-lint'.freeze
9
9
  BUG_REPORT_URL = "#{REPO_URL}/issues".freeze
10
10
  end
@@ -34,12 +34,12 @@ module SCSSLint
34
34
  .lines
35
35
  @tree = @engine.to_tree
36
36
  find_any_control_commands
37
- rescue Encoding::UndefinedConversionError, Sass::SyntaxError, ArgumentError => error
38
- if error.is_a?(Encoding::UndefinedConversionError) ||
39
- error.message.match(/invalid.*(byte sequence|character)/i)
37
+ rescue Encoding::UndefinedConversionError, Sass::SyntaxError, ArgumentError => e
38
+ if e.is_a?(Encoding::UndefinedConversionError) ||
39
+ e.message.match(/invalid.*(byte sequence|character)/i)
40
40
  raise FileEncodingError,
41
- "Unable to parse SCSS file: #{error}",
42
- error.backtrace
41
+ "Unable to parse SCSS file: #{e}",
42
+ e.backtrace
43
43
  else
44
44
  raise
45
45
  end
@@ -75,7 +75,7 @@ module SCSSLint
75
75
  line_source.length - range.start_pos.offset + 1
76
76
  end
77
77
 
78
- # Workaround for https://github.com/brigade/scss-lint/issues/887 to acount for
78
+ # Workaround for https://github.com/sds/scss-lint/issues/887 to acount for
79
79
  # https://github.com/sass/sass/issues/2284.
80
80
  length = 1 if length < 1
81
81
 
@@ -18,13 +18,10 @@ module SCSSLint
18
18
 
19
19
  def visit_script_string(node)
20
20
  return if literal_string?(node)
21
-
22
- # rubocop:disable Performance/HashEachMethods (FALSE POSITIVE v0.50.0)
23
21
  remove_quoted_strings(node.value)
24
22
  .scan(/(^|\s)(#[a-f0-9]+|[a-z]+)(?=\s|$)/i)
25
23
  .select { |_, word| color?(word) }
26
24
  .each { |_, color| record_lint(node, color) }
27
- # rubocop:enable Performance/HashEachMethods
28
25
  end
29
26
 
30
27
  def visit_script_funcall(node)
@@ -7,7 +7,7 @@ module SCSSLint
7
7
  # No lint if the first line of the comment is not a command (because then
8
8
  # either this comment has no commands, or the first line serves as a the
9
9
  # reason for a command on a later line).
10
- if comment_lines(node).first.match(COMMAND_REGEX)
10
+ if comment_lines(node).first.match?(COMMAND_REGEX)
11
11
  visit_command_comment(node)
12
12
  else
13
13
  @previous_comment = node
@@ -21,7 +21,7 @@ module SCSSLint
21
21
  end
22
22
 
23
23
  # Not a "disable linter reason" if the last line of the previous comment is a command.
24
- if comment_lines(@previous_comment).last.match(COMMAND_REGEX)
24
+ if comment_lines(@previous_comment).last.match?(COMMAND_REGEX)
25
25
  report_lint(node)
26
26
  return
27
27
  end
@@ -48,7 +48,7 @@ module SCSSLint
48
48
  (?<action>disable)\s+
49
49
  (?<linters>.*?)
50
50
  \s*(?:\*/|\n) # Comment end marker or end of line
51
- }x
51
+ }x.freeze
52
52
 
53
53
  def comment_lines(node)
54
54
  node.value.join.split("\n")
@@ -4,7 +4,7 @@ module SCSSLint
4
4
  class Linter::HexLength < Linter
5
5
  include LinterRegistry
6
6
 
7
- HEX_REGEX = /(#(\h{3}|\h{6}))(?!\h)/
7
+ HEX_REGEX = /(#(\h{3}|\h{6}))(?!\h)/.freeze
8
8
 
9
9
  def visit_script_color(node)
10
10
  return unless hex = source_from_range(node.source_range)[HEX_REGEX, 1]
@@ -3,7 +3,7 @@ module SCSSLint
3
3
  class Linter::HexNotation < Linter
4
4
  include LinterRegistry
5
5
 
6
- HEX_REGEX = /(#(\h{3}|\h{6}))(?!\h)/
6
+ HEX_REGEX = /(#(\h{3}|\h{6}))(?!\h)/.freeze
7
7
 
8
8
  def visit_script_color(node)
9
9
  return unless hex = source_from_range(node.source_range)[HEX_REGEX, 1]
@@ -13,10 +13,10 @@ module SCSSLint
13
13
 
14
14
  private
15
15
 
16
- HEX_REGEX = /(#(\h{3}|\h{6}|\h{8}))(?!\h)/
16
+ HEX_REGEX = /(#(\h{3}|\h{6}|\h{8}))(?!\h)/.freeze
17
17
 
18
18
  def check_hex(hex, node)
19
- return if HEX_REGEX.match(hex)
19
+ return if HEX_REGEX.match?(hex)
20
20
  add_lint(node, "Colors must have either three or six digits: `#{hex}`")
21
21
  end
22
22
  end
@@ -98,7 +98,7 @@ module SCSSLint
98
98
 
99
99
  def visit_import(node)
100
100
  previous_node(node)
101
- return unless engine.lines[node.line - 1] =~ /@import/
101
+ return unless engine.lines[node.line - 1].match?(/@import/)
102
102
  check_indentation(node)
103
103
  end
104
104
 
@@ -22,7 +22,7 @@ module SCSSLint
22
22
 
23
23
  private
24
24
 
25
- NUMBER_WITH_LEADING_ZERO_REGEX = /^-?(0?\.\d+)/
25
+ NUMBER_WITH_LEADING_ZERO_REGEX = /^-?(0?\.\d+)/.freeze
26
26
 
27
27
  CONVENTIONS = {
28
28
  'exclude_zero' => {
@@ -23,7 +23,7 @@ module SCSSLint
23
23
  (?:#{LENGTH_UNITS.join('|')}) # unit!
24
24
  )
25
25
  (?:$|[\s+\-/*()]) # math or space separated, or end of string
26
- }x
26
+ }x.freeze
27
27
 
28
28
  def visit_prop(node)
29
29
  return if allowed_prop?(node)
@@ -15,7 +15,7 @@ module SCSSLint
15
15
  )
16
16
  ([a-z%]+) # [1: units] letters or percent sign, e.g. px or %
17
17
  )
18
- /ix
18
+ /ix.freeze
19
19
 
20
20
  def visit_root(_node)
21
21
  @globally_allowed_units = config['global'].to_set
@@ -47,7 +47,7 @@ module SCSSLint
47
47
  # combinator, as these "combine" simple sequences such that they do not
48
48
  # increase depth.
49
49
  depth = simple_sequences.size -
50
- separators.count { |item| item == '~' || item == '+' }
50
+ separators.count { |item| %w[~ +].include?(item) }
51
51
 
52
52
  depth +=
53
53
  if parent_selectors > 0
@@ -64,7 +64,7 @@ module SCSSLint
64
64
  (\S+\s+\S+(\s+\S+){0,2}) # Two to four values separated by spaces
65
65
  (\s+!\w+)? # Ignore `!important` priority overrides
66
66
  \z
67
- /x
67
+ /x.freeze
68
68
 
69
69
  # @param prop [String]
70
70
  # @param script_string [Sass::Script::Value::String]
@@ -13,7 +13,7 @@ module SCSSLint
13
13
  # (only selectors?), the source ranges are offset by two (probably not
14
14
  # accounting for the `#{`. Slide everything to the left by 2, and maybe
15
15
  # things will look sane this time.
16
- unless operation_sources.operator_source =~ Sass::Script::Lexer::REGULAR_EXPRESSIONS[:op]
16
+ unless operation_sources.operator_source.match?(Sass::Script::Lexer::REGULAR_EXPRESSIONS[:op])
17
17
  operation_sources.adjust_for_interpolation
18
18
  operation_sources.adjust_sources
19
19
  end
@@ -29,7 +29,7 @@ module SCSSLint
29
29
 
30
30
  private
31
31
 
32
- TRAILING_WHITESPACE = /\s*$/
32
+ TRAILING_WHITESPACE = /\s*$/.freeze
33
33
 
34
34
  def check(node, source) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength
35
35
  @spaces = config['spaces']
@@ -90,7 +90,7 @@ module SCSSLint
90
90
  # those parens may be part of a parent function call. We don't care about
91
91
  # such parens. This depends on whether the preceding character is part of
92
92
  # a function name.
93
- return original_source if character_at(range.start_pos, left_offset - 1) =~ /[A-Za-z0-9_]/
93
+ return original_source if character_at(range.start_pos, left_offset - 1).match?(/[A-Za-z0-9_]/)
94
94
 
95
95
  range.start_pos.offset += left_offset
96
96
  range.end_pos.offset += right_offset
@@ -45,7 +45,7 @@ module SCSSLint
45
45
  \s*\)?\s*;?\s* # Sometimes the Sass parser includes a trailing ) or ;
46
46
  (//.*)? # Exclude any trailing comments that might have snuck in
47
47
  \z
48
- }x
48
+ }x.freeze
49
49
 
50
50
  def extract_string_without_quotes(source)
51
51
  return unless match = STRING_WITHOUT_QUOTES_REGEX.match(source)
@@ -66,7 +66,7 @@ module SCSSLint
66
66
  if string =~ /(?<! \\) \\'/x && string !~ /"/
67
67
  add_lint(node, 'Use double-quoted strings when writing single ' \
68
68
  'quotes to avoid having to escape the single quotes')
69
- elsif string =~ /(?<! \\) \\"/x
69
+ elsif string.match?(/(?<! \\) \\"/x)
70
70
  add_lint(node, "Don't escape double quotes in single-quoted strings")
71
71
  end
72
72
  elsif string !~ /"/
@@ -45,7 +45,7 @@ module SCSSLint
45
45
 
46
46
  def visit_import(node)
47
47
  # Ignore all but the last import for comma-separated @imports
48
- return if source_from_range(node.source_range) =~ /,\s*$/
48
+ return if source_from_range(node.source_range).match?(/,\s*$/)
49
49
  check_semicolon(node)
50
50
  end
51
51
 
@@ -5,7 +5,7 @@ module SCSSLint
5
5
 
6
6
  def visit_root(_node)
7
7
  engine.lines.each_with_index do |line, index|
8
- next unless line =~ /[ \t]+$/
8
+ next unless line.match?(/[ \t]+$/)
9
9
 
10
10
  add_lint(index + 1, 'Line contains trailing whitespace')
11
11
  end
@@ -22,7 +22,7 @@ module SCSSLint
22
22
 
23
23
  private
24
24
 
25
- FRACTIONAL_DIGIT_REGEX = /^-?(\d*\.\d+)/
25
+ FRACTIONAL_DIGIT_REGEX = /^-?(\d*\.\d+)/.freeze
26
26
 
27
27
  def check_for_trailing_zeros(node, original_number)
28
28
  return unless match = /^(\d*\.(?:[0-9]*[1-9]|[1-9])*)0+$/.match(original_number)
@@ -8,7 +8,7 @@ module SCSSLint
8
8
 
9
9
  def visit_script_string(node)
10
10
  return unless node.type == :identifier
11
- return if node.value =~ /^'|"/
11
+ return if node.value.match?(/^'|"/)
12
12
  return if url_literal?(node)
13
13
 
14
14
  node.value.scan(REAL_NUMBER_REGEX) do |number, integer, mantissa, units|
@@ -35,7 +35,7 @@ module SCSSLint
35
35
  (?<mantissa>\d+)
36
36
  (?<units>\w*)
37
37
  )\b
38
- /ix
38
+ /ix.freeze
39
39
 
40
40
  MESSAGE_FORMAT = '`%s` should be written without the mantissa as `%s%s`'.freeze
41
41
 
@@ -49,8 +49,8 @@ module SCSSLint
49
49
  if uri.scheme || uri.host
50
50
  add_lint(node, "URL `#{url}` should not contain protocol or domain")
51
51
  end
52
- rescue URI::Error => ex
53
- add_lint(node, "Invalid URL `#{url}`: #{ex}")
52
+ rescue URI::Error => e
53
+ add_lint(node, "Invalid URL `#{url}`: #{e}")
54
54
  end
55
55
  end
56
56
  end
@@ -20,8 +20,8 @@ module SCSSLint
20
20
  private
21
21
 
22
22
  def check(node, string)
23
- return unless string =~ /^\s*url\(\s*[^"']/
24
- return if string =~ /^\s*url\(\s*data:/ # Ignore data URIs
23
+ return unless string.match?(/^\s*url\(\s*[^"']/)
24
+ return if string.match?(/^\s*url\(\s*data:/) # Ignore data URIs
25
25
 
26
26
  add_lint(node, 'URLs should be enclosed in quotes')
27
27
  end
@@ -27,7 +27,7 @@ module SCSSLint
27
27
  private
28
28
 
29
29
  def check_identifier(node, identifier)
30
- return unless identifier =~ /^[_-]/
30
+ return unless identifier.match?(/^[_-]/)
31
31
 
32
32
  # Strip vendor prefix to check against identifiers.
33
33
  # (Also strip closing parentheticals from values like linear-gradient.)
@@ -35,7 +35,7 @@ module SCSSLint
35
35
  (?<!\.|\#) # Ignore zeroes following `#` (colors) or `.` (decimals)
36
36
  (0[a-z]+) # Zero followed by letters indicating some sort of unit
37
37
  \b
38
- /ix
38
+ /ix.freeze
39
39
 
40
40
  MESSAGE_FORMAT = '`%s` should be written without units as `0`'.freeze
41
41
 
@@ -27,10 +27,10 @@ module SCSSLint
27
27
  @options[:files] = args
28
28
 
29
29
  @options
30
- rescue OptionParser::InvalidOption => ex
30
+ rescue OptionParser::InvalidOption => e
31
31
  raise SCSSLint::Exceptions::InvalidCLIOption,
32
- ex.message,
33
- ex.backtrace
32
+ e.message,
33
+ e.backtrace
34
34
  end
35
35
 
36
36
  private
@@ -73,7 +73,7 @@ module SCSSLint
73
73
  end
74
74
  end
75
75
 
76
- def run_cli(task_args) # rubocop:disable AbcSize
76
+ def run_cli(task_args)
77
77
  cli_args = ['--config', config] if config
78
78
 
79
79
  logger = quiet ? SCSSLint::Logger.silent : SCSSLint::Logger.new(STDOUT)
@@ -33,18 +33,18 @@ module SCSSLint
33
33
  @linters.each do |linter|
34
34
  begin
35
35
  run_linter(linter, engine, file[:path])
36
- rescue StandardError => error
36
+ rescue StandardError => e
37
37
  raise SCSSLint::Exceptions::LinterError,
38
38
  "#{linter.class} raised unexpected error linting file #{file[:path]}: " \
39
- "'#{error.message}'",
40
- error.backtrace
39
+ "'#{e.message}'",
40
+ e.backtrace
41
41
  end
42
42
  end
43
- rescue Sass::SyntaxError => ex
44
- @lints << Lint.new(Linter::Syntax.new, ex.sass_filename, Location.new(ex.sass_line),
45
- "Syntax Error: #{ex}", :error)
46
- rescue FileEncodingError => ex
47
- @lints << Lint.new(Linter::Encoding.new, file[:path], Location.new, ex.to_s, :error)
43
+ rescue Sass::SyntaxError => e
44
+ @lints << Lint.new(Linter::Syntax.new, e.sass_filename, Location.new(e.sass_line),
45
+ "Syntax Error: #{e}", :error)
46
+ rescue FileEncodingError => e
47
+ @lints << Lint.new(Linter::Encoding.new, file[:path], Location.new, e.to_s, :error)
48
48
  end
49
49
 
50
50
  # For stubbing in tests.
@@ -1,7 +1,7 @@
1
1
  module SCSSLint
2
2
  # Collection of helpers used across a variety of linters.
3
3
  module Utils
4
- COLOR_REGEX = /^#[a-f0-9]{3,6}$/i
4
+ COLOR_REGEX = /^#[a-f0-9]{3,6}$/i.freeze
5
5
 
6
6
  # Returns whether the given string is a color literal (keyword or hex code).
7
7
  #
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module SCSSLint
5
- VERSION = '0.57.1'.freeze
5
+ VERSION = '0.58.0'.freeze
6
6
  end
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe SCSSLint::Plugins::LinterDir do
4
- let(:plugin_directory) { File.expand_path('../../fixtures/plugins', __FILE__) }
4
+ let(:plugin_directory) { File.expand_path('../fixtures/plugins', __dir__) }
5
5
  let(:subject) { described_class.new(plugin_directory) }
6
6
 
7
7
  describe '#load' do
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scss_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.57.1
4
+ version: 0.58.0
5
5
  platform: ruby
6
6
  authors:
7
- - Brigade Engineering
8
7
  - Shane da Silva
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2018-09-27 00:00:00.000000000 Z
11
+ date: 2019-05-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
@@ -53,7 +52,6 @@ dependencies:
53
52
  version: 3.5.5
54
53
  description: Configurable tool for writing clean and consistent SCSS
55
54
  email:
56
- - eng@brigade.com
57
55
  - shane@dasilva.io
58
56
  executables:
59
57
  - scss-lint
@@ -260,7 +258,7 @@ files:
260
258
  - spec/spec_helper.rb
261
259
  - spec/support/isolated_environment.rb
262
260
  - spec/support/matchers/report_lint.rb
263
- homepage: https://github.com/brigade/scss-lint
261
+ homepage: https://github.com/sds/scss-lint
264
262
  licenses:
265
263
  - MIT
266
264
  metadata: {}
@@ -272,15 +270,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
272
270
  requirements:
273
271
  - - ">="
274
272
  - !ruby/object:Gem::Version
275
- version: '2.1'
273
+ version: '2.4'
276
274
  required_rubygems_version: !ruby/object:Gem::Requirement
277
275
  requirements:
278
276
  - - ">="
279
277
  - !ruby/object:Gem::Version
280
278
  version: '0'
281
279
  requirements: []
282
- rubyforge_project:
283
- rubygems_version: 2.7.6
280
+ rubygems_version: 3.0.3
284
281
  signing_key:
285
282
  specification_version: 4
286
283
  summary: SCSS lint tool