vuejs / eslint-config-airbnb

ESLint Shareable Configs for Airbnb JavaScript Style Guide in Vue.js Projects
MIT License
72 stars 20 forks source link

Never error `.vue` extensions #43

Closed nathanieltalbot closed 2 years ago

nathanieltalbot commented 2 years ago

Is there a reason that .vue isn't set to never error in the import/extensions configuration? This means that we need to import all Vue components as *.vue but all others (js, etc) without an extension

haoqunjiang commented 2 years ago

https://github.com/vitejs/vite/issues/2163#issuecomment-783456542

All future Vue APIs / ecosystem tooling will all assume explicit extensions for .vue imports.

haoqunjiang commented 2 years ago

Explicit .vue extension is easier to deal with in ecosystem toolings, such as TypeScript type hints and file resolution in bundlers.