Skip to content

Linter: Don't flag render block locals in erb-no-unused-expressions#1587

Merged
marcoroth merged 1 commit intomainfrom
erb-no-unused-expressions-render-block-locals
Apr 3, 2026
Merged

Linter: Don't flag render block locals in erb-no-unused-expressions#1587
marcoroth merged 1 commit intomainfrom
erb-no-unused-expressions-render-block-locals

Conversation

@marcoroth
Copy link
Copy Markdown
Owner

@marcoroth marcoroth commented Apr 3, 2026

This pull request updates the erb-no-unused-expressions linter rule to not flag method calls on render block locals anymore.

The following is now valid:

<%= render BlogComponent.new do |component| %>
  <% component.with_header(classes: "title").with_content("My blog") %>
<% end %>

Resolves #1580

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 3, 2026

npx https://pkg.pr.new/@herb-tools/formatter@1587
npx https://pkg.pr.new/@herb-tools/language-server@1587
npx https://pkg.pr.new/@herb-tools/linter@1587

commit: 06fbc38

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

🌿 Interactive Playground and Documentation Preview

A preview deployment has been built for this pull request. Try out the changes live in the interactive playground:


🌱 Grown from commit 06fbc38


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth merged commit 550d82a into main Apr 3, 2026
20 checks passed
@marcoroth marcoroth deleted the erb-no-unused-expressions-render-block-locals branch April 3, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linter: erb-no-unused-expressions conflicts with ViewComponent slot usage

1 participant