Skip to content

Commit 583c0db

Browse files
committed
feat: autofix in define-props-declaration: runtime syntax to type-based syntax (vuejs#2465)
bring back the runtime check
1 parent 5a4a15e commit 583c0db

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Diff for: tests/lib/rules/define-props-declaration.js

+24
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,30 @@ tester.run('define-props-declaration', rule, {
485485
line: 3
486486
}
487487
]
488+
},
489+
// runtime
490+
{
491+
filename: 'test.vue',
492+
code: `
493+
<script setup lang="ts">
494+
const props = defineProps<{
495+
kind: string;
496+
}>()
497+
</script>
498+
`,
499+
output: null,
500+
options: ['runtime'],
501+
errors: [
502+
{
503+
message: 'Use runtime declaration instead of type-based declaration.',
504+
line: 3
505+
}
506+
],
507+
languageOptions: {
508+
parserOptions: {
509+
parser: require.resolve('@typescript-eslint/parser')
510+
}
511+
}
488512
}
489513
]
490514
})

0 commit comments

Comments
 (0)