Skip to content

Commit e3328a9

Browse files
authoredJan 8, 2024
fix: honor eslint-disable-next-line in svelte files (#379)
1 parent 6ee2e39 commit e3328a9

File tree

6 files changed

+111
-13
lines changed

6 files changed

+111
-13
lines changed
 

Diff for: ‎fixtures/input/svelte.svelte

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script lang='ts'>
2+
export const content = "hi!"
3+
</script>
4+
5+
<article>
6+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
7+
<div>{@html content}</div>
8+
</article>

Diff for: ‎fixtures/output/all/svelte.svelte

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script lang='ts'>
2+
export const content = 'hi!'
3+
</script>
4+
5+
<article>
6+
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
7+
<div>{@html content}</div>
8+
</article>

Diff for: ‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
"lint-staged": "^15.2.0",
135135
"rimraf": "^5.0.5",
136136
"simple-git-hooks": "^2.9.0",
137+
"svelte": "^4.2.8",
137138
"svelte-eslint-parser": "^0.33.1",
138139
"tsup": "^8.0.1",
139140
"typescript": "^5.3.3",

Diff for: ‎pnpm-lock.yaml

+92-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎src/configs/svelte.ts

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export async function svelte(
4747
},
4848
},
4949
name: 'antfu:svelte:rules',
50+
processor: pluginSvelte.processors['.svelte'],
5051
rules: {
5152
'import/no-mutable-exports': 'off',
5253
'no-undef': 'off', // incompatible with most recent (attribute-form) generic types RFC

Diff for: ‎test/fixtures.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ runWithConfig('js', {
1919
runWithConfig('all', {
2020
typescript: true,
2121
vue: true,
22+
svelte: true,
2223
})
2324
runWithConfig('no-style', {
2425
typescript: true,

0 commit comments

Comments
 (0)
Please sign in to comment.