-
-
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
order
rule: add pathGroups option to add support to order by paths
#1386
Conversation
Co-Authored-By: Matt Seccafien <[email protected]>
Anything else needed for this to be merged? @ljharb |
+1, need this feature |
Any reason this has stalled? Would love to use this @ljharb |
@benmosher, @ljharb ⬆️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
ping on if this is gonna get merged... |
@benmosher, @ljharb ⬆️ |
I'd really like to see this getting merged :D |
I was wondering if I was misusing this new rule. With this this code, I want it to behave as so: // BEFORE FIX
import { testHelper } from "__tests__/helpers";
import { RecurringStatus } from "@my.company/common/es6/entity/types";
import { ChartistGraph } from "@app/components/common/ChartistGraph";
import { ILineChartOptions } from "chartist";
// AFTER FIX
// this is external, so before all this package's imports
import { ILineChartOptions } from "chartist";
// this is external, but monorepo package, so put it after normal external
import { RecurringStatus } from "@my.company/common/es6/entity/types";
// this is internal, so mixed with anything else internal
import { ChartistGraph } from "@app/components/common/ChartistGraph";
// this is internal but secondary, so after other internal code
import { testHelper } from "__tests__/helpers"; I configured my "pathGroups": [
{
"pattern": "@app/**",
"group": "internal"
},
{
"pattern": "__tests__/**",
"group": "internal",
"position": "after"
},
{
"pattern": "@my.company/**",
"group": "external",
"position": "after"
}
], But this doesn't mark my |
I edited the above for my second try |
Please file a new issue so we can track it properly :-) |
Thank you ❤️! |
Well there are multiple issues and pull requests open regarding the ordering of groups by paths.
Because I saw that the proposed approach in #795 was "accepted" I implemented it this way.
But if @ljharb has changed his mind in the mean time and would prefer something like custom groups as proposed in #1015 (comment) I can also rework this.