-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple modules from the same import #1165
Comments
Over slack @jonathanolson said
I looked at the lint rule "single-line-import" and it has a line of documentation
So maybe we cannot remove this. |
We decided to add this lint rule in phetsims/phet-info#139.
So we should investigate why this isn't happening for TypeScript files/imports. |
The settings we changed in phetsims/phet-info#139 just need to be added back in, it looks like they were removed. Ill reapply them so that imports stay on a single line and we keep our single-line-import eslint rule. |
I reported this over slack.
This is the same style we applied in phetsims/phet-info#139 so I think this is safe to close. |
Over slack @jonathanolson said that maybe we don't need to enforce a single line import any more. Re-opening and adding to the dev meeting agenda for a quick check because there were other voices in phetsims/phet-info#139 that preferred a single line of imports. If we are OK with default formatting from WebStorm we can delete the "Hard wrap at: 999" workaround and delete our "single-line-import" lint rule. |
I'm not aware of constraints around import line styles currently. We should ask if anyone else knows something else. |
Single line imports have occasionally been helpful in regexes/searches or search/replace. Is that a good enough reason to keep them as single lines? |
Sounds good, I don't think this needs to take dev meeting time. It looks nice as is, closing. |
Currently, auto-importing modules from the same location results in WebStorm putting them on the same line. There is a setting for this in formatting options. Which do we prefer?
vs
If the import line gets too long, WebStorm will break it into multiple lines. But this breaks a lint rule "single-line-import":
If we chose to import multiple modules in one import, we should disable the "single-line-import" lint rule.
The text was updated successfully, but these errors were encountered: