Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

vue/require-default-prop: false positive when pass withDefaults argument by reference #2993

Open
@tilonorrinco

Description

@tilonorrinco

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp