10000 chore: run `require-event-dispatcher-types` rule on Svelte 3/4 only (… · sveltejs/eslint-plugin-svelte@f16729f · GitHub
[go: up one dir, main page]

Skip to content

Commit f16729f

Browse files
authored
chore: run require-event-dispatcher-types rule on Svelte 3/4 only (#1035)
1 parent 722b36c commit f16729f

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

.changeset/nine-walls-hammer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-plugin-svelte': patch
3+
---
4+
5+
chore: run `require-event-dispatcher-types` rule on Svelte 3/4 only

packages/eslint-plugin-svelte/src/rules/require-event-dispatcher-types.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ export default createRule('require-event-dispatcher-types', {
1515
messages: {
1616
missingTypeParameter: `Type parameters missing for the \`createEventDispatcher\` function call.`
1717
},
18-
type: 'suggestion'
18+
type: 'suggestion',
19+
conditions: [
20+
{
21+
svelteVersions: ['3/4']
22+
}
23+
]
1924
},
2025
create(context) {
2126
let isTs = false;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"svelte": "^3.0.0 || ^4.0.0"
3+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"svelte": "^3.0.0 || ^4.0.0"
3+
}

0 commit comments

Comments
 (0)
0