Smart quote conversion utilities for typographically correct quotes.
Some LLMs (all Anthropic models, for instance) are incapable of outputting smart quotes, even when explicitly asked—and Anthropic has confirmed this won't be fixed anytime soon. This package provides a streaming transform for AI output and an ESLint rule/autofix for vibe-coded JSX/TSX.
| Package | Description |
|---|---|
| smartquote | Core library with streaming API, Vercel AI SDK integration, and ESLint plugin |
| smartquotes (Python) | Python port of the core conversion logic |
npm install smartquoteimport { smartQuotes } from "smartquote";
smartQuotes('"Hello," she said.');
// → “Hello,” she said.See the package README for full API documentation.
- vercel-ai-sdk - Streaming AI responses with smart quote conversion
- eslint - ESLint plugin for JSX/TSX files
This is a pnpm monorepo.
pnpm install # Install dependencies
pnpm build # Build all packages
pnpm test # Run tests
pnpm lint # Lint all packages
pnpm check-types # Type check all packagesMIT