-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
import/order
: Impose custom ordering within groups
#1378
Comments
Why? What’s the reason you’d want ordering, but also an arbitrary order? |
I primarily want ordering, arbitrary order only as a fallback for imports from packages for which the order is not configured. Another option is to report such imports to force users to update their configuration. |
Came here to second this. Ordering alphabetical means very little to me, personally. I want to group my domain/purpose. Beginning with framework, for example. An Angular app, |
This is something I'm looking for so that we can also enforce new lines between custom groups. |
I think #1746 is related to this. |
I have a use case that might be related to this. import React from 'react';
import Button from 'components/Button';
import config from './config';
import styles from './ErrorBoundaryError.scss'; In this case I'd like to always have imports to a local stylesheet at the very bottom. Ideally I'd be able to match files based on a glob within a group and move them to the bottom. |
For example, new option could look like this:
With this option, this would pass 👍:
And this would fail 👎:
If a package without configured order is imported, it could be ignored:
The text was updated successfully, but these errors were encountered: