denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.29k stars 5.36k forks source link

Feat: Support formatting sql files with deno fmt #25024

Open M4RC3L05 opened 2 months ago

M4RC3L05 commented 2 months ago

As the title says, have deno fmt support sql files. Would this be something to be considered?

M4RC3L05 commented 11 hours ago

Just noticed https://github.com/dprint/dprint-plugin-sql, would it be possible to add this to deno?

bartlomieju commented 10 hours ago

Yes, we could potentially use https://github.com/shssoichiro/sqlformat-rs directly (which the plugin uses under the hood) to format SQL files. If a PR is opened to integrate it with deno fmt we can discuss it during the team meeting if we will merge it. I think if it started with requirement on --unstable-sql flag there's a good chance that would happen.