Skip to content
This repository was archived by the owner on Nov 17, 2019. It is now read-only.

Support for dynamic components #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Support for dynamic components #2

wants to merge 4 commits into from

Conversation

sharkykh
Copy link
Owner

@sharkykh sharkykh commented Jul 14, 2019

Fixes #1
Only literal values are supported (no <component :is="computedProp" />).
Maybe add a note about this rule's false positives, because that's the reason it's on a separate plugin.
In this case - need to use a disable comment on the reported line, e.g.
<!-- eslint-disable-next-line @sharkykh/vue-extra/component-not-registered -->

<template>
  <!-- ✗ Component "debug" is used but not registered -->
  <debug />
</template>
<script>
const debugComponent = process.env.NODE_ENV === 'production' ? undefined : () => import('./Debug.vue');

export default {
  components: {
    ...debugComponent
  }
};
</script>

sharkykh added 4 commits July 14, 2019 09:48
Yes: `<div is="my-component">`
No: `<div :is="dynamic-component">` , `<div v-bind:is="dynamic-component">`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support dynamic components
1 participant