refactor(web): extract allocation drag action plans
This commit is contained in:
@@ -217,6 +217,21 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineAllocationActions.ts",
|
||||
maxLines: 90,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport function buildAllocationBlockClickInfo\b/,
|
||||
message: "timeline allocation action helpers must keep popover click payload derivation centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function buildAllocationMutationPlan\b/,
|
||||
message: "timeline allocation action helpers must keep mutation plan derivation centralized",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineAllocationDragState.ts",
|
||||
maxLines: 80,
|
||||
@@ -270,6 +285,10 @@ export const rules = [
|
||||
pattern: /from "\.\/timelineAllocationFinalize\.js"/,
|
||||
message: "timeline drag must keep allocation drag completion rules delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationActions\.js"/,
|
||||
message: "timeline drag must keep allocation click and mutation plan derivation delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineAllocationMultiDrag\.js"/,
|
||||
message: "timeline drag must keep allocation multi-drag rules delegated to the extracted helper module",
|
||||
@@ -296,6 +315,10 @@ export const rules = [
|
||||
pattern: /\bfunction (?:hasAllocationDateChange|shouldTreatAllocationDragAsClick|requiresAllocationFragmentExtraction|buildAllocationMovedSnapshot|reconcileOptimisticEntries)\b/,
|
||||
message: "timeline drag must not re-inline extracted optimistic or allocation finalize helper implementations",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction (?:buildAllocationBlockClickInfo|buildAllocationMutationPlan)\b/,
|
||||
message: "timeline drag must not re-inline extracted allocation action helper implementations",
|
||||
},
|
||||
{
|
||||
pattern: /\bfunction (?:isAllocationMultiSelected|startAllocationMultiDrag|updateAllocationMultiDrag|finalizeAllocationMultiDrag)\b/,
|
||||
message: "timeline drag must not re-inline extracted allocation multi-drag helper implementations",
|
||||
|
||||
Reference in New Issue
Block a user