Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wolfgangwalther opened this issue Aug 11, 2020 · 0 comments · Fixed by #111
Closed

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

wolfgangwalther opened this issue Aug 11, 2020 · 0 comments · Fixed by #111
Labels
Type: Bug Bug or Bug fixes

Comments

@wolfgangwalther
Copy link
Contributor

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.

@wolfgangwalther wolfgangwalther changed the title no-unused-keys in SFC without <template> not working SFC: no-unused-keys without <template> not working Aug 11, 2020
@ota-meshi ota-meshi added the Type: Bug Bug or Bug fixes label Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes
Projects
None yet
2 participants