refactor(web): extract allocation release effects
This commit is contained in:
@@ -351,6 +351,25 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineAllocationReleaseEffects.ts",
|
||||
maxLines: 130,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport async function finalizeAllocationReleaseEffects\b/,
|
||||
message: "timeline allocation release effect helpers must keep release side effects centralized",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationRelease\.js"/,
|
||||
message: "timeline allocation release effect helpers must keep release classification delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineLivePreview\.js"/,
|
||||
message: "timeline allocation release effect helpers must keep preview lifecycle delegated to the extracted helper module",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineProjectDrag.ts",
|
||||
maxLines: 80,
|
||||
@@ -408,14 +427,6 @@ export const rules = [
|
||||
pattern: /from "\.\/timelineOptimisticAllocations\.js"/,
|
||||
message: "timeline drag must keep optimistic allocation reconciliation delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationFinalize\.js"/,
|
||||
message: "timeline drag must keep allocation drag completion rules delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationRelease\.js"/,
|
||||
message: "timeline drag must keep allocation release classification delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineDragCleanup\.js"/,
|
||||
message: "timeline drag must keep unmount teardown delegated to the extracted helper module",
|
||||
@@ -444,6 +455,10 @@ export const rules = [
|
||||
pattern: /from "\.\/timelineAllocationDragSession\.js"/,
|
||||
message: "timeline drag must keep allocation drag document session wiring delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationReleaseEffects\.js"/,
|
||||
message: "timeline drag must keep allocation release side effects delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineProjectDrag\.js"/,
|
||||
message: "timeline drag must keep project drag bootstrap and mutation gating delegated to the extracted helper module",
|
||||
@@ -502,6 +517,10 @@ export const rules = [
|
||||
pattern: /\bfunction handle(?:Move|Up)\b/,
|
||||
message: "timeline drag must not re-inline extracted allocation drag session handlers",
|
||||
},
|
||||
{
|
||||
pattern: /\bpendingSnapshotRef\.current = pendingSnapshot\b[\s\S]*updateAllocMutation\.mutate\(/,
|
||||
message: "timeline drag must not re-inline extracted allocation release effect mutation wiring",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction (?:createProjectDragState|buildProjectShiftMutationInput)\b/,
|
||||
message: "timeline drag must not re-inline extracted project drag helper implementations",
|
||||
|
||||
Reference in New Issue
Block a user