Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.29 KB

no-duplicate-attr-inheritance.md

File metadata and controls

56 lines (42 loc) · 1.29 KB
pageClass sidebarDepth title description
rule-details
0
vue/no-duplicate-attr-inheritance
enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"`

vue/no-duplicate-attr-inheritance

enforce inheritAttrs to be set to false when using v-bind="$attrs"

📖 Rule Details

This rule aims to prevent duplicated attribute inheritance.
This rule to warn to apply inheritAttrs: false when it detects v-bind="$attrs" being used.

<template>
  <MyInput v-bind="$attrs" />
</template>
<script>
export default {
  /* ✓ GOOD */
  inheritAttrs: false
}
<template>
  <MyInput v-bind="$attrs" />
</template>
<script>
export default {
  /* ✗ BAD */
  // inheritAttrs: true (default)
}

Options

Nothing.

Further Reading

🔍 Implementation