After transitioning to Vue3 from a traditional <script>
setup to <script setup>
, I am encountering numerous warnings from ESLint. Specifically, any declarations that are not utilized within the <script setup>
section trigger the
@typescript-eslint/no-unused-vars
warning.
One particular instance is:
WARNING in src/layouts/Infinote.vue:105:8
@typescript-eslint/no-unused-vars: 'NoteComponent' is defined but never used.
103 | import { DateTime } from 'luxon'
104 | import { useQuasar } from 'quasar'
> 105 | import NoteComponent from 'components/Note.vue'
| ^^^^^^^^^^^^^
106 | import _ from 'lodash'
107 |
This occurs for components that are actually being utilized in the <template>
.
The suggested "solution" of globally disabling
@typescript-eslint/no-unused-vars
is not ideal. Is there a proper method to inform ESLint about the functionality of <script setup>
?