Unibeautify
  • Install
  • Docs
  • Assistant
  • Playground
  • GitHub

›Contributing

About

  • What is Unibeautify
  • Unibeautify CI
  • Credits

Usage

  • Getting Started
  • Command-Line Interface (CLI)
  • Configuration File
  • Language Options
  • Beautifier Options
  • Supported Languages
  • Editor Integration

Contributing

  • Examples

Integrations

  • GitHub
  • GitLab
  • Bitbucket

Beautifiers

  • Black
  • Brittany
  • ClangFormat
  • CSScomb
  • ESLint
  • Gofmt
  • JS-Beautify
  • PHP-CS-Fixer
  • PHP_CodeSniffer
  • Prettier
  • Pretty Diff
  • sqlformat
  • stylelint
  • TSLint
  • YAPF
Edit

Contributing Examples

One of the objectives of Unibeautify is to provide an exceptional user experience regardless of languages or beautifiers involved. Examples play an integral role when demonstrating how configuring an option impacts the formatted code.

Note: You can see below the coverage of examples for each language and option. Click the ✎ icon below to add/edit an example.

Progress# of Examples Completed# of Examples Missing# of Examples
67% 234112346
#LanguageProgress# of Examples# of Options
1C 100% 00
2C# 100% 99
3C++ 100% 00
4CSS 100% 1313
5ColdFusion 100% 77
6EJS 9% 222
7Go 100% 00
8GraphQL 100% 55
9HTML 100% 1616
10HTML+ERB 100% 77
11Handlebars 12% 216
12Haskell 100% 00
13JSON 100% 44
14JSON5 100% 55
15JSX 100% 2929
16Java 100% 99
17JavaScript 100% 2929
18Less 90% 1011
19Liquid 15% 213
20Markdown 100% 44
21Mustache 15% 213
22Objective-C 100% 00
23PHP 100% 00
24Python 100% 33
25Riot 18% 211
26SCSS 90% 1011
27SQL 100% 33
28SVG 28% 27
29Sass 83% 56
30Spacebars 28% 27
31SugarSS 100% 66
32Swig 0% 011
33Titanium Style Sheets 28% 27
34Twig 27% 311
35TypeScript 100% 1717
36Visualforce 28% 27
37Vue 100% 44
38XML 100% 1616
39XTemplate 28% 27

C

#OptionExampleEdit

C#

#OptionExampleEdit
1Align Assignments✅✎
2Break Chained Methods✅✎
3Indent Comments✅✎
4Indent Size✅✎
5Indent Style✅✎
6Max Preserve Newlines✅✎
7Multiline Ternary✅✎
8Quotes✅✎
9Wrap Line Length✅✎

C++

#OptionExampleEdit

CSS

#OptionExampleEdit
1End With Newline✅✎
2Indent Size✅✎
3Indent Style✅✎
4Max Preserve Newlines✅✎
5Newline Between Rules✅✎
6No Leading Zero✅✎
7Pragma Insert✅✎
8Pragma Require✅✎
9Preserve Newlines✅✎
10Quotes✅✎
11Remove Trailing Whitespace✅✎
12Selector Separator Newline✅✎
13Wrap Line Length✅✎

ColdFusion

#OptionExampleEdit
1Force Indentation✅✎
2Indent Comments✅✎
3Indent Size✅✎
4Indent Style✅✎
5Max Preserve Newlines✅✎
6Quotes✅✎
7Wrap Line Length✅✎

EJS

#OptionExampleEdit
1Align Assignments❌✎
2Brace Style❌✎
3Break Chained Methods❌✎
4Comma First❌✎
5End With Comma❌✎
6End With Newline❌✎
7Indent Chained Methods❌✎
8Indent Comments❌✎
9Indent Size✅✎
10Indent Style✅✎
11JSLint Happy❌✎
12Keep Array Indentation❌✎
13Max Preserve Newlines❌✎
14Multiline Ternary❌✎
15Preserve Newlines❌✎
16Quotes❌✎
17Space After Anon Function❌✎
18Space Before Conditional❌✎
19Space In Empty Paren❌✎
20Space In Paren❌✎
21Unescape Strings❌✎
22Wrap Line Length❌✎

