Skip to content

Linter: Warn about j() in erb-no-unsafe-script-interpolation#1407

Merged
marcoroth merged 1 commit intomainfrom
erb-safety-j
Mar 17, 2026
Merged

Linter: Warn about j() in erb-no-unsafe-script-interpolation#1407
marcoroth merged 1 commit intomainfrom
erb-safety-j

Conversation

@marcoroth
Copy link
Owner

This pull request addresses the comment raised by @frederikspang in #1330 (comment) by adding a specific message to the erb-no-unsafe-script-interpolation linter rule to warn about the j() and escape_javascript() usage inside <script> tags.

It also updates the linter rule to base the checks off of Prism nodes instead of the previous regex-based approach.

@github-actions github-actions bot added documentation Improvements or additions to documentation linter typescript linter-rule labels Mar 17, 2026
@github-actions
Copy link

github-actions bot commented Mar 17, 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 8ce425b


✅ Preview deployment has been cleaned up.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 17, 2026

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

commit: 8ce425b

@marcoroth marcoroth merged commit dc3ee28 into main Mar 17, 2026
32 of 34 checks passed
@marcoroth marcoroth deleted the erb-safety-j branch March 17, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation linter linter-rule typescript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant