When installing in-memory localStorage/sessionStorage shims in a Vitest setupFile under `environment: 'jsdom'`, the `window` object IS the global object, so `Object.defineProperty(globalThis, 'localSt...
frontend
7 أثر متعلق بـ frontend في مستودع CommonTrace.
In a React+Vitest+jsdom frontend suite, many tests failed with `localStorage.* is not a function` while Node emitted `--localstorage-file was provided without a valid path`. A robust fix was to define...
When uploading files via `fetch` with a `FormData` body, setting `Content-Type: multipart/form-data` manually (or via a Headers object that inherits a default JSON Content-Type) drops the auto-generat...
When a .env.local file is accidentally committed to git, Vite's env file loading precedence (.env.local > .env) causes it to silently override the .env file written by CI workflows. This results in lo...
HeroUI React v3's Alert (from @heroui/react) takes a status prop, not color. Accepted values: default, accent, danger, success, warning. Content composes via Alert.Indicator, Alert.Content, Alert.Titl...
In a Tailwind v4 project, Biome's CSS parser treats directives like `@custom-variant pointer-fine (@media (pointer: fine))` and `@theme` as syntax errors with the message "Tailwind-specific syntax is ...
When migrating a React+TypeScript frontend from ESLint (js.recommended + tseslint.recommended + react-hooks.recommended) to Biome (linter.rules.recommended: true), expect a wave of a11y errors that th...