-
Notifications
You must be signed in to change notification settings - Fork 199
Misnamed import when trying to import a default class #387
Comments
It seems to follow the filename of the import. When I renamed Though, I would have preferred it to follow the given classname, not the filename. |
@iamjoshhansen your example is actually ok, it's expected to name your files as your classes. What I forgot to mention is that this rule also applies to packages as well. Say, you're importing a lib named |
Yes, this is a problem. Rules shouldn't work differently depending on whether the OS is case sensitive or case insensitive for file names. We should ignore name casing. That section is a duplicate of #430. On the other hand, the idea of allowing |
I like what @5angel suggested about allowing you to start imports with a capital letter ( @JoshuaKGoldberg Maybe we should ask the TypeScript guys to suggest the import to start with an uppercase letter if the default export was a class? |
@JoshuaKGoldberg This is actually not a duplicate of #430 and not fixed by #451. If I have a default export |
It expects default imports to start with a lower case letter, but that in turn contradicts the common rule of writing classes with a first upper case letter.
The text was updated successfully, but these errors were encountered: