Skip to content

Linter: Improve erb-no-instance-variables-in-partials offense message - #2046

Merged
marcoroth merged 3 commits into
mainfrom
erb-no-instance-variables-in-partials-offense-message
Aug 7, 2026
Merged

marcoroth merged 3 commits into
mainfrom
erb-no-instance-variables-in-partials-offense-message

Conversation

@marcoroth

Copy link
Copy Markdown
Owner

This pull request updates the offense messages of erb-no-instance-variables-in-partials to name the concrete local variable that should be used instead of the instance variable.

- Avoid using instance variables in partials. Pass `@talks` as a local variable instead.
+ Avoid using instance variables in partials. Use the local variable `talks` instead of `@talks` and pass it in via `locals`.
- Avoid setting instance variables in partials. Use a local variable instead of `@talks`.
+ Avoid setting instance variables in partials. Assign the local variable `talks` instead of `@talks`.

@github-actions github-actions Bot added linter @herb-tools/linter for HTML+ERB templates typescript TypeScript source across the javascript/ packages linter-rule Individual linter rules and their documentation labels Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

🌿 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 4c24961


✅ Preview deployment has been cleaned up.

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown
npx https://pkg.pr.new/@herb-tools/formatter@2046
npx https://pkg.pr.new/@herb-tools/language-server@2046
npx https://pkg.pr.new/@herb-tools/linter@2046

commit: 4c24961

@marcoroth
marcoroth merged commit e067910 into main Aug 7, 2026
22 checks passed
@marcoroth
marcoroth deleted the erb-no-instance-variables-in-partials-offense-message branch August 7, 2026 00:29

This branch was successfully deployed

1 active deployment
herb-tools (Preview) — 4c24961e Deployed Aug 7, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linter @herb-tools/linter for HTML+ERB templates linter-rule Individual linter rules and their documentation typescript TypeScript source across the javascript/ packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant