refactor(web): extract project drag finalize
This commit is contained in:
@@ -412,6 +412,25 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineProjectDragFinalize.ts",
|
||||
maxLines: 60,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport function finalizeProjectDrag\b/,
|
||||
message: "timeline project drag finalize helpers must keep completion flow centralized",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineProjectDrag\.js"/,
|
||||
message: "timeline project drag finalize helpers must keep mutation gating delegated to the project drag helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineLivePreview\.js"/,
|
||||
message: "timeline project drag finalize helpers must keep preview preservation delegated to the live preview helper module",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineProjectDragSession.ts",
|
||||
maxLines: 70,
|
||||
@@ -484,7 +503,11 @@ export const rules = [
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineProjectDrag\.js"/,
|
||||
message: "timeline drag must keep project drag bootstrap and mutation gating delegated to the extracted helper module",
|
||||
message: "timeline drag must keep project drag bootstrap delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineProjectDragFinalize\.js"/,
|
||||
message: "timeline drag must keep project drag completion delegated to the extracted helper module",
|
||||
},
|
||||
{
|
||||
pattern: /from "\.\/timelineProjectDragSession\.js"/,
|
||||
@@ -544,6 +567,10 @@ export const rules = [
|
||||
pattern: /\bfunction (?:createProjectDragState|buildProjectShiftMutationInput)\b/,
|
||||
message: "timeline drag must not re-inline extracted project drag helper implementations",
|
||||
},
|
||||
{
|
||||
pattern: /\bconst mutationInput = buildProjectShiftMutationInput\(finalDrag\)\b[\s\S]*applyShiftMutation\.(?:mutate|mutateAsync)\(/,
|
||||
message: "timeline drag must not re-inline extracted project drag finalize flow",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user