Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork697
Open
Description
Checklist
- I have tried restarting my IDE and the issue persists.
- I have read theFAQ and my problem is not listed.
Tell us about your environment
- ESLint version: 9.39.1
- eslint-plugin-vue version: 10.5.1
- Vue version: 3.5.25
- Node version: 24.11.1
- Operating System: Windows 10 pro 22H2
Please show your full configuration:
import{globalIgnores}from'eslint/config'import{defineConfigWithVueTs,vueTsConfigs}from'@vue/eslint-config-typescript'importpluginVuefrom'eslint-plugin-vue'exportdefaultdefineConfigWithVueTs({name:'app/files-to-lint',files:['**/*.{ts,mts,tsx,vue}'],},globalIgnores(['**/dist/**','**/dist-ssr/**','**/coverage/**']),pluginVue.configs['flat/recommended'],vueTsConfigs.recommended,)
What did you do?
<script setup lang="ts">defineOptions({ name:'ExampleComponent' });interfaceProps { optionalProp?:string;}const defaultsObj= { optionalProp:'hello!',}withDefaults(defineProps<Props>(),defaultsObj);</script>
What did you expect to happen?
No "vue/require-default-prop" error for "optionalProp"
What actually happened?
**\src\ExampleComponent.vue
5:3 warning Prop 'optionalProp' requires default value to be set vue/require-default-prop
✖ 1 problem (0 errors, 1 warning)
Repository to reproduce this issue
https://github.com/tilonorrinco/bug-vue-require-default-prop
Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels