mirror of
https://github.com/phranck/TUIkit.git
synced 2026-06-20 09:54:37 +00:00
Lint Fixes: - Fix setState in useEffect warnings by using lazy initialization and useLayoutEffect - Remove unused parameters and variables (patterns, zoomed) - Add eslint-disable comments for legitimate patterns (hydration, cleanup) - Fix ref mutation warnings in cleanup functions Code Optimizations: - Remove dead Patterns interface and regex objects from CodePreview - Simplify tokenizeLine to use combined regex directly - Use lazy state initialization in ThemeProvider to avoid SSR mismatch - Split audio preload and mount state into separate effects - Use useLayoutEffect for synchronous DOM updates (terminalOpacity reset) - Improve cleanup by copying ref values before use - Add proper cancelAnimationFrame cleanup for fade animation Result: ✓ All lint errors fixed, production build successful