You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the rule no-undef-components is really helpful in spotting some mistakes (e.g. typos, eagerly renaming stuff), but as its description states, it can’t work with globally defined components out of the box; and so auto-imports are also hidden.
In Nuxt, there is .nuxt/components.d.ts which lists all components, and defines a constant componentNames, which I thought could be used as allow list. However, I could not import such a constant or find an appropriate function in Nuxt Kit to do something similar.
Is there a possibility to configure no-undef-components such that it works with auto-imported components too?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
the rule
no-undef-components
is really helpful in spotting some mistakes (e.g. typos, eagerly renaming stuff), but as its description states, it can’t work with globally defined components out of the box; and so auto-imports are also hidden.In Nuxt, there is
.nuxt/components.d.ts
which lists all components, and defines a constantcomponentNames
, which I thought could be used as allow list. However, I could not import such a constant or find an appropriate function in Nuxt Kit to do something similar.Is there a possibility to configure
no-undef-components
such that it works with auto-imported components too?Beta Was this translation helpful? Give feedback.
All reactions