0.2.53 • Published 1 month ago

prettier-plugin-bq v0.2.53

Weekly downloads
-
License
MIT
Repository
-
Last release
1 month ago

prettier-plugin-bq

prettier-plugin-bq is a prettier plugin for GoogleSQL, which is a dialect of BigQuery.

Install

npm install --save-dev --save-exact prettier prettier-plugin-bq

Usage

As the prettier document says, the plugin is automatically loaded.

Plugins are automatically loaded if you have them installed in the same node_modules directory where prettier is located.

You can format .sql and .bq file by the following command.

npx prettier --write ./xxx.sql --plugin=prettier-plugin-bq

For more information, please read the prettier document.

Configuration

Below are the options that prettier-plugin-bq currently supports.

API OptionCLI OptionDefaultDescription
formatMultilineCommentformat-multiline-commentfalse(experimental) Print multiline commnets in "starred-block" style.
indentCteindent-ctetrueIndent CTEs in with clause.
printBlankLineAfterCteprint-blank-line-after-ctefalsePrint blank line after CTE in with clause.
printKeywordsInUpperCaseprint-keywords-in-upper-casetruePrint reserved keywords and functions in upper case.
printPseudoColumnsInUpperCaseprint-pseudo-columns-in-upper-casetruePrint pseudo columns (e.g. _PARTITIONDATE, _PARTITIONTIME) in upper case. When printKeywordsInUpperCase is false, this option is ignored.

Coding style

This plugin doesn't follow any famous style guides, because none of them satisfies me.

Feedback

I'm not ready to accept pull requests, but your feedback is always welcome. If you find any bugs, please feel free to create an issue.

0.2.53

1 month ago

0.2.52

2 months ago

0.2.51

2 months ago

0.2.50

2 months ago

0.2.49

2 months ago

0.2.48

3 months ago

0.2.47

3 months ago

0.2.46

4 months ago

0.2.45

4 months ago

0.2.44

4 months ago

0.2.41

10 months ago

0.2.40

10 months ago

0.2.43

9 months ago

0.2.42

10 months ago

0.2.39

12 months ago