IDE Setup

How to configure your IDE to get the most out of Catalyst Next

IDE-First Philosophy

In Catalyst Next, JSDoc comments are the primary documentation. They are not a supplement to external docs — they are the docs, surfaced in three places simultaneously:

SurfaceHow JSDoc appears
VS Code hover tooltipProp descriptions, defaults, and examples appear inline as you type
Storybook Controls panel@storybook/react reads JSDoc to populate ArgTypes automatically
Fumadocs prop tablesThe docsite auto-generates API reference from TypeScript + JSDoc

This means: if a prop is documented correctly in the source file, it is documented everywhere. You never need to maintain docs in multiple places.

The rule: If you add or change a prop and don't update its JSDoc, the documentation is broken — even if the primitive works.


JSDoc Strategy

Primitive-level JSDoc

Every exported primitive must have a JSDoc block describing its purpose, default element, and asChild behaviour if applicable:

/**
 * Primary interaction element for marketing and product interfaces.
 *
 * Renders as a `<button>` by default. Use the `asChild` prop to delegate
 * rendering to a child element (e.g. a router `<Link>`).
 *
 * @example
 * // Default button
 * <Button variant="solid" size="md">Click me</Button>
 *
 * @example
 * // As a link
 * <Button asChild><a href="/docs">Read the docs</a></Button>
 */
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(...)

Prop-level JSDoc

Document every prop on the interface, not the primitive implementation. This is where VS Code, Storybook, and Fumadocs read from:

export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
  /**
   * Controls the visual style of the badge.
   * - `solid` — filled background, high contrast
   * - `soft` — muted background, low contrast
   * - `outline` — transparent background with border
   * @default "soft"
   */
  variant?: 'solid' | 'soft' | 'outline';

  /**
   * Controls the colour palette applied to the badge.
   * Maps to design token–backed Tailwind classes.
   * @default "neutral"
   */
  color?: 'off-black' | 'accent' | 'neutral' | 'info' | 'danger' | 'warning' | 'success';

  /**
   * When `true`, merges props onto the child element via Radix UI Slot
   * instead of rendering its own DOM node.
   * @see {@link https://www.radix-ui.com/primitives/docs/utilities/slot Radix UI Slot}
   * @default false
   */
  asChild?: boolean;
}

JSDoc tags used in this project

TagUsage
@defaultDefault prop value — required for all props with defaults; Storybook and Fumadocs rely on it
@exampleInline code example shown in hover tooltip and Storybook Controls
@seeLinks to related primitives, external docs, or Radix primitives
@deprecatedMarks a prop or primitive as deprecated — include migration guidance
@internalMarks utilities not intended for consumer use
@paramDocuments function parameters (utility functions and hooks only)
@returnsDocuments return values (hooks only)

Tags to avoid

  • Do not duplicate the prop type in @param — TypeScript already carries this
  • Do not use @type — redundant with TypeScript annotations
  • Do not omit @default for props with defaults — this breaks Storybook ArgTypes and Fumadocs prop tables

A correctly configured VS Code is what makes the IDE-first approach work. Without Tailwind IntelliSense and TypeScript hover, JSDoc docs are invisible to the developer.

Essential

