Skip navigation
SQL-in-JS formatting 😍
0:00 / 0:40

SQL-in-JS formatting 😍

Karl Horky

@karlhorky2K followers

Visit on X
221 likesDownloadOriginal post

45,068 views

SQL-in-JS formatting 😍 This is possible thanks to prettier-plugin-embed by Sec-ant (Ze-Zheng Wu), prettier-plugin-sql by JounQin, sql-formatter by Rene Saarsoo Setup Guide:

6 Comments

Comments from the original post on X (Twitter)

  • Karl Horky 🦋 @karlhorky.com's profile picture

    @karlhorky

    Give these projects a star 🌟 prettier-plugin-embed by Sec-ant (Ze-Zheng Wu)

    1 like

  • Karl Horky 🦋 @karlhorky.com's profile picture

    @karlhorky

    prettier-plugin-sql by @JounQin

  • Karl Horky 🦋 @karlhorky.com's profile picture

    @karlhorky

    sql-formatter by @renku

    1 like

  • Karl Horky 🦋 @karlhorky.com's profile picture

    @karlhorky

    More great SQL tooling here:

    1 like

  • Anton Revyako's profile picture

    @antonrevyako

    @JounQin @renku Why are you storing sql in js? Put it in a separate file, it will bring many benefits

  • Karl Horky 🦋 @karlhorky.com's profile picture

    @karlhorky

    @JounQin @renku SQL-in-JS allows you to integrate with JavaScript and TypeScript: 1. Interpolation of runtime JavaScript values (eg. function parameters) 2. SQL closer to your logic (colocation) 3. Checking against TypeScript types Etc. Lots of benefits of having it in your JS/TS

    1 like