Go

#OptionExampleEdit

GraphQL

#OptionExampleEdit
1Indent Size✅✎
2Indent Style✅✎
3Pragma Insert✅✎
4Pragma Require✅✎
5Wrap Line Length✅✎

HTML

#OptionExampleEdit
1Brace Style✅✎
2End With Newline✅✎
3Force Indentation✅✎
4Indent Comments✅✎
5Indent Inner Html✅✎
6Indent Scripts✅✎
7Indent Size✅✎
8Indent Style✅✎
9Max Preserve Newlines✅✎
10Newline Before Tags✅✎
11Preserve Newlines✅✎
12Quotes✅✎
13Unformatted✅✎
14Wrap Attributes✅✎
15Wrap Attributes Indent Size✅✎
16Wrap Line Length✅✎

HTML+ERB

#OptionExampleEdit
1Force Indentation✅✎
2Indent Comments✅✎
3Indent Size✅✎
4Indent Style✅✎
5Max Preserve Newlines✅✎
6Quotes✅✎
7Wrap Line Length✅✎

Handlebars

#OptionExampleEdit
1Brace Style❌✎
2End With Newline❌✎
3Force Indentation❌✎
4Indent Comments❌✎
5Indent Inner Html❌✎
6Indent Scripts❌✎
7Indent Size✅✎
8Indent Style✅✎
9Max Preserve Newlines❌✎
10Newline Before Tags❌✎
11Preserve Newlines❌✎
12Quotes❌✎
13Unformatted❌✎
14Wrap Attributes❌✎
15Wrap Attributes Indent Size❌✎
16Wrap Line Length❌✎

Haskell

#OptionExampleEdit

JSON

#OptionExampleEdit
1Indent Size✅✎
2Indent Style✅✎
3Max Preserve Newlines✅✎
4Quotes✅✎

JSON5

#OptionExampleEdit
1Indent Comments✅✎
2Indent Size✅✎
3Indent Style✅✎
4Max Preserve Newlines✅✎
5Quotes✅✎

JSX

#OptionExampleEdit
1Align Assignments✅✎
2Arrow Parens✅✎
3Brace Style✅✎
4Break Chained Methods✅✎
5Comma First✅✎
6End With Comma✅✎
7End With Newline✅✎
8End With Semicolon✅✎
9Indent Chained Methods✅✎
10Indent Comments✅✎
11Indent Size✅✎
12Indent Style✅✎
13JSLint Happy✅✎
14JSX Brackets✅✎
15Keep Array Indentation✅✎
16Max Preserve Newlines✅✎
17Multiline Ternary✅✎
18Object Curly Spacing✅✎
19Pragma Insert✅✎
20Pragma Require✅✎
21Preserve Newlines✅✎
22Quotes✅✎
23Remove Trailing Whitespace✅✎
24Space After Anon Function✅✎
25Space Before Conditional✅✎
26Space In Empty Paren✅✎
27Space In Paren✅✎
28Unescape Strings✅✎
29Wrap Line Length✅✎

Java

#OptionExampleEdit
1Align Assignments✅✎
2Break Chained Methods✅✎
3Indent Comments✅✎
4Indent Size✅✎
5Indent Style✅✎
6Max Preserve Newlines✅✎
7Multiline Ternary✅✎
8Quotes✅✎
9Wrap Line Length✅✎

JavaScript

