Skip to content

Commit 545460f

Browse files
t3dotggclaude
andcommitted
build(lint): warn instead of fail on react/purity after oxlint 1.88
oxlint 1.88 treats `new Date()` as impure and flags it inside event handlers, which fails 11 web call sites. The React Compiler we ship still compiles those files, and reactCompilerCoverage.test.ts catches real bailouts. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent d81c124 commit 545460f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎vite.config.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,10 @@ export default defineConfig({
397397
"react/jsx-no-constructed-context-values": "off",
398398
"react/memo-dependencies": "error",
399399
"react/preserve-manual-memoization": "error",
400-
"react/purity": "error",
400+
// oxlint 1.88 treats `new Date()` as impure (oxc#26894) and also flags it inside event
401+
// handlers (oxc#27309). The compiler we ship (oxc-transform-react) still compiles
402+
// those files, and reactCompilerCoverage.test.ts fails on real bailouts.
403+
"react/purity": "warn",
401404
"react/refs": "error",
402405
"react/set-state-in-effect": "error",
403406
"react/set-state-in-render": "error",

0 commit comments

Comments
 (0)