Skip to content

Docs: introduction page hero snippet imports plugins from corsair (won't compile/run) #297

Description

@Arindam200

Summary

The first code sample on the docs introduction page imports plugins directly from the corsair package, but corsair does not export plugins. The snippet fails both at TypeScript compile time and at runtime.

Location

docs/getting-started/introduction.mdx:12

import { createCorsair, slack, github, gmail, linear } from 'corsair';

Why it's broken

  • packages/corsair/index.ts exports createCorsair, setupCorsair, processWebhook, etc. — but no slack / github / gmail / linear, and there is no export * wildcard.
  • packages/corsair/package.json has zero @corsair-dev/* dependencies, so it can't re-export plugins indirectly either.
  • Plugins are published as separate packages (e.g. @corsair-dev/slack in packages/slack/package.json).

Result:

  • TypeScript: Module '"corsair"' has no exported member 'slack'.
  • Runtime JS: slack resolves to undefined, so slack() throws slack is not a function.

This is the most-viewed page, so a broken first example undermines trust in every later snippet — even though the rest of the docs get this right (e.g. docs/getting-started/quick-start.mdx:434-436 and every plugin overview import plugins from their own package).

Suggested fix

import { createCorsair } from 'corsair';
import { slack } from '@corsair-dev/slack';
import { github } from '@corsair-dev/github';
import { gmail } from '@corsair-dev/gmail';
import { linear } from '@corsair-dev/linear';

export const corsair = createCorsair({
    plugins: [slack(), github(), gmail(), linear()],
    database: db,
    kek: process.env.CORSAIR_KEK!,
});

It would also help to add the corresponding install line (pnpm add corsair @corsair-dev/slack @corsair-dev/github @corsair-dev/gmail @corsair-dev/linear).

Prevention

A docs lint check that fails when a plugin name is imported from "corsair" would catch this class of regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions