Skip to content

SFC: no-unused-keys without <template> not working #106

Closed
@wolfgangwalther

Description

@wolfgangwalther

Currently you need at least an empty <template> tag in a SFC to make the no-unused-keys rule work.

The following results in DONE No lint errors found!:

<i18n lang="yaml" locale="en">
test: Test
</i18n>

<script>
export default {
  render (createElement) {
    return createElement('div')
  }
}
</script>

While the following correctly throws error: unused 'test' key (@intlify/vue-i18n/no-unused-keys) at [...]:

<i18n lang="yaml" locale="en">
test: Test
</i18n>

<template>
  <div/>
</template>

I expect the first example to throw the same error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions