An opinionated SQL formatter implementing Simon Holywell's sqlstyle.guide with zero dependencies. Current stable version is 1.8.10 (as of Oct 2024). It enforces specific formatting rules such as river alignment (right-aligned keywords), keyword uppercasing, and consistent indentation. Unlike general-purpose SQL formatters (e.g., sql-formatter or pgFormatter), holywell strictly follows a single style guide with minimal configuration, making output deterministic. It supports CLI (glob patterns, --check, --write) and programmatic usage via named export formatSQL. Requires Node.js ≥18 and ships TypeScript types. Does not support custom configuration or multiple dialects beyond standard SQL.
npm install holywellNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Formats a multi-line SQL query with JOINs and window function using the holywell library.
Update Node.js to 18 or later, or use npm@9+ with --ignore-engines (not recommended).
If you need custom formatting, consider another library like sql-formatter. holywell is intentionally opinionated.
Use a dialect-aware formatter like sql-formatter with dialect option for non-standard SQL.
Use import statements or dynamic import. In CommonJS, use async wrapper: const { formatSQL } = await import('holywell');Upgrade to >=1.0.0 and use named export formatSQL.
Change to import { formatSQL } from 'holywell'; or use dynamic import: const { formatSQL } = await import('holywell');Change import formatSQL from 'holywell' to import { formatSQL } from 'holywell'.Fix SQL syntax or use a dialect-aware formatter for your specific SQL variant.
Upgrade Node.js to 18 or later.
No dependency data recorded yet.