question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[prettier-plugin-sql] How to configure options

See original GitHub issue

Hi,

I just found this library, and it seems a great addition to the Prettier ecosystem!

I am having trouble using it, though, because the default configuration is meant for MySQL, and I am not sure how to pass the options to the plugin. It does not seem to be reading them from .prettierrc.yml.

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
6temescommented, Jan 4, 2022

@JounQin

Sorry. I am afraid that there was a PEBKAC. The config works ok. Sorry about that.

For reference, this is my current config:

# In .prettierrc.yml

endOfLine: lf
printWidth: 100
semi: false
singleQuote: true
trailingComma: all
rubySingleQuote: true
rubyToProc: true

formatter: sql-formatter
language: postgresql
uppercase: true
linesBetweenQueries: 2

I will close the issue.

0reactions
JounQincommented, Mar 13, 2022

PR welcome, you can always put the options at the root level or overrides block.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugins - Prettier
Plugins are ways of adding new languages or formatting rules to Prettier. ... Tip: You can set --plugin-search-dir or --plugin options multiple times....
Read more >
prettier-plugin-sql - npm
An opinionated sql formatter plugin for Prettier. ... Start using prettier-plugin-sql in your project by running `npm i prettier-plugin-sql` ...
Read more >
dr666m1/prettier-plugin-bq - GitHub
For more information, please read the prettier document. Configuration. Below are the options that @dr666m1/prettier-plugin-bq currently supports.
Read more >
Prettier | WebStorm Documentation - JetBrains
Make sure the Prettier plugin is enabled in the settings. Press Ctrl+Alt+S to open the IDE settings and select Plugins. Click the Installed...
Read more >
prettier-plugin-sh | Yarn - Package Manager
An opinionated shellscript formatter plugin for Prettier, also support simple format of Dockerfile , properties , gitignore , dotenv , hosts , jvmoptions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found