-
-
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] Potential regression in sibling
and parent
behavior
#2671
Comments
I can confirm that this test case passes on v2.26.0 and fails on v2.27.4. It appears to have been broken by #2506. cc @Pearce-Ropion |
I can have a look. My assumption is that my "patch" is causing ordering overlaps. |
Thanks! That sounds likely. |
I have the same problem: if I update to v2.27.4, I get import { ref, watch } from "vue"
import DashboardMetric from "app/test/cypress/wrappers/DashboardMetricStub.vue"
import LineDashboardWrapper from "app/test/cypress/wrappers/LineDashboardWrapper.vue"
import QPage from "app/test/cypress/wrappers/QPageStub.vue"
import TimelineDisplay from "app/test/cypress/wrappers/TimelineDisplayStub.vue"
import fluxQueryComposable from "composables/flux-query"
import machineDataComposable from "composables/machine-data"
import { makeServer } from "src/dev-api-server"
import { LinkStatus, shiftDurationMillis, staticConfigApi } from "src/global"
import { lineDashboardConfigSchema } from "src/schemas"
import { useCampaignDataStore } from "stores/campaign-data"
import { useCommonLineInterfaceConfigStore } from "stores/common-line-interface-config"
import { useMachineDataLinkStatusStore } from "stores/machine-data-link"
import type { MachineData } from "../LineDashboard.vue"
import type { Server } from "miragejs"
import type { Ref } from "vue" to below: import { ref, watch } from "vue"
import DashboardMetric from "app/test/cypress/wrappers/DashboardMetricStub.vue"
import LineDashboardWrapper from "app/test/cypress/wrappers/LineDashboardWrapper.vue"
import QPage from "app/test/cypress/wrappers/QPageStub.vue"
import TimelineDisplay from "app/test/cypress/wrappers/TimelineDisplayStub.vue"
import fluxQueryComposable from "composables/flux-query"
import machineDataComposable from "composables/machine-data"
import { makeServer } from "src/dev-api-server"
import type { MachineData } from "../LineDashboard.vue"
import { LinkStatus, shiftDurationMillis, staticConfigApi } from "src/global"
import type { Server } from "miragejs"
import { lineDashboardConfigSchema } from "src/schemas"
import type { Ref } from "vue"
import { useCampaignDataStore } from "stores/campaign-data"
import { useCommonLineInterfaceConfigStore } from "stores/common-line-interface-config"
import { useMachineDataLinkStatusStore } from "stores/machine-data-link" I tracked down the commit which introduced this behaviour with Below is my configuration for import plugin: const tsConfig = require("./tsconfig.json")
const internalPathPatterns = Object.keys(tsConfig.compilerOptions.paths)
.filter((pat) => pat.endsWith("/*"))
.map((pat) => pat.slice(0, -2))
.join(",")
const internalPathGlob = `{${internalPathPatterns}}/**`
// ...snip
"import/order": [
"error",
{
"newlines-between": "always",
alphabetize: { order: "asc" },
groups: [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index",
"object",
"type",
],
pathGroups: [
{
pattern: internalPathGlob,
group: "internal",
},
],
pathGroupsExcludedImportTypes: ["builtin", "type"],
},
],
// ...snip |
I just put up #2674 that should address this |
We have a bit of a complex
import/order
config and are seeing some new weird behavior with ordering on thesibling
andparent
groups on[email protected]
:Here's what our code looks like on
[email protected]
:And it wants it to be now:
However if I swap the the order of
parent
andsibling
in the config to this then the behavior we were seeing on v2.26.0 remains:The text was updated successfully, but these errors were encountered: