refactor(web): extract allocation multi-drag helpers
This commit is contained in:
@@ -198,6 +198,25 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineAllocationMultiDrag.ts",
|
||||
maxLines: 90,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport function isAllocationMultiSelected\b/,
|
||||
message: "timeline allocation multi-drag helpers must keep multi-selection eligibility centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function updateAllocationMultiDrag\b/,
|
||||
message: "timeline allocation multi-drag helpers must keep same-day delta suppression centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function finalizeAllocationMultiDrag\b/,
|
||||
message: "timeline allocation multi-drag helpers must keep reset-on-release behavior centralized",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/useTimelineDrag.ts",
|
||||
required: [
|
||||
@@ -225,6 +244,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 "\.\/timelineAllocationMultiDrag\.js"/,
|
||||
message: "timeline drag must keep allocation multi-drag rules delegated to the extracted helper module",
|
||||
},
|
||||
],
|
||||
forbidden: [
|
||||
{
|
||||
@@ -239,6 +262,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 (?: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