Skip to content

Commit

Permalink
fix: style report location (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Mar 1, 2024
1 parent 70bd41b commit 73d6fd8
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-plants-pump.md
@@ -0,0 +1,5 @@
---
"eslint-plugin-svelte": patch
---

fix: style report location
5 changes: 1 addition & 4 deletions src/utils/css-utils/style-attribute.ts
Expand Up @@ -353,10 +353,7 @@ function convertChild<E extends SvelteStyleInterpolation>(

/** convert range */
function convertRange(node: AnyNode, ctx: Ctx): AST.Range {
return [
ctx.startOffset + node.source!.start!.offset,
ctx.startOffset + node.source!.end!.offset + 1
];
return [ctx.startOffset + node.source!.start!.offset, ctx.startOffset + node.source!.end!.offset];
}

/** convert range */
Expand Down
@@ -0,0 +1,8 @@
- message: Can use style directives instead.
line: 1
column: 13
suggestions: null
- message: Can use style directives instead.
line: 1
column: 28
suggestions: null
@@ -0,0 +1,3 @@
<div style='display:block; position:relative;'>
foo
</div>
@@ -0,0 +1,3 @@
<div style:display="block" style='position:relative;'>
foo
</div>

0 comments on commit 73d6fd8

Please sign in to comment.