From 28f25c6e489b2d6960a755cb01e24abaa7a6ed38 Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Fri, 5 Jun 2026 22:23:23 +0200 Subject: [PATCH 1/2] Linter: Narrow `html-no-self-closing` location --- javascript/packages/linter/src/rules/html-no-self-closing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/packages/linter/src/rules/html-no-self-closing.ts b/javascript/packages/linter/src/rules/html-no-self-closing.ts index 7a1dd45be..2dcccf9d4 100644 --- a/javascript/packages/linter/src/rules/html-no-self-closing.ts +++ b/javascript/packages/linter/src/rules/html-no-self-closing.ts @@ -27,7 +27,7 @@ class NoSelfClosingVisitor extends BaseRuleVisitor this.addOffense( `Use \`${instead}\` instead of self-closing \`<${tagName} />\` for HTML compatibility.`, - node.location, + node.tag_closing.location, { node, tagName, From eace39f2204c8fc8625a37249320dc4c8d0245d2 Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Fri, 5 Jun 2026 22:25:48 +0200 Subject: [PATCH 2/2] Update snapshot --- .../packages/linter/test/__snapshots__/cli.test.ts.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/javascript/packages/linter/test/__snapshots__/cli.test.ts.snap b/javascript/packages/linter/test/__snapshots__/cli.test.ts.snap index 1fc729ba8..69498b370 100644 --- a/javascript/packages/linter/test/__snapshots__/cli.test.ts.snap +++ b/javascript/packages/linter/test/__snapshots__/cli.test.ts.snap @@ -562,12 +562,12 @@ test/fixtures/multiple-rule-offenses.html.erb:10:4 [error] Use \`\` instead of self-closing \`\` for HTML compatibility. (html-no-self-closing) [Correctable] -test/fixtures/multiple-rule-offenses.html.erb:4:2 +test/fixtures/multiple-rule-offenses.html.erb:4:7 2 │ 3 │
→ 4 │ - │ ~~~~~~~ + │ ~~ 5 │ Link 1 6 │