Skip to content

no-undef-properties False positive where defineModel is used #2363

Closed
@Ky6uk

Description

@Ky6uk

Tell us about your environment

  • ESLint version: 8.56.0
  • eslint-plugin-vue version: 9.20.0
  • Node version: 18.18.0

Please show your full configuration:

module.exports = {
  extends: ['plugin:vue/base'],

  rules: {
    'vue/no-undef-properties': 'error',
  },
};

What did you do?

<template>
  <div id="app">Woof: {{ woof }}</div>
</template>

<script setup>
const model = defineModel();

const woof = computed(() => model.value);
</script>

What did you expect to happen?

vue/no-undef-properties should not throw error.

What actually happened?

/home/projects/stackblitz-starters-u1b2em/test.vue
  8:35  error  'value' is not defined  vue/no-undef-properties

✖ 1 problem (1 error, 0 warnings)

Repository to reproduce this issue

https://stackblitz.com/edit/stackblitz-starters-u1b2em

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions