Skip to content

Linter: Allow render target names as shorthand locals - #2219

Draft
Parthu-M wants to merge 1 commit into
marcoroth:mainfrom
Parthu-M:agent/render-option-shadowing
Draft

Linter: Allow render target names as shorthand locals#2219
Parthu-M wants to merge 1 commit into
marcoroth:mainfrom
Parthu-M:agent/render-option-shadowing

Conversation

@Parthu-M

Copy link
Copy Markdown

Summary

  • stop treating template as a shadowed partial option in shorthand render calls
  • keep reporting options such as layout and collection, whose meaning silently changes between render forms
  • add regression coverage for all seven mutually exclusive render targets (template, file, inline, body, plain, html, and renderable)

Why

Render-target options are mutually exclusive with partial:. Using one while switching to the keyword partial form creates a contradictory call instead of silently changing a local into a valid render option, so reporting only template was inconsistent and noisy.

Fixes #2137

Validation

  • focused rule harness: target names produced 0 offenses; layout still produced 1 offense
  • oxlint on the changed rule and regression test
  • git diff --check

The full linter suite is left to CI because this Windows checkout cannot generate the Ruby/Bundler-backed core artifacts required by the current workspace packages.

AI assistance

Codex helped identify the issue, implement the focused patch, and run validation. I reviewed the final diff before submission.

@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 13, 2026
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.

Linter: actionview-no-render-option-shadowing doesn't flag file/inline/body/plain/html/renderable

1 participant