Skip to content

Commit

Permalink
feat: autofix in define-props-declaration: runtime syntax to type-b…
Browse files Browse the repository at this point in the history
…ased syntax (vuejs#2465)

bring back the runtime check
  • Loading branch information
mpiniarski committed May 27, 2024
1 parent 5a4a15e commit 583c0db
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/lib/rules/define-props-declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,30 @@ tester.run('define-props-declaration', rule, {
line: 3
}
]
},
// runtime
{
filename: 'test.vue',
code: `
<script setup lang="ts">
const props = defineProps<{
kind: string;
}>()
</script>
`,
output: null,
options: ['runtime'],
errors: [
{
message: 'Use runtime declaration instead of type-based declaration.',
line: 3
}
],
languageOptions: {
parserOptions: {
parser: require.resolve('@typescript-eslint/parser')
}
}
}
]
})

0 comments on commit 583c0db

Please sign in to comment.