Skip to content

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

@grantbdev

Description

@grantbdev

ViewComponent has a pattern where a slot can be set including the content for the slot within a <% ... %> tag:

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

@herb-tools/linter 0.9.4 currently flags these as unused expressions, but they are used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinglinter

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions