New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include prettier-plugin-sql-cst to community plugins list #14408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Can you make it work on Prettier 3? We are close to release it.
You may want copy change to |
Thanks. I copied by change to Thanks also for pointers about Prettier 3.0. I'll see if I can make it work. |
Just a quick question about 3.0... Would you expect plugin developers to support both 2.x and 3.x in their plugins, or would you expect the plugins to completely ditch 2.x support and only support 3.x? |
It's possible to make it work for v2 and v3. Depends on you want your user to use v2 or not. |
Thanks. In my case I will probably just ditch 2.x support as I don't really have any users yet. |
Looked into upgrading to 3.x, but unfortunately the @types/prettier doesn't yet support 3.x. As my plugin relies heavily on TypeScript, I'll have to either wait for the new type definitions or contribute my own to DefinitelyTyped before I can start adopting 3.x. |
Released 3.0.0-alpha.5 with type definitions. |
Description
This PR adds link to prettier-plugin-sql-cst to the list of community plugins.
Admittedly, this is an attempt to promote an SQL-formatting plugin that I have written. There already exists an SQL-plugin in this list, so why do I suggest adding another one?
The existing SQL plugin simply wraps an existing sql-formatter library, which doesn't really format the code in the way Prettier itself does. I know its limitations quite well, as I'm actually the author of that library.
The new plugin uses the actual Prettier formatting algorithm to lay out the code and is also much more in line with the philosophy of Prettier, by providing almost no configuration options and having a very opinionated approach to SQL code style.
Checklist
docs/
directory).changelog_unreleased/*/XXXX.md
file followingchangelog_unreleased/TEMPLATE.md
.✨Try the playground for this PR✨