Skip to content

Commit 1db5146

Browse files
committed
fix(frontend): remove lint debt in flow shell
1 parent 583e9e5 commit 1db5146

3 files changed

Lines changed: 2 additions & 8 deletions

File tree

frontend/components/error-boundary.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ export class ErrorBoundary extends Component<Props, State> {
1919

2020
componentDidCatch(error: Error, info: ErrorInfo) {
2121
const tag = this.props.label ? `[ErrorBoundary:${this.props.label}]` : "[ErrorBoundary]"
22-
// eslint-disable-next-line no-console
2322
console.error(`${tag} ${error.name}: ${error.message}`)
24-
// eslint-disable-next-line no-console
2523
console.error(`${tag} stack:\n${error.stack ?? "(no stack)"}`)
2624
if (info.componentStack) {
27-
// eslint-disable-next-line no-console
2825
console.error(`${tag} componentStack:${info.componentStack}`)
2926
}
3027
}

frontend/components/flow/edges/editable-edge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client"
22

3-
import { memo, useCallback, useRef } from "react"
3+
import { memo, useCallback, useMemo, useRef } from "react"
44
import {
55
BaseEdge,
66
EdgeLabelRenderer,
@@ -49,7 +49,7 @@ function EditableEdgeComponent({
4949
const onEdgesChange = useFlowStore((s) => s.onEdgesChange)
5050
const draggingRef = useRef<number | null>(null)
5151

52-
const waypoints = data?.waypoints ?? []
52+
const waypoints = useMemo(() => data?.waypoints ?? [], [data?.waypoints])
5353
const points: XYPosition[] = [{ x: sourceX, y: sourceY }, ...waypoints, { x: targetX, y: targetY }]
5454
const path = buildPath(points)
5555
const labelPoint = points[Math.floor(points.length / 2)]

frontend/components/flow/error-logger.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export function ErrorLogger() {
1212
return
1313
}
1414
seen.first = true
15-
// eslint-disable-next-line no-console
1615
console.error(`[ErrorLogger:${label}] FIRST ERROR`, detail)
1716
}
1817

@@ -54,7 +53,6 @@ export function ErrorLogger() {
5453
po = new PerformanceObserver((list) => {
5554
for (const entry of list.getEntries()) {
5655
if (entry.duration > 500) {
57-
// eslint-disable-next-line no-console
5856
console.warn("[ErrorLogger:longtask]", {
5957
duration: Math.round(entry.duration),
6058
startTime: Math.round(entry.startTime),
@@ -66,7 +64,6 @@ export function ErrorLogger() {
6664
po.observe({ entryTypes: ["longtask"] })
6765
} catch {}
6866

69-
// eslint-disable-next-line no-console
7067
console.info("[ErrorLogger] armed")
7168

7269
return () => {

0 commit comments

Comments
 (0)