-
Notifications
You must be signed in to change notification settings - Fork 100
Consider using an eslint import plugin instead of import/order #647
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
Comments
Hi @danvk In this case, we are basing our rule converters (hence the ESLint outputs) to the ones defined at typescript-eslint ROADMAP. |
Heh, thanks for the link to For now, as KingDarBoja said, I think we are a little bound here to go with the typescript-eslint roadmap for the canonical rule replacements... however, IMO it really wouldn't be the end of the world if either:
I don't suppose you have any thoughts @bradzacher? |
🤷 I have no opinions about the "roadmap" file - the file was pieced together by people who aren't me over the years! I've never used TSLint myself so I just defer to the community's guidance here. |
If that's the case, we could switch to the much closer plugin as it is easier for users to configure it like TSLint equivalent. I don't think community will be annoyed by this small change as this is only 1 rule being changed. |
Hmm, I've been playing around with this and it seems eslint-plugin-import could be a better fit instead of eslint-plugin-simple-import-sort. The former has many options that line up with TSLint, including alphabetically, case-insensitivity, and grouping. As others have mentioned, if we are deferring rules to an external package, we might as well make them as close as possible to TSLint. I would like to create a PR with either option ^w^, but I just wanted to make sure we make the right choice before I work on it |
Hmm, that makes sense - you're right @hyperupcall. I'd love a PR for eslint-plugin-import then! |
🚀 Feature Request
The script swaps in
import/order
for tslint'sordered-imports
. I spent quite a while trying to configure it to sort things like tslint's rule did, before discovering eslint-plugin-simple-import-sort, which seems much closer to the old rule (and also much easier to configure!).Existing Behavior
ordered-imports
becomesimport/order
.Change Proposal
ordered-imports
becomeseslint-plugin-simple-import-sort
I haven't taken the time to check how well this would work for
tslint.json
settings beyond the ones I use, but for me simple-import-sort was fantastic!The text was updated successfully, but these errors were encountered: