Skip to content

Linter: Implement actionview-strict-locals-first-line rule#1440

Merged
marcoroth merged 1 commit intomainfrom
erb-strict-locals-first-line
Mar 22, 2026
Merged

Linter: Implement actionview-strict-locals-first-line rule#1440
marcoroth merged 1 commit intomainfrom
erb-strict-locals-first-line

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Mar 21, 2026

This pull request implements a new actionview-strict-locals-first-line linter rule that ensures that the Rails strict locals are defined on the first line of the partial. Rails allows you to put the definition anywhere in the file, but its confusing if it's not on the first line:

<%# locals: (user:) %>

<p>Hello <%= user.name %></p>

vs. something like:

<p>Hello <%= user.name %></p>

<%# locals: (user:) %>

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 21, 2026

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

commit: fbe24be

@github-actions
Copy link

github-actions bot commented Mar 21, 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 fbe24be


✅ Preview deployment has been cleaned up.

@marcoroth marcoroth changed the title Linter: Implement erb-strict-locals-first-line rule Linter: Implement actionview-strict-locals-first-line rule Mar 22, 2026
@marcoroth marcoroth force-pushed the erb-strict-locals-first-line branch from 3a1b52d to fbe24be Compare March 22, 2026 22:26
@marcoroth marcoroth merged commit 9afabc7 into main Mar 22, 2026
20 checks passed
@marcoroth marcoroth deleted the erb-strict-locals-first-line branch March 22, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant