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 +4 -4
- data/config/default.yml +2 -0
- data/lib/slim_lint/linter/comment_control_statement.rb +1 -0
- data/lib/slim_lint/linter/zwsp.rb +18 -0
- data/lib/slim_lint/linter.rb +1 -0
- data/lib/slim_lint/version.rb +1 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d873940ddc504e1c78dc4ec1c1c7140a51ebc308294cd8083d3bde7bf7ee814
|
4
|
+
data.tar.gz: d284de951c7ebf98448cdc49fab0ca54fa5c9b9cc6f6e0c731359b73a0ba64fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
@@ -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
|
data/lib/slim_lint/linter.rb
CHANGED
data/lib/slim_lint/version.rb
CHANGED
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.
|
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:
|
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: '
|
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: '
|
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.
|
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: []
|