Skip to content

Commit 3dae5ab

Browse files
authored
fix: false report in settings.ignoreWarnings (#261)
* chore: fix ci * fix: ci * fix: ci * fix: ci * fix: false report in `settings.ignoreWarnings` * Create chilly-olives-check.md
1 parent 7399ef7 commit 3dae5ab

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.changeset/chilly-olives-check.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-svelte": patch
3+
---
4+
5+
fix: false report in `settings.ignoreWarnings`

src/rules/system.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default createRule("system", {
6363
loc: node.startTag.loc.end,
6464
})
6565
if (node.endTag) {
66-
directives.enableBlock(node.endTag.loc.start, isIgnoreRule, {
66+
directives.disableBlock(node.endTag.loc.start, isIgnoreRule, {
6767
loc: node.endTag.loc.start,
6868
})
6969
}

tests/src/settings/ignore-warnings.ts

+14
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ describe("ignore-warnings", () => {
1010
<script>
1111
a+b;
1212
</script>
13+
{@html a+b}
14+
{@debug a}
1315
`
1416

1517
const linter = new eslint.ESLint({
@@ -63,6 +65,10 @@ describe("ignore-warnings", () => {
6365
ruleId: "no-undef",
6466
line: 5,
6567
},
68+
{
69+
ruleId: "svelte/no-at-html-tags",
70+
line: 7,
71+
},
6672
],
6773
)
6874
})
@@ -73,6 +79,8 @@ describe("ignore-warnings", () => {
7379
<script>
7480
a+b;
7581
</script>
82+
{@html a+b}
83+
{@debug a}
7684
`
7785

7886
const linter = new eslint.ESLint({
@@ -122,6 +130,10 @@ describe("ignore-warnings", () => {
122130
ruleId: "no-undef",
123131
line: 5,
124132
},
133+
{
134+
ruleId: "svelte/no-at-html-tags",
135+
line: 7,
136+
},
125137
],
126138
)
127139
})
@@ -133,6 +145,8 @@ describe("ignore-warnings", () => {
133145
<script>
134146
a+b;
135147
</script>
148+
{@html a+b}
149+
{@debug a}
136150
`
137151

138152
const linter = new eslint.ESLint({

0 commit comments

Comments
 (0)