Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "tabs" and "noRcFile" options #7

Merged
merged 3 commits into from
Nov 26, 2020
Merged

Conversation

frigus02
Copy link
Contributor

Thanks for creating and maintaining this package.

I would like to use it in a TypeScript server plugin to format SQL statements and found that I need some of the others options that pgFormatter provides. I hope you are open to these additions 馃檪

  • tabs: Use tabs instead of spaces. In the TS server plugin I would like to honor the users choice of indentation style, so this option would be useful.
  • noRcFile: I realized pgFormatter tries to read a config file by default from $HOME/.pg_format. This fails on Windows because HOME is not set (at least not by default). In addition I think I would like to have consistent formatting based on the project settings for the TS server plugin, so it makes sense to ignore local user options for now.

While working on this I also fixed ESLint to make sure I don't introduce any unintended issues. I went with the easiest option and updated the packages just enough to make them work.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 93.478% when pulling 8221ec7 on frigus02:add-options into ebb9438 on gajus:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+1.4%) to 93.478% when pulling 8221ec7 on frigus02:add-options into ebb9438 on gajus:master.

@gajus gajus merged commit 8e81c72 into gajus:master Nov 26, 2020
@frigus02 frigus02 deleted the add-options branch November 26, 2020 13:08
@gajus
Copy link
Owner

gajus commented Nov 26, 2020

馃帀 This PR is included in version 1.2.0 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants