This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
Eslint rule: enforce no import extensions #455
Locked
samturrell
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
I'm inclined to want the extension visible, just makes it easier to decipher what is being imported without knowing about loaders. |
Beta Was this translation helpful? Give feedback.
3 replies
-
I agree with @samturrell - I don't see a need to have the extension visible for imports |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
This has come up on another project, where there was an inconsistency on imports, and whether or not they should have a file extensions. E.g.:
vs
The extension is only ever required if a loader is not set up for a specific file type, it cannot be resolved, or if there's ambiguity around (e.g. a directory with both
MyComponent.vue
andMyComponent.js
or a file that also resolves a folder such asimport 'store';
might be ambiguous with./store.js
and./store/index.js
.What are your thoughts here? There's a linter rule we can use to automate this and remove it from any future discussions on a PR level
Beta Was this translation helpful? Give feedback.
All reactions