Skip to content

vue/no-unused-properties does not work with defineNuxtComponent() #2191

Closed
@uralogical

Description

@uralogical

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.41.0
  • eslint-plugin-vue version: 9.14.0
  • Node version: 18
  • Operating System: MacOS 13.3.1 (a)(22E772610a)

Please show your full configuration:

module.exports = {
  extends: [
    "plugin:vue/vue3-recommended",
  ],
  rules: {
    "vue/no-unused-properties": [
      "error",
      {
        groups: ["props", "data", "computed", "methods"],
        deepData: false,
        ignorePublicMembers: false,
      },
    ],
  },
};

What did you do?

<template>
  <div>
    <span>Hello</span>
  </div>
</template>

<script lang="ts">
export default defineNuxtComponent({
  name: 'App',
  data() {
    return {
      msg: 'Welcome to Nuxt3', // This data is not used.
    };
  },
});
</script>

What did you expect to happen?
Data msg should be warned like below.
This warning is shown without defineNuxtComponent.

スクリーンショット 2023-05-25 21 34 25

It seems to be rerated to #2057.

What actually happened?
No warning is shown.

Repository to reproduce this issue
https://github.com/uralogical/nuxt3_playground
feat/add_eslint is reproduction branch.

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