Closed
Description
Tell us about your environment
- ESLint version: 8.40.0
- eslint-plugin-vue version: 9.13.0
- Node version: 18.16.0
- Operating System: MacOs 13.3.1
Please show your full configuration:
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-essential',
'@vue/airbnb',
'@vue/typescript/recommended',
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-undef': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'no-shadow': 'off',
semi: 'off',
'vue/no-undef-properties': 'warn',
},
};
What did you do?
<script setup lang="ts">
import {
ref,
watch,
} from 'vue';
import type { TestComponentProps } from './types';
const props = defineProps<TestComponentProps>();
const counter = ref(0);
watch(() => props.msg, () => {
counter.value += 1;
}, {
immediate: true,
});
</script>
<template>
<div>{{ msg }}</div>
<div>Changes: {{ counter }}</div>
</template>
What did you expect to happen?
No vue/no-undef-properties error thrown!
What actually happened?
ESLint: 'msg' is not defined.(vue/no-undef-properties)
Repository to reproduce this issue
https://github.com/tragid/vue-default-export-error