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

Add deepData option to vue/no-unused-properties rule #1387

Merged
merged 4 commits into from Dec 27, 2020

Conversation

ota-meshi
Copy link
Member

This PR adds deepData option to vue/no-unused-properties rule.

If true, the object of the property defined in data will be searched deeply. Include "data" in groups to use this option.

e.g.

<template>
  <Foo :param="state.used">
</template>
<script>
  export default {
    data() {
      return {
        state: {
          /* ✓ GOOD */
          used: null,
          /* ✗ BAD (`state.unused` data not used) */
          unused: null
        }
      }
    }
  }
</script>

@ota-meshi ota-meshi merged commit e1cabbb into master Dec 27, 2020
@ota-meshi ota-meshi deleted the no-unused-properties-deep-data branch December 27, 2020 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant