Skip to content

Commit

Permalink
fix: adjust unknown code warning offset (#11621)
Browse files Browse the repository at this point in the history
They were the wrong way around
fixes #11612
  • Loading branch information
dummdidumm committed May 14, 2024
1 parent 7ef686f commit 573b9f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/svelte/src/compiler/phases/2-analyze/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ const common_visitors = {
if (prev.type === 'Comment') {
ignores.push(
...extract_svelte_ignore(
prev.start + 2 /* '//'.length */,
prev.start + 4 /* '<!--'.length */,
prev.data,
state.analysis.runes
)
Expand All @@ -1133,7 +1133,7 @@ const common_visitors = {
for (const comment of comments) {
ignores.push(
...extract_svelte_ignore(
comment.start + 4 /* '<!--'.length */,
comment.start + 2 /* '//'.length */,
comment.value,
state.analysis.runes
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"message": "`a11y-missing-attribute` is no longer valid — please use `a11y_missing_attribute` instead",
"start": {
"line": 3,
"column": 17
"column": 19
},
"end": {
"line": 3,
"column": 39
"column": 41
}
},
{
Expand All @@ -28,11 +28,11 @@
"message": "`ally_missing_attribute` is not a recognised code (did you mean `a11y_missing_attribute`?)",
"start": {
"line": 8,
"column": 17
"column": 19
},
"end": {
"line": 8,
"column": 39
"column": 41
}
},
{
Expand All @@ -52,11 +52,11 @@
"message": "`a11y-misplaced-scope` is no longer valid — please use `a11y_misplaced_scope` instead",
"start": {
"line": 13,
"column": 17
"column": 19
},
"end": {
"line": 13,
"column": 37
"column": 39
}
},
{
Expand Down

0 comments on commit 573b9f1

Please sign in to comment.