rubocop-erb 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d829909cc60a55799ce1976340a7e82e7cb40f82e379de1ef8fd1b8cc3395ee0
4
- data.tar.gz: 7712047a8cf2e03e4da145dd477f197a0697dbf300adc9728ab5d5fab26756cc
3
+ metadata.gz: 5a1fb8900d7235a3e4295b7fce3f5e40f2be3d3949dd31ef395790bd128d2700
4
+ data.tar.gz: 5d249cc4cada1a0c58120607326c0809058c94d1878b3972f1f97a01f818c408
5
5
  SHA512:
6
- metadata.gz: 5a653d659c624405db7226d3501bab436656eeca3ed31d84e6cad8838141d6c9dd384af376e6bfe30307da0b8365dee24ee70d376f47e2da1ae44a2e160dd7cb
7
- data.tar.gz: deb517d509c2e611f04a1555db766d076793a4e01f42c42697b95a5ed5a222ff6e6824711c6b613fc02a53149aafb487819378e39841ffeb1b0385662c097899
6
+ metadata.gz: b098dc93af51a2376b62ffbb50d98a462da989744ed4a13b0fa7ee687fab6a625bc732ca92295c9de701a2ec4c38c91783d4692960a3634d391f37f681159be7
7
+ data.tar.gz: 2f7cc16977d9b9b477972e1bdef3355673f0883a70038cc2343959dc83f48ec5b867c7c0509699cee3e123fe9b12975133b719ab1b4a73d59cb442b6db80e9e4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-erb (0.8.0)
4
+ rubocop-erb (0.8.2)
5
5
  herb (~> 0.9, >= 0.9.3)
6
6
  lint_roller (~> 1.1)
7
7
  rubocop (~> 1.84)
data/README.md CHANGED
@@ -28,9 +28,6 @@ plugins:
28
28
  - rubocop-erb
29
29
  ```
30
30
 
31
- > [!NOTE]
32
- > The plugin system is supported in RuboCop 1.72+. In earlier versions, use `require` instead of `plugins`.
33
-
34
31
  Now you can use RuboCop also for ERB templates.
35
32
 
36
33
  ```
@@ -74,4 +71,3 @@ See [#15](https://github.com/r7kamura/rubocop-erb/issues/15) for more details.
74
71
 
75
72
  - https://github.com/r7kamura/rubocop-haml
76
73
  - https://github.com/r7kamura/rubocop-slim
77
- - https://github.com/r7kamura/rubocop-markdown
data/config/default.yml CHANGED
@@ -36,6 +36,12 @@ Layout/ElseAlignment:
36
36
  Exclude:
37
37
  - '**/*.erb'
38
38
 
39
+ # Blank lines in the HTML between ERB tags are kept in the extracted Ruby,
40
+ # so this cop reports blank lines that belong to the HTML.
41
+ Layout/EmptyLines:
42
+ Exclude:
43
+ - '**/*.erb'
44
+
39
45
  Layout/EmptyLinesAroundBlockBody:
40
46
  Exclude:
41
47
  - '**/*.erb'
@@ -113,6 +119,13 @@ Layout/MultilineAssignmentLayout:
113
119
  Exclude:
114
120
  - '**/*.erb'
115
121
 
122
+ # The HTML between ERB tags is dropped, so a block whose body is written on
123
+ # the same line as its opening tag looks like a block body on the `do` line,
124
+ # and autocorrect inserts a line break into the ERB tag.
125
+ Layout/MultilineBlockLayout:
126
+ Exclude:
127
+ - '**/*.erb'
128
+
116
129
  Layout/MultilineHashBraceLayout:
117
130
  Exclude:
118
131
  - '**/*.erb'
@@ -175,6 +188,12 @@ Lint/Void:
175
188
  Exclude:
176
189
  - '**/*.erb'
177
190
 
191
+ # The HTML between ERB tags is dropped, so an `if` around an output tag
192
+ # looks like `if a.present?; a; end`.
193
+ Rails/Presence:
194
+ Exclude:
195
+ - '**/*.erb'
196
+
178
197
  Style/EmptyElse:
179
198
  Exclude:
180
199
  - '**/*.erb'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Erb
5
- VERSION = '0.8.0'
5
+ VERSION = '0.8.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-erb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura