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/no-unused-properties" work incorrect with useVModels from "@vueuse/core" #2062

Open
@galsim

Description

Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have read the FAQ and my problem is not listed.

Tell us about your environment

  • ESLint version: ^8.22.0
  • eslint-plugin-vue version: ^9.3.0
  • Node version: v16.17.1
  • Operating System: macOS 13.0.1

Please show your full configuration:

/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
 root: true,
 'extends': [
 'plugin:vue/vue3-essential',
 'eslint:recommended',
 '@vue/eslint-config-typescript'
 ],
 parserOptions: {
 ecmaVersion: 'latest'
 },
 rules: {
 "vue/no-unused-properties": ["error", {
 "groups": ["setup", "props"],
 }]
 }
}

What did you do?

<script lang="ts">
import { defineComponent } from 'vue'
import { useVModels } from '@vueuse/core'

export default defineComponent({
 props: {
 msg: {
 type: String,
 required: true
 }
 },
 setup(props,{ emit }) {
 const {
 msg: msgModel
 } = useVModels(props, emit)

 return {
 msgModel
 }
 }
})
</script>

What did you expect to happen?
I expected no eslint errors, because I use msg props through useVModels

What actually happened?
image

Repository to reproduce this issue
https://github.com/galsim/no-unused-properties-use-v-models

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /