order rule: add pathGroups option to add support to order by paths#1386
Merged
Conversation
Co-Authored-By: Matt Seccafien <matt@studiocartogram.com>
ljharb
reviewed
Jun 20, 2019
ljharb
reviewed
Jun 22, 2019
Contributor
Author
|
Anything else needed for this to be merged? @ljharb |
cartogram
reviewed
Jul 13, 2019
|
+1, need this feature |
|
Any reason this has stalled? Would love to use this @ljharb |
@benmosher, @ljharb ⬆️ |
|
ping on if this is gonna get merged... |
|
@benmosher, @ljharb ⬆️ |
|
I'd really like to see this getting merged :D |
oliverdolgener
approved these changes
Nov 27, 2019
|
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 |
Member
|
Please file a new issue so we can track it properly :-) |
|
Thank you ❤️! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.