slim_lint 0.22.0 → 0.23.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
  SHA256:
3
- metadata.gz: 7405eb29d09bb96a9c1f50007d6734f69a2abfea213bddbd9cadd15e7ac99651
4
- data.tar.gz: 1e55ce9b3466a9232a52a8a70ff7d4c8b31584f7bf06805d18c6965887935210
3
+ metadata.gz: 4d873940ddc504e1c78dc4ec1c1c7140a51ebc308294cd8083d3bde7bf7ee814
4
+ data.tar.gz: d284de951c7ebf98448cdc49fab0ca54fa5c9b9cc6f6e0c731359b73a0ba64fa
5
5
  SHA512:
6
- metadata.gz: a163d473bb03269ecd4a648c992219e2e26b2bd06948d8bf7b660b54d6eceb9d2c4b675c807676c1aa1122d40a4929d125bdc587b956660dcde0b8b1cc9f3f95
7
- data.tar.gz: 04405a47e956df8d2be5ea0520e411ddfc3da5f0c2bf498649d0d8268d1fe97cadf96384875975836e72454bc8c0157c5b1da52e631194d5c15fd69bacc89484
6
+ metadata.gz: 5147b5647239c39231529cc18cb397ac33fe1d6a07db58b33ddcda9924022e71cc24f3a4b7f91bf4795b668d031b8d65deb85dc5ee8869bca1237e18eb5af5a3
7
+ data.tar.gz: 4afba73fe9d49dc124554b63bb230c1135c18288d377fb0ad9af098b418dec31d1524410c09dba6fb284fb1ab8e0742a06b04c97fdd850d04500e500d9ef57ac
data/config/default.yml CHANGED
@@ -49,10 +49,12 @@ linters:
49
49
  - Layout/ArgumentAlignment
50
50
  - Layout/ArrayAlignment
51
51
  - Layout/BlockAlignment
52
+ - Layout/ClosingParenthesisIndentation
52
53
  - Layout/EmptyLineAfterGuardClause
53
54
  - Layout/EndAlignment
54
55
  - Layout/FirstArgumentIndentation
55
56
  - Layout/FirstArrayElementIndentation
57
+ - Layout/FirstHashElementIndentation
56
58
  - Layout/FirstParameterIndentation
57
59
  - Layout/HashAlignment
58
60
  - Layout/IndentationConsistency
@@ -12,6 +12,7 @@ module SlimLint
12
12
  comment = code[/\A\s*#(.*\z)/, 1]
13
13
 
14
14
  next if comment =~ /^\s*rubocop:\w+/
15
+ next if comment =~ /^\s*Template Dependency:/
15
16
 
16
17
  report_lint(sexp,
17
18
  "Slim code comments (`/#{comment}`) are preferred over " \
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module SlimLint
4
+ class Linter::Zwsp < Linter
5
+ include LinterRegistry
6
+
7
+ MSG = 'Remove Zwsp'
8
+
9
+ on_start do |_sexp|
10
+ dummy_node = Struct.new(:line)
11
+ document.source_lines.each_with_index do |line, index|
12
+ next unless line.include?("\u200b")
13
+
14
+ report_lint(dummy_node.new(index + 1), MSG)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -29,6 +29,7 @@ module SlimLint
29
29
  def run(document)
30
30
  @document = document
31
31
  @lints = []
32
+ @disabled_lines = nil
32
33
  trigger_pattern_callbacks(document.sexp)
33
34
  @lints
34
35
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module SlimLint
5
- VERSION = '0.22.0'
5
+ VERSION = '0.23.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-22 00:00:00.000000000 Z
11
+ date: 2023-01-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '3.0'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '5.0'
36
+ version: '6.0'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '3.0'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '5.0'
46
+ version: '6.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: pry
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -129,6 +129,7 @@ files:
129
129
  - lib/slim_lint/linter/tag_case.rb
130
130
  - lib/slim_lint/linter/trailing_blank_lines.rb
131
131
  - lib/slim_lint/linter/trailing_whitespace.rb
132
+ - lib/slim_lint/linter/zwsp.rb
132
133
  - lib/slim_lint/linter_registry.rb
133
134
  - lib/slim_lint/linter_selector.rb
134
135
  - lib/slim_lint/logger.rb
@@ -156,7 +157,7 @@ homepage: https://github.com/sds/slim-lint
156
157
  licenses:
157
158
  - MIT
158
159
  metadata: {}
159
- post_install_message:
160
+ post_install_message:
160
161
  rdoc_options: []
161
162
  require_paths:
162
163
  - lib
@@ -171,8 +172,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
172
  - !ruby/object:Gem::Version
172
173
  version: '0'
173
174
  requirements: []
174
- rubygems_version: 3.1.4
175
- signing_key:
175
+ rubygems_version: 3.1.6
176
+ signing_key:
176
177
  specification_version: 4
177
178
  summary: Slim template linting tool
178
179
  test_files: []