super-slim 3.6.0 → 3.6.1
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 +4 -4
- data/CHANGELOG.md +11 -1
- data/lib/super_slim/linter/rules.rb +4 -1
- data/lib/super_slim/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d1568a882b755a5b9ca670180181b338cae76cac844ba48f4dc8261fe7e34b9a
|
|
4
|
+
data.tar.gz: 82880eb76f27282dfe0a0ce6bdf0537f499542fd7a34b930cc7edf5053a83a85
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8f4f4de4d758739431959ad1957e258cf4771bb25f366a88b5588aed634d04c34982538d340e1a7e26530e2b0ed1279d1710eae37440a5bdc661806caf652f7
|
|
7
|
+
data.tar.gz: 1bf1391bd1ba59fc6879ab4159b236f2a393caee9983db47d3b07b9ff949b38d356cd85ebfa86bbae71f2a791088b15b4f7c803f29ca3e57517ae510e8d86b18
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [3.6.1] — 2026-11-11
|
|
6
|
+
|
|
7
|
+
One fix: `InstanceVariables` no longer reports an `@` that no name follows.
|
|
8
|
+
|
|
9
|
+
**Fixed**
|
|
10
|
+
- `InstanceVariables` no longer reports ``Pass `@` to the partial as a local`` on an `@` that no name follows, as in
|
|
11
|
+
the `_form.html.slim` scaffold template simple_form installs, `= simple_form_for(@<%= singular_table_name %>)`. 3.6.0
|
|
12
|
+
did, 3.5.0 did not.
|
|
13
|
+
|
|
5
14
|
## [3.6.0] — 2026-11-11
|
|
6
15
|
|
|
7
16
|
The linter reads all the Ruby of a template and `.super-slim.yml` is checked when it is read: `super-slim lint` may
|
|
@@ -299,7 +308,8 @@ renders what Slim 5 renders with `format: :html, sort_attrs: false`, byte for by
|
|
|
299
308
|
- Ruby 3.3 or later, every Ruby still maintained, Rails 8.0 or 8.1 for the railtie, and strscan 3.1.1 or later,
|
|
300
309
|
newer than the one Ruby 3.3 ships.
|
|
301
310
|
|
|
302
|
-
[Unreleased]: https://github.com/levups/super-slim/compare/v3.6.
|
|
311
|
+
[Unreleased]: https://github.com/levups/super-slim/compare/v3.6.1...HEAD
|
|
312
|
+
[3.6.1]: https://github.com/levups/super-slim/compare/v3.6.0...v3.6.1
|
|
303
313
|
[3.6.0]: https://github.com/levups/super-slim/compare/v3.5.0...v3.6.0
|
|
304
314
|
[3.5.0]: https://github.com/levups/super-slim/compare/v3.4.1...v3.5.0
|
|
305
315
|
[3.4.1]: https://github.com/levups/super-slim/compare/v3.4.0...v3.4.1
|
|
@@ -319,7 +319,10 @@ module SuperSlim
|
|
|
319
319
|
return variable_by_line unless code.include?("@")
|
|
320
320
|
|
|
321
321
|
Prism.lex(code).value.each do |token,|
|
|
322
|
-
|
|
322
|
+
# An `@` that no name follows is lexed as one too: `@<%= name %>` in a generator's template.
|
|
323
|
+
next unless token.type == :INSTANCE_VARIABLE && token.value != "@"
|
|
324
|
+
|
|
325
|
+
variable_by_line[token.location.start_line] ||= token.value
|
|
323
326
|
end
|
|
324
327
|
variable_by_line
|
|
325
328
|
end
|
data/lib/super_slim/version.rb
CHANGED