A JavaScript library for pretty-printing SQL queries, forked to add SQL Server dialect support. Current stable version is 1.0.2. Low release cadence (last update 2020). Key differentiators: supports Standard SQL, N1QL, DB2, Oracle PL/SQL, and now SQL Server; parameter placeholder replacement; works in Node.js and browsers. Alternatives like prettier-plugin-sql have broader community but this fork fills the gap for T-SQL formatting.
npm install sql-formatter-with-sql-serverNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic SQL formatting with custom indent and a multi-line query using the default export.
Use underyling 'sql' dialect as fallback or open an issue on GitHub.
Always specify language explicitly: { language: 'sql' }Use dynamic import or switch to ESM syntax: import sqlFormatter from 'sql-formatter-with-sql-server'
Run 'npm install sql-formatter-with-sql-server' and require/import with exact name.
Use 'import sqlFormatter from ...' then call sqlFormatter.format(...)
Ensure the dist file is loaded before use. The global is 'sqlFormatter', not 'SqlFormatter'.
No dependency data recorded yet.