Linter: Make erb-no-javascript-tag-helper Action View helper aware#1442
Merged
marcoroth merged 1 commit intomarcoroth:mainfrom Mar 21, 2026
Merged
Conversation
markokajzer
commented
Mar 21, 2026
| import type { ParseResult, ParserOptions, HTMLElementNode } from "@herb-tools/core" | ||
|
|
||
| const JAVASCRIPT_TAG_PATTERN = /\bjavascript_tag\b/ | ||
| const JAVASCRIPT_TAG_ELEMENT_SOURCE = "ActionView::Helpers::JavaScriptHelper#javascript_tag" |
Contributor
Author
There was a problem hiding this comment.
should maybe be a constant somewhere? 🤔
Owner
There was a problem hiding this comment.
I started this here in the language server package: https://github.com/marcoroth/herb/blob/a85a10d9856dfa2ccc815b2b72b287e1033ece31/javascript/packages/language-server/src/action_view_helpers.ts
But maybe we should move it somewhere else so you can check against the registery which Action View helpers are supported etc.
3601dde to
13df177
Compare
marcoroth
approved these changes
Mar 21, 2026
Owner
marcoroth
left a comment
There was a problem hiding this comment.
This is great, thanks @markokajzer! 🙏🏼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #553
the rule was already implemented via #1330, this just makes the rule Action View Helper aware to bring it in line with similar recent changes, such as #1438