Skip to content

Commit d2e21ea

Browse files
committed
Remove disable directives for temporarily disabled rules
1 parent 3573dcd commit d2e21ea

File tree

13 files changed

+2
-25
lines changed

13 files changed

+2
-25
lines changed

packages/next/src/next-devtools/dev-overlay/components/code-frame/code-frame.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ type CodeFrameProps = {
1616
}
1717

1818
export function CodeFrame({ stackFrame, codeFrame }: CodeFrameProps) {
19-
// eslint-disable-next-line react-hooks/preserve-manual-memoization -- compiler bug
2019
const parsedLineStates = useMemo(() => {
2120
const decodedLines = groupCodeFrameLines(formatCodeFrame(codeFrame))
2221

packages/next/src/next-devtools/dev-overlay/components/devtools-indicator/hooks/use-minimum-loading-time-multiple.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export function useMinimumLoadingTimeMultiple(
3131
if (loadStartTimeRef.current === null) {
3232
loadStartTimeRef.current = Date.now()
3333
}
34-
// eslint-disable-next-line react-hooks/set-state-in-effect -- TODO
3534
setIsLoading(true)
3635
} else {
3736
// If we're exiting the "loading" state:

packages/next/src/next-devtools/dev-overlay/components/devtools-indicator/hooks/use-update-animation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export function useUpdateAnimation(
1919
return
2020
}
2121

22-
// eslint-disable-next-line react-hooks/set-state-in-effect -- TODO
2322
setAnimate(true)
2423
// It is important to use a CSS transitioned state, not a CSS keyframed animation
2524
// because if the issue count increases faster than the animation duration, it

packages/next/src/next-devtools/dev-overlay/components/devtools-panel/resize/resize-handle.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ export const ResizeHandle = ({
7676
const borderBottom = parseFloat(computedStyle.borderBottomWidth) || 0
7777
const borderLeft = parseFloat(computedStyle.borderLeftWidth) || 0
7878

79-
// eslint-disable-next-line react-hooks/set-state-in-effect -- TODO
8079
setBorderWidths({
8180
top: borderTop,
8281
right: borderRight,

packages/next/src/next-devtools/dev-overlay/components/errors/dev-tools-indicator/drag-context.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export function DragProvider({
4040
register,
4141
unregister,
4242
handles:
43-
// eslint-disable-next-line react-hooks/refs -- TODO
4443
handlesRef.current,
4544
disabled,
4645
}),

packages/next/src/next-devtools/dev-overlay/components/errors/error-message/error-message.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export function ErrorMessage({ errorMessage }: ErrorMessageProps) {
1313

1414
useLayoutEffect(() => {
1515
if (messageRef.current) {
16-
// eslint-disable-next-line react-hooks/set-state-in-effect -- TODO
1716
setShouldTruncate(messageRef.current.scrollHeight > 200)
1817
}
1918
}, [errorMessage])

packages/next/src/next-devtools/dev-overlay/components/errors/error-overlay-call-stack/error-overlay-call-stack.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export function ErrorOverlayCallStack({
3737
dialog!.removeEventListener('transitionend', onTransitionEnd)
3838
setIsIgnoreListOpen(false)
3939
}
40-
// eslint-disable-next-line react-hooks/immutability -- Bug in react-hooks/react-compiler
4140
dialog.style.height = `${initialDialogHeight.current}px`
4241
dialog.addEventListener('transitionend', onTransitionEnd)
4342
} else {

packages/next/src/next-devtools/dev-overlay/components/overview/segment-boundary-trigger.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export function SegmentBoundaryTrigger({
4444
() => {
4545
setIsOpen(false)
4646
},
47-
// eslint-disable-next-line react-hooks/refs -- TODO
4847
triggerRef.current?.ownerDocument
4948
)
5049

packages/next/src/next-devtools/dev-overlay/components/overview/segment-explorer.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ function PageSegmentTreeLayerPresentation({
182182
node: SegmentTrieNode
183183
level: number
184184
}) {
185-
// eslint-disable-next-line react-hooks/preserve-manual-memoization
186185
const childrenKeys = useMemo(
187186
() => Object.keys(node.children),
188187
[node.children]
@@ -210,12 +209,7 @@ function PageSegmentTreeLayerPresentation({
210209
return (
211210
level === 0 && !existingBoundaries.includes(GLOBAL_ERROR_BOUNDARY_TYPE)
212211
)
213-
}, [
214-
node.children,
215-
// eslint-disable-next-line react-hooks/preserve-manual-memoization -- it's not modified but dangerous to rely on disable directives. Talk to Compiler team once the other manual memo issues are fixed.
216-
childrenKeys,
217-
level,
218-
])
212+
}, [node.children, childrenKeys, level])
219213

220214
const sortedChildrenKeys = childrenKeys.sort((a, b) => {
221215
// Prioritize files with extensions over directories

packages/next/src/next-devtools/dev-overlay/components/terminal/terminal.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,18 @@ function getEditorLinks(content: string) {
6161
export const Terminal: React.FC<TerminalProps> = function Terminal({
6262
content,
6363
}) {
64-
// eslint-disable-next-line react-hooks/preserve-manual-memoization -- compiler bug
6564
const { file, source, importTraceFiles } = React.useMemo(
6665
() => getEditorLinks(content),
6766
[content]
6867
)
6968

70-
// eslint-disable-next-line react-hooks/preserve-manual-memoization -- compiler bug
7169
const decoded = React.useMemo(() => {
7270
return Anser.ansiToJson(source, {
7371
json: true,
7472
use_classes: true,
7573
remove_empty: true,
7674
})
77-
}, [
78-
// eslint-disable-next-line react-hooks/preserve-manual-memoization -- it's not modified but dangerous to rely on disable directives. Talk to Compiler team once the other manual memo issues are fixed.
79-
source,
80-
])
75+
}, [source])
8176

8277
const open = useOpenInEditor({
8378
file: file?.fileName,

0 commit comments

Comments
 (0)