see https://stackoverflow.com/a/22545622/248058
Those names should produce an error:
This makes sense, but I think it should be focused on avoiding reserved names in component definitions, e.g. no-reserved-component-names and it would be in essentials.
Some examples of code it should catch:
Vue.component('font-face', {})
const name = 'font-face'
Vue.component(name, {})
// filename: font-face.vue
export default {
name: 'font-face'
}
// filename: font-face.vue
module.exports = {
name: 'font-face'
}
I think we should also warn about:
export default {
components: {
'font-face': ...,
}
}
This returns same warning in Vue app, as former examples. @chrisvfritz @shadskii
I've added warnings for locally registered components in #757. Thank you for the suggestion!
Most helpful comment
This makes sense, but I think it should be focused on avoiding reserved names in component definitions, e.g.
no-reserved-component-namesand it would be inessentials.