test(repo): guard timeline live preview boundaries
This commit is contained in:
@@ -100,6 +100,40 @@ export const rules = [
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/timelineLivePreview.ts",
|
||||
maxLines: 140,
|
||||
required: [
|
||||
{
|
||||
pattern: /\bexport function scheduleLivePreview\b/,
|
||||
message: "timeline live preview helpers must keep frame scheduling centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function clearLivePreview\b/,
|
||||
message: "timeline live preview helpers must keep preview reset logic centralized",
|
||||
},
|
||||
{
|
||||
pattern: /\bexport function preserveLivePreview\b/,
|
||||
message: "timeline live preview helpers must keep snapshot preservation centralized",
|
||||
},
|
||||
],
|
||||
forbidden: [],
|
||||
},
|
||||
{
|
||||
file: "apps/web/src/hooks/useTimelineDrag.ts",
|
||||
required: [
|
||||
{
|
||||
pattern: /from "\.\/timelineLivePreview\.js"/,
|
||||
message: "timeline drag must keep live preview behavior delegated to the extracted helper module",
|
||||
},
|
||||
],
|
||||
forbidden: [
|
||||
{
|
||||
pattern: /\bfunction (?:toPxValue|joinTransforms|captureLivePreviewTargets|renderLivePreview|scheduleLivePreview|clearLivePreview|datesMatch|preserveLivePreview)\b/,
|
||||
message: "timeline drag must not re-inline live preview helper implementations",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
file: "docker-compose.prod.yml",
|
||||
required: [
|
||||
|
||||
Reference in New Issue
Block a user