prettier-plugin-tsql weekly downloads statistics
By schallm (2 listings) · npm · Prettier plugins
Prettier plugin for T-SQL (Microsoft SQL Server) using the official ScriptDom parser
prettier-plugin-tsql has 377 recorded weekly downloads on npm, an increase of 1350% over the past 30 days, ranking #1594 of 2,322 tracked listings.
About prettier-plugin-tsql
prettier-plugin-tsql
Beta — covers the vast majority of T-SQL; a number of less-common statements (and rarer forms of some common ones) are kept as their original source text (see Pending implementation). Breaking changes possible before 1.0.
A Prettier plugin that formats T-SQL (SQL Server) using Microsoft's official Microsoft.SqlServer.TransactSql.ScriptDom parser — the same parser SQL Server itself uses. Supports SQL Server syntax up to and including SQL Server 2025 (via TSql180Parser).
Requires .NET 8+ Runtime to be installed on your machine (the SDK is not needed).
Features
Parses T-SQL via the official ScriptDom library (no hand-rolled grammar). Configurable keyword casing, layout density, and comma style. Preserves -- and /* */ comments — trailing, leading, inside procedure bodies, between parameters and AS — and never drops one. The test suite checks that formatting never changes what a statement means: every fixture's ScriptDom syntax tree must be the same before and after. Emits go batch separators where required and keeps a repeat count (GO 5); a script made only of comments is kept as written. Integrates with editor extensions that support Prettier (VS Code, etc.).
DML
SELECT,INSERT,UPDATE,DELETEMERGE INTO … USING … ON … WHEN MATCHED/NOT MATCHEDOUTPUT/OUTPUT INTOonINSERT,UPDATE,DELETE, andMERGE(including$action,inserted.*,deleted.*);MERGE … INSERT DEFAULT VALUESOPTION (…)query hints onSELECT,INSERT,UPDATE,DELETE, andMERGE, including the distributed-query hintsFORCE DISTRIBUTED PLAN,FORCE SINGLE NODE PLANandFOR TIMESTAMP AS OF '…'UPDATE/DELETE … WHERE CURRENT OF [GLOBAL] cursor- CTEs,
UNION/UNION ALL, subqueries, derived tables (with column lists:(SELECT …) AS s (a, b)) SELECT … INTO new_table [ON filegroup]EXISTS/NOT EXISTS,GROUP BY/HAVINGCASEexpressions (simple and searched),IN/NOT IN(value lists and subqueries),ANY/ALLsubquery predicates- Inline
VALUES(...)derived tables inFROM TOP (n),TOP (n) PERCENT,TOP (n) WITH TIESPIVOT/UNPIVOTFOR XML(AUTO,PATH,RAW,EXPLICIT,XMLSCHEMA,ELEMENTS,ROOT,TYPE, etc.) andFOR JSON(AUTO,PATH,ROOT,INCLUDE_NULL_VALUES,WITHOUT_ARRAY_WRAPPER)TABLESAMPLE [SYSTEM] (n PERCENT|ROWS) [REPEATABLE(seed)]- Temporal table queries —
FOR SYSTEM_TIME AS OF,FROM … TO,BETWEEN … AND,CONTAINED IN,ALL - Joins:
INNER,LEFT,RIGHT,FULL OUTER,CROSS JOIN,CROSS APPLY,OUTER APPLY; multiple joins, multi-predicateON, self-joins, parenthesized joins, derived table joins - Table-valued functions (TVFs) in
FROMclauses; table hints (WITH (NOLOCK), etc.) - Window functions with
OVERclause —PARTITION BY,ORDER BY, full frame support (ROWS/RANGE BETWEEN … AND …,UNBOUNDED PRECEDING/FOLLOWING,CURRENT ROW);IGNORE NULLS/RESPECT NULLS; named window references; namedWINDOWclause - Ordered set aggregates:
WITHIN GROUP (ORDER BY …)forSTRING_AGG,PERCENTILE_CONT/PERCENTILE_DISC, etc. COLLATEafter any expression — columns, literals, variables, function calls,CAST,CASE, subqueries- ODBC escapes:
{fn UCASE(…)}function calls and{d '…'}/{ts '…'}literals - Expression functions:
CAST,CONVERT,TRY_CAST,TRY_CONVERT(with full data type including length/precision),IIF,COALESCE,NULLIF,AT TIME ZONE,IS [NOT] DISTINCT FROM,TRIM(LEADING|TRAILING|BOTH …),TRIM(chars FROM str),PARSE,TRY_PARSE - Sequence expressions:
NEXT VALUE FOR sequence [OVER (…)] - JSON functions:
JSON_OBJECT(key: value, …),JSON_ARRAY(…),JSON_ARRAYAGG(… ORDER BY …)withABSENT|NULL ON NULL - Full-text predicates:
CONTAINS/FREETEXT(single column, multi-column, wildcard,LANGUAGE);CONTAINSTABLE/FREETEXTTABLEas join sources - Rowset functions:
OPENJSONandOPENXMLwithWITHschema declarations;OPENJSONrow-path andAS JSONcolumns;OPENROWSETprovider andOPENROWSET(BULK …)forms - Built-in functions formatted as standard function calls:
GREATEST,LEAST,DATE_BUCKET,DATETRUNC,GENERATE_SERIES,LEFT_SHIFT,RIGHT_SHIFT,BIT_COUNT,GET_BIT,SET_BIT,APPROX_PERCENTILE_CONT,APPROX_PERCENTILE_DISC,JSON_PATH_EXISTS,STRING_SPLIT,ISJSON,LTRIM,RTRIM
DDL…
Description from the npm listing.
- prettier
- prettier-plugin
- sql
- tsql
- t-sql
- sqlserver
- sql-server
- mssql
- formatter
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (122)Similar npm Prettier plugins plugins
All 20 prettier-plugin-tsql alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/prettier-plugin-tsql. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.