#OptionExampleEdit
1Align Assignments✅✎
2Arrow Parens✅✎
3Brace Style✅✎
4Break Chained Methods✅✎
5Comma First✅✎
6End With Comma✅✎
7End With Newline✅✎
8End With Semicolon✅✎
9Indent Chained Methods✅✎
10Indent Comments✅✎
11Indent Size✅✎
12Indent Style✅✎
13JSLint Happy✅✎
14JSX Brackets✅✎
15Keep Array Indentation✅✎
16Max Preserve Newlines✅✎
17Multiline Ternary✅✎
18Object Curly Spacing✅✎
19Pragma Insert✅✎
20Pragma Require✅✎
21Preserve Newlines✅✎
22Quotes✅✎
23Remove Trailing Whitespace✅✎
24Space After Anon Function✅✎
25Space Before Conditional✅✎
26Space In Empty Paren✅✎
27Space In Paren✅✎
28Unescape Strings✅✎
29Wrap Line Length✅✎

Less

#OptionExampleEdit
1End With Newline❌✎
2Indent Size✅✎
3Indent Style✅✎
4Max Preserve Newlines✅✎
5Newline Between Rules✅✎
6No Leading Zero✅✎
7Pragma Insert✅✎
8Pragma Require✅✎
9Quotes✅✎
10Remove Trailing Whitespace✅✎
11Wrap Line Length✅✎

Liquid

#OptionExampleEdit
1Brace Style❌✎
2End With Newline❌✎
3Indent Inner Html❌✎
4Indent Scripts❌✎
5Indent Size✅✎
6Indent Style✅✎
7Max Preserve Newlines❌✎
8Newline Before Tags❌✎
9Preserve Newlines❌✎
10Unformatted❌✎
11Wrap Attributes❌✎
12Wrap Attributes Indent Size❌✎
13Wrap Line Length❌✎

Markdown

#OptionExampleEdit
1Pragma Insert✅✎
2Pragma Require✅✎
3Wrap Line Length✅✎
4Wrap Prose✅✎

Mustache

#OptionExampleEdit
1Brace Style❌✎
2End With Newline❌✎
3Indent Inner Html❌✎
4Indent Scripts❌✎
5Indent Size✅✎
6Indent Style✅✎
7Max Preserve Newlines❌✎
8Newline Before Tags❌✎
9Preserve Newlines❌✎
10Unformatted❌✎
11Wrap Attributes❌✎
12Wrap Attributes Indent Size❌✎
13Wrap Line Length❌✎

Objective-C

#OptionExampleEdit

PHP

#OptionExampleEdit

Python

#OptionExampleEdit
1Indent Size✅✎
2Indent Style✅✎
3Wrap Line Length✅✎

Riot

#OptionExampleEdit
1Align Assignments❌✎
2Break Chained Methods❌✎
3End With Comma❌✎
4Indent Comments❌✎
5Indent Size✅✎
6Indent Style✅✎
7Max Preserve Newlines❌✎
8Multiline Ternary❌✎
9Quotes❌✎
10Space After Anon Function❌✎
11Wrap Line Length❌✎

SCSS

#OptionExampleEdit
1End With Newline❌✎
2Indent Size✅✎
3Indent Style✅✎
4Max Preserve Newlines✅✎
5Newline Between Rules✅✎
6No Leading Zero✅✎
7Pragma Insert✅✎
8Pragma Require✅✎
9Quotes✅✎
10Remove Trailing Whitespace✅✎
11Wrap Line Length✅✎

SQL

#OptionExampleEdit
1Identifier Case✅✎
2Indent Size✅✎
3Keyword Case✅✎

SVG

#OptionExampleEdit
1Force Indentation❌✎
2Indent Comments❌✎
3Indent Size✅✎
4Indent Style✅✎
5Max Preserve Newlines❌✎
6Quotes❌✎
7Wrap Line Length❌✎

Sass

#OptionExampleEdit
1End With Newline❌✎
2Indent Size✅✎
3Indent Style✅✎
4Quotes✅✎
5Remove Trailing Whitespace✅✎
6Wrap Line Length✅✎

Spacebars

#OptionExampleEdit
1Force Indentation❌✎
2Indent Comments❌✎
3Indent Size✅✎
4Indent Style✅✎
5Max Preserve Newlines❌✎
6Quotes❌✎
7Wrap Line Length❌✎

