prettier-plugin-sql-cst
github.com
- Free plan
- Web
6.8 Club score Visit github.com
What the maker publishes
- Bound parameters
- Bound SQL parameter placeholders are rejected by default, and users can configure sqlParamTypes to recognize specified placeholder forms. source
- Configuration
- It supports Prettier’s printWidth, tabWidth, and useTabs options, plus SQL-specific options for keyword, literal, type, identifier, and function casing. source
- Dialect limits
- The experimental dialects are limited by incomplete parser syntax support, and the README says unsupported SQL sections can be bracketed with special comments to disable parsing. source
- Editor integration
- The plugin can be used with Prettier’s VSCode extension, configured as the default formatter, with document selectors potentially needed for SQL files. source
- Embedded SQL
- The README recommends using prettier-plugin-embed together with this plugin to format SQL strings inside JavaScript files. source
- Experimental dialects
- PostgreSQL, PL/pgSQL, MySQL, and MariaDB are listed as experimental, and the README says parser syntax support is incomplete for these dialects. source
- Formatting
- It adapts SQL layout to expression length, placing longer clauses and their contents on separate lines as needed. source
- Installation
- The README gives npm, pnpm, and yarn commands for installing the plugin with Prettier as a development dependency. source
- License
- The repository identifies the project as GPL-3.0 licensed. source
- Limitations
- The README says SQL formatting style details remain subject to change and describes identifier and function case options as experimental and not thoroughly tested. source
- Live demo
- The project README links to a live SQL formatting playground. source
- Maintainer
- The maintainer profile identifies Rene Saarsoo and lists Tartu, Estonia as his location. source
- Purpose
- It is a Prettier plugin for formatting SQL that uses sql-parser-cst and Prettier’s formatting algorithm. source
- Style
- Its stated formatting philosophy is to use one style, avoid configuration options, format embedded languages, and preserve syntax when uncertain. source
- Supported dialects
- SQLite and BigQuery have full support; PostgreSQL, PL/pgSQL, MySQL, and MariaDB are experimental. source
Checked against the maker's pages on 8 Oct 2026.