Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

chore: enable manual memoization lint rule (#10844)

Shahmir Varqha11905815ef71
diff --git a/frontend/.oxlintrc.json b/frontend/.oxlintrc.json
index 9a2574bc47..9f773945f2 100644
--- a/frontend/.oxlintrc.json
+++ b/frontend/.oxlintrc.json
@@ -64,7 +64,6 @@
"react/jsx-no-literals": "off",
"react/no-deriving-state-in-effects": "off",
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
- "react/preserve-manual-memoization": "off",
"react/prefer-function-component": "off",
"react/refs": "off",
"react/rule-suppression": "off",
diff --git a/frontend/src/components/editor/notebook-cell.tsx b/frontend/src/components/editor/notebook-cell.tsx
index 5e73abc0db..45022de9b1 100644
--- a/frontend/src/components/editor/notebook-cell.tsx
+++ b/frontend/src/components/editor/notebook-cell.tsx
@@ -451,7 +451,8 @@ const EditableCellComponent = ({
cellRuntime.staleInputs) &&
!cellRuntime.interrupted;
- // Callback to get the editor view.
+ // This getter is called during render, so useEvent cannot be used here.
+ // oxlint-disable-next-line react/preserve-manual-memoization
const getEditorView = useCallback(() => editorView.current, [editorView]);
// Use the extracted hooks
@@ -1096,7 +1097,8 @@ const SetupCellComponent = ({
cellRuntime.staleInputs) &&
!cellRuntime.interrupted;
- // Callback to get the editor view.
+ // This getter is called during render, so useEvent cannot be used here.
+ // oxlint-disable-next-line react/preserve-manual-memoization
const getEditorView = useCallback(() => editorView.current, [editorView]);
const { isCellCodeShown, showHiddenCode } = useCellHiddenLogic({