SugarSS

#OptionExampleEdit
1End With Newline✅✎
2Indent Size✅✎
3Indent Style✅✎
4Quotes✅✎
5Remove Trailing Whitespace✅✎
6Wrap Line Length✅✎

Swig

#OptionExampleEdit
1Align Assignments❌✎
2Break Chained Methods❌✎
3End With Comma❌✎
4Indent Comments❌✎
5Indent Size❌✎
6Indent Style❌✎
7Max Preserve Newlines❌✎
8Multiline Ternary❌✎
9Quotes❌✎
10Space After Anon Function❌✎
11Wrap Line Length❌✎

Titanium Style Sheets

#OptionExampleEdit
1Indent Size✅✎
2Indent Style✅✎
3Max Preserve Newlines❌✎
4Newline Between Rules❌✎
5No Leading Zero❌✎
6Quotes❌✎
7Wrap Line Length❌✎

Twig

#OptionExampleEdit
1Align Assignments❌✎
2Break Chained Methods❌✎
3End With Comma❌✎
4Indent Comments❌✎
5Indent Size✅✎
6Indent Style✅✎
7Max Preserve Newlines❌✎
8Multiline Ternary❌✎
9Quotes✅✎
10Space After Anon Function❌✎
11Wrap Line Length❌✎

TypeScript

#OptionExampleEdit
1Align Assignments✅✎
2Arrow Parens✅✎
3Break Chained Methods✅✎
4End With Comma✅✎
5End With Semicolon✅✎
6Indent Comments✅✎
7Indent Size✅✎
8Indent Style✅✎
9JSX Brackets✅✎
10Max Preserve Newlines✅✎
11Multiline Ternary✅✎
12Object Curly Spacing✅✎
13Pragma Insert✅✎
14Pragma Require✅✎
15Quotes✅✎
16Space After Anon Function✅✎
17Wrap Line Length✅✎

Visualforce

#OptionExampleEdit
1Force Indentation❌✎
2Indent Comments❌✎
3Indent Size✅✎
4Indent Style✅✎
5Max Preserve Newlines❌✎
6Quotes❌✎
7Wrap Line Length❌✎

Vue

#OptionExampleEdit
1Indent Size✅✎
2Indent Style✅✎
3Pragma Insert✅✎
4Pragma Require✅✎

XML

#OptionExampleEdit
1Brace Style✅✎
2End With Newline✅✎
3Force Indentation✅✎
4Indent Comments✅✎
5Indent Inner Html✅✎
6Indent Scripts✅✎
7Indent Size✅✎
8Indent Style✅✎
9Max Preserve Newlines✅✎
10Newline Before Tags✅✎
11Preserve Newlines✅✎
12Quotes✅✎
13Unformatted✅✎
14Wrap Attributes✅✎
15Wrap Attributes Indent Size✅✎
16Wrap Line Length✅✎

XTemplate

#OptionExampleEdit
1Force Indentation❌✎
2Indent Comments❌✎
3Indent Size✅✎
4Indent Style✅✎
5Max Preserve Newlines❌✎
6Quotes❌✎
7Wrap Line Length❌✎
← Editor IntegrationGitHub →
  • C
  • C#
  • C++
  • CSS
  • ColdFusion
  • EJS
  • Go
  • GraphQL
  • HTML
  • HTML+ERB
  • Handlebars
  • Haskell
  • JSON
  • JSON5
  • JSX
  • Java
  • JavaScript
  • Less
  • Liquid
  • Markdown
  • Mustache
  • Objective-C
  • PHP
  • Python
  • Riot
  • SCSS
  • SQL
  • SVG
  • Sass
  • Spacebars
  • SugarSS
  • Swig
  • Titanium Style Sheets
  • Twig
  • TypeScript
  • Visualforce
  • Vue
  • XML
  • XTemplate
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