// 70 tips tagged "javascript"
Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.
Before asking Claude to scaffold a new feature, point it at your existing code first — it will match your naming, structure, error handling, and test patterns exactly rather than defaulting to framework boilerplate.
Hand Claude your heap snapshots or server code and ask it to trace memory leaks — it spots missing event listener cleanup, unbounded caches, and stream lifecycle bugs that are easy to miss in code review.
Ask Claude to migrate your Tailwind v2 utility classes and config to v4 — it handles renamed utilities, the new CSS-first config format, and @theme variable mappings across your whole codebase.
Ask Claude to audit your UI components for WCAG accessibility issues — it catches semantic problems, missing ARIA attributes, and keyboard navigation gaps that automated tools miss.
Ask Claude to generate Storybook stories from your existing React components — it reads your prop types and produces complete CSF3 story files with meaningful variants in seconds.
Let Claude generate a complete PWA setup — manifest, service worker with Workbox, caching strategies, and all the meta tags you'd otherwise forget.
Let Claude configure Nx in your monorepo — dependency graphs, affected builds, caching, and task pipelines — so CI only rebuilds what changed.
Migrate JavaScript to TypeScript one file at a time with Claude — set up allowJs, convert leaf modules first, then tighten strict mode when you're ready.
Give Claude a clear product brief and let it scaffold a working full-stack MVP — backend, frontend, and dev tooling — in a single session.
Feed your test coverage report to Claude and let it write the missing tests — targeting uncovered branches, edge cases, and error paths.
Migrate React class components to functional components with hooks — Claude handles lifecycle methods, state, refs, and HoC replacements automatically.