ExtensionIDPurposeNotes / Recommended Settings
ESLintdbaeumer.vscode-eslintLint feedback inline as you typeRecommended: "eslint.validate": ["javascript", "typescript", "typescriptreact"] in .vscode/settings.json. Works well with Prettier.
Prettieresbenp.prettier-vscodeAuto-format on saveEnable "editor.formatOnSave": true. Make sure ESLint and Prettier rules are aligned to avoid conflicts.
Tailwind CSS IntelliSensebradlc.vscode-tailwindcssAutocomplete for Tailwind utility classes and design tokensCan enable experimental.classRegex for CSS Modules support. Do not install "IntelliSense for CSS class names in HTML" alongside this — they conflict.
GitHub Copilotgithub.copilotAI-assisted code completion inline as you typeRequires GitHub account with Copilot access. Core part of the Catalyst development workflow.
GitHub Copilot Chatgithub.copilot-chatInline AI chat for refactoring, questions, and explanationsPairs with GitHub Copilot. Use for primitive, test, and JSDoc generation.
TypeScript (built-in)Use the workspace TypeScript version instead of VS Code's bundled oneNo installation required. Configure "typescript.tsdk" in .vscode/settings.json to use the project version.
ExtensionIDPurposeNotes / Recommended Settings
MDXunifiedjs.vscode-mdxSyntax highlighting and IntelliSense in .mdx filesUseful for Fumadocs docsite pages.
GitLenseamodio.gitlensGit blame, history, and PR annotations inline in the editorEspecially useful in a monorepo with Azure DevOps PRs and multi-package history.
Jestorta.vscode-jestRun and debug Jest tests inline without leaving the editorProject uses Jest + React Testing Library — enables inline test status and snapshot review.
Error Lensusernamehakobyan.error-lensShows inline errors and warnings next to the offending lineColors and font can be customized via errorLens.fontWeight and errorLens.fontSize. Can be used with Pretty TypeScript Errors.
Pretty TypeScript Errorsyoavbls.pretty-ts-errorsMakes TypeScript errors more readableHelps especially in large projects. Can be used alongside Error Lens, but you may choose one if preferred.
Headwindheybourn.headwindEnforces consistent Tailwind class orderingWorks only with Tailwind. Enable "headwind.sortOnSave": true in .vscode/settings.json for automatic sorting.
SVG Previewjock.svgPreview SVG files directly in VS CodeUseful when working with the Catalyst icons package.

Nice to have

ExtensionIDPurposeNotes / Recommended Settings
Mermaid Markdown Syntax Highlightingbpruitt-goddard.mermaid-markdown-syntax-highlightingSyntax highlighting for Mermaid diagrams in Markdown and MDXUseful if architecture or primitive hierarchy diagrams are added to docsite MDX pages.

Storybook

ExtensionIDPurposeNotes / Recommended Settings
Storybook Snippetsdineug.vscode-storybook-snippetsBoilerplate for stories and argsSupports JSX/TSX, suitable for Storybook 7+. Speeds up story creation.

Workspace Extension Recommendations

The project includes a .vscode/extensions.json file. VS Code will automatically prompt you to install all recommended extensions when you open the workspace:

{
  "recommendations": [
    "dbaeumer.vscode-eslint",
    "esbenp.prettier-vscode",
    "bradlc.vscode-tailwindcss",
    "github.copilot",
    "github.copilot-chat",
    "unifiedjs.vscode-mdx",
    "eamodio.gitlens",
    "orta.vscode-jest",
    "usernamehakobyan.error-lens",
    "yoavbls.pretty-ts-errors",
    "heybourn.headwind",
    "jock.svg",
    "bpruitt-goddard.mermaid-markdown-syntax-highlighting"
  ]
}

TypeScript Config

Catalyst Next uses TypeScript 5.6+ with strict mode enabled. Key settings to be aware of:

Use the workspace TypeScript version

VS Code defaults to its own bundled TypeScript version, which may differ from the project's. Always use the workspace version:

  1. Open any .ts or .tsx file
  2. Press Cmd/Ctrl + Shift + PTypeScript: Select TypeScript Version
  3. Choose Use Workspace Version

Or add this to your .vscode/settings.json:

// filepath: .vscode\settings.json
{
  "typescript.tsdk": "node_modules/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true
}

tsconfig.json highlights

The root tsconfig.json enables strict type checking across all primitive packages:

{
  "compilerOptions": {
    "strict": true,                    // Enables all strict type checks
    "exactOptionalPropertyTypes": true, // Distinguishes undefined from missing props
    "noUncheckedIndexedAccess": true,  // Array/object access returns T | undefined
    "moduleResolution": "bundler",     // Aligns with Parcel + Vite build pipeline
    "jsx": "react-jsx",               // No need to import React in every file
    "paths": {
      "@catalyst-next/*": ["./src/components/*"]
    }
  }
}

On this page