Unibeautify
  • Install
  • Docs
  • Assistant
  • Playground
  • GitHub

›K

A

  • Align Assignments
  • Arrow Parens

B

  • Brace Style
  • Break Chained Methods

C

  • Comma First

E

  • End With Comma
  • End With Newline
  • End With Semicolon

F

  • Force Indentation

I

  • Identifier Case
  • Indent Chained Methods
  • Indent Comments
  • Indent Inner Html
  • Indent Scripts
  • Indent Size
  • Indent Style

J

  • JSLint Happy
  • JSX Brackets

K

  • Keep Array Indentation
  • Keyword Case

M

  • Max Preserve Newlines
  • Multiline Ternary

N

  • Newline Before Tags
  • Newline Between Rules
  • No Leading Zero

O

  • Object Curly Spacing

P

  • Pragma Insert
  • Pragma Require
  • Preserve Newlines

Q

  • Quotes

R

  • Remove Trailing Whitespace

S

  • Selector Separator Newline
  • Space After Anon Function
  • Space Before Conditional
  • Space In Empty Paren
  • Space In Paren

U

  • Unescape Strings
  • Unformatted

W

  • Wrap Attributes
  • Wrap Attributes Indent Size
  • Wrap Line Length
  • Wrap Prose
Edit

Keyword Case

Config Key: keyword_case

Description: Case type for keywords

Available since version: 0.17.0 (Current: npm)

Type: string

Default: "lowercase"

Allowed values: "lowercase" or "uppercase" or "capitalize"

Support

Edit Beautifiers

Languages: SQL

Beautifiers: sqlformat

Comparison Table

Languagesqlformat
SQL✅

Examples

Invisible characters are shown with the following symbols:

Carriage Return = ␍; Line Feed = ␊; Tab = ⇥; Whitespace = ·.

Edit SQL Example

🚧 Original Code

SELECT·*␊
from·USERS·u␊
Join·Users_Permission·up·On·U.User_Id·=·up.user_id␊
where·u.USER_ID·=·1␊
··AND·U.Permission_id·=·2;␊

🔧 "lowercase"

Using sqlformat beautifier:

select·*␊
from·USERS·u␊
join·Users_Permission·up·on·U.User_Id·=·up.user_id␊
where·u.USER_ID·=·1␊
··and·U.Permission_id·=·2;

How to configure A .unibeautify.json file would look like the following:

{
  "SQL": {
    "indent_size": 2,
    "indent_char": " ",
    "keyword_case": "lowercase",
    "beautifiers": [
      "sqlformat"
    ]
  }
}

Difference from original

Index: lowercase
===================================================================
--- lowercase   Original
+++ lowercase   Beautified
@@ -1,5 +1,5 @@
-SELECT·*␊
+select·*␊
 from·USERS·u␊
-Join·Users_Permission·up·On·U.User_Id·=·up.user_id␊
+join·Users_Permission·up·on·U.User_Id·=·up.user_id␊
 where·u.USER_ID·=·1␊
-··AND·U.Permission_id·=·2;␊
+··and·U.Permission_id·=·2;
\ No newline at end of file

🔧 "uppercase"

Using sqlformat beautifier:

SELECT·*␊
FROM·USERS·u␊
JOIN·Users_Permission·up·ON·U.User_Id·=·up.user_id␊
WHERE·u.USER_ID·=·1␊
··AND·U.Permission_id·=·2;

How to configure A .unibeautify.json file would look like the following:

{
  "SQL": {
    "indent_size": 2,
    "indent_char": " ",
    "keyword_case": "uppercase",
    "beautifiers": [
      "sqlformat"
    ]
  }
}

Difference from original

Index: uppercase
===================================================================
--- uppercase   Original
+++ uppercase   Beautified
@@ -1,5 +1,5 @@
 SELECT·*␊
-from·USERS·u␊
-Join·Users_Permission·up·On·U.User_Id·=·up.user_id␊
-where·u.USER_ID·=·1␊
-··AND·U.Permission_id·=·2;␊
+FROM·USERS·u␊
+JOIN·Users_Permission·up·ON·U.User_Id·=·up.user_id␊
+WHERE·u.USER_ID·=·1␊
+··AND·U.Permission_id·=·2;
\ No newline at end of file

🔧 "capitalize"

Using sqlformat beautifier:

Select·*␊
From·USERS·u␊
Join·Users_Permission·up·On·U.User_Id·=·up.user_id␊
Where·u.USER_ID·=·1␊
··And·U.Permission_id·=·2;

How to configure A .unibeautify.json file would look like the following:

{
  "SQL": {
    "indent_size": 2,
    "indent_char": " ",
    "keyword_case": "capitalize",
    "beautifiers": [
      "sqlformat"
    ]
  }
}

Difference from original

Index: capitalize
===================================================================
--- capitalize  Original
+++ capitalize  Beautified
@@ -1,5 +1,5 @@
-SELECT·*␊
-from·USERS·u␊
+Select·*␊
+From·USERS·u␊
 Join·Users_Permission·up·On·U.User_Id·=·up.user_id␊
-where·u.USER_ID·=·1␊
-··AND·U.Permission_id·=·2;␊
+Where·u.USER_ID·=·1␊
+··And·U.Permission_id·=·2;
\ No newline at end of file

← Keep Array IndentationMax Preserve Newlines →
  • Support
  • Examples
Unibeautify
Docs
Getting StartedCLIConfigurationOptions
Community
User ShowcaseStack Overflow@Unibeautify on TwitterFollow Unibeautify on Twitter
More
GitHubStar Unibeautify on GitHubCode coverage of UnibeautifyCode coverage of Unibeautify
© 2020 Glavin Wiechert
Credits