vue/require-macro-variable-name
require a certain macro variable name
- 💡 Some problems reported by this rule are manually fixable by editor suggestions.
📖 Rule Details
This rule reports macro variables not corresponding to the specified name.
🔧 Options
json
{ "vue/require-macro-variable-name": ["error", { "defineProps": "props", "defineEmits": "emit", "defineSlots": "slots", "useSlots": "slots", "useAttrs": "attrs" }] }
defineProps
- The name of the macro variable fordefineProps
. default:props
defineEmits
- The name of the macro variable fordefineEmits
. default:emit
defineSlots
- The name of the macro variable fordefineSlots
. default:slots
useSlots
- The name of the macro variable foruseSlots
. default:slots
useAttrs
- The name of the macro variable foruseAttrs
. default:attrs
With custom macro variable names
🚀 Version
This rule was introduced in eslint-plugin-vue v9.15.0