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: adopt Oxlint purity rule (#10772)

Shahmir Varqhae01925d91798
diff --git a/frontend/.oxlintrc.json b/frontend/.oxlintrc.json
index 85d85eb59c..800be8e03b 100644
--- a/frontend/.oxlintrc.json
+++ b/frontend/.oxlintrc.json
@@ -69,7 +69,6 @@
"react/no-unstable-nested-components": ["error", { "allowAsProps": true }],
"react/preserve-manual-memoization": "off",
"react/prefer-function-component": "off",
- "react/purity": "off",
"react/refs": "off",
"react/rule-suppression": "off",
"react/set-state-in-effect": "off",
diff --git a/frontend/src/components/static-html/share-modal.tsx b/frontend/src/components/static-html/share-modal.tsx
index 244b4c00ee..182b03dba5 100644
--- a/frontend/src/components/static-html/share-modal.tsx
+++ b/frontend/src/components/static-html/share-modal.tsx
@@ -21,13 +21,14 @@ import { Input } from "../ui/input";
import { Tooltip } from "../ui/tooltip";
const BASE_URL = "https://static.marimo.app";
-
export const ShareStaticNotebookModal: React.FC<{
onClose: () => void;
}> = ({ onClose }) => {
const [slug, setSlug] = useState("");
const { exportAsHTML } = useRequestClient();
- // 4 character random string
+
+ // Keep one random suffix for the lifetime of the modal.
+ // oxlint-disable-next-line react/purity
const randomHash = useMemo(() => Math.random().toString(36).slice(2, 6), []);
// Globally unique path