The Wayback Machine - https://web.archive.org/web/20201016235212/https://github.com/vuejs/eslint-plugin-vue/issues/1285
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue/no-unused-properties does not process expressions like 'key' in $props in the template #1285

Open
danyadev opened this issue Aug 25, 2020 · 0 comments
Labels

Comments

@danyadev
Copy link
Contributor

@danyadev danyadev commented Aug 25, 2020

Checklist

  • I checked the FAQ.

Tell us about your environment

  • ESLint version: 7.7.0
  • eslint-plugin-vue version: 7.0.0-beta.2
  • Node version: 14.7.0
  • Operating System: Windows 10 Pro

Please show your full configuration:

{
  root: true,

  parserOptions: {
    sourceType: 'module',
    ecmaVersion: 2019
  },

  env: {
    browser: true,
    node: true,
    es2020: true
  },

  plugins: ['import'],

  settings: {
    'import/resolver': 'webpack',
    'import/ignore': []
  },

  extends: [
    'plugin:vue/vue3-recommended'
  ],

  rules: {
    'vue/no-unused-properties': ['error', {
      groups: ['props', 'setup']
    }]
  }
}

What did you do?

<template>
  <div class="modal_header">
    <div class="modal_header_title"><slot /></div>
    <div class="modal_header_buttons">
      <slot name="icons" />
      <CloseModal :closable="!('unclosable' in $props)" />
    </div>
  </div>
</template>

<script>
import CloseModal from './CloseModal.vue';

export default {
  props: ['unclosable'],

  components: {
    CloseModal
  }
};
</script>

What did you expect to happen?
no errors

What actually happened?

C:\Users\danyadev\Desktop\vk-desktop\src\components\modals\ModalHeader.vue
  15:11  error  'unclosable' of property found, but never used  vue/no-unused-properties

Repository to reproduce this issue
https://github.com/danyadev/vk-desktop/tree/dd32c02605830437374764751ee9e59b980360f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.