Unibeautify
  • Install
  • Docs
  • Assistant
  • Playground
  • GitHub

›Beautifiers

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

JS-Beautify Beautifier

npm downloads GitHub Stars GitHub Issues

Edit JS-Beautify Beautifier

About

JS-Beautify beautifier for Unibeautify

PackageDocsLatest
@unibeautify/beautifier-js-beautifyv0.4.0npm
js-beautifyv1.13.0npm
unibeautifyv0.17.1npm

Install

Install with npm:

npm install --save-dev js-beautify unibeautify @unibeautify/beautifier-js-beautify

Or with yarn:

yarn add --dev js-beautify unibeautify @unibeautify/beautifier-js-beautify

Usage

Add JS-Beautify to beautifiers language option. A .unibeautifyrc.json file would look like the following:

{
  "LANGUAGE_NAME": {
    "beautifiers": [
      "JS-Beautify"
    ]
  }
}

Note: The LANGUAGE_NAME should be replaced with your desired supported language name, such as CSS, EJS, HTML, etc.

Options

OptionCSSEJSHTMLHandlebarsJSONJSON5JSXJavaScriptLiquidMustacheXML
Brace Style❌✅✅✅❌❌✅✅✅✅✅
Break Chained Methods❌✅❌❌❌❌✅✅❌❌❌
Comma First❌✅❌❌❌❌✅✅❌❌❌
End With Newline✅✅✅✅❌❌✅✅✅✅✅
Indent Chained Methods❌✅❌❌❌❌✅✅❌❌❌
Indent Inner Html❌❌✅✅❌❌❌❌✅✅✅
Indent Scripts❌❌✅✅❌❌❌❌✅✅✅
Indent Size✅✅✅✅✅✅✅✅✅✅✅
Indent Style✅✅✅✅✅✅✅✅✅✅✅
JSLint Happy❌✅❌❌❌❌✅✅❌❌❌
Keep Array Indentation❌✅❌❌❌❌✅✅❌❌❌
Max Preserve Newlines❌✅✅✅❌❌✅✅✅✅✅
Newline Before Tags❌❌✅✅❌❌❌❌✅✅✅
Newline Between Rules✅❌❌❌❌❌❌❌❌❌❌
Preserve Newlines✅✅✅✅❌❌✅✅✅✅✅
Selector Separator Newline✅❌❌❌❌❌❌❌❌❌❌
Space After Anon Function❌✅❌❌❌❌✅✅❌❌❌
Space Before Conditional❌✅❌❌❌❌✅✅❌❌❌
Space In Empty Paren❌✅❌❌❌❌✅✅❌❌❌
Space In Paren❌✅❌❌❌❌✅✅❌❌❌
Unescape Strings❌✅❌❌❌❌✅✅❌❌❌
Unformatted❌❌✅✅❌❌❌❌✅✅✅
Wrap Attributes❌❌✅✅❌❌❌❌✅✅✅
Wrap Attributes Indent Size❌❌✅✅❌❌❌❌✅✅✅
Wrap Line Length✅✅✅✅❌❌✅✅✅✅✅

FAQ

How to use JS-Beautify in Atom, VSCode, and other editors?

See the editor integration documentation for installation instructions for your editor of choice.

How to enable JS-Beautify to format on save?

See the editor integration documentation for format on save instructions for your editor of choice.

How to run JS-Beautify on all files?

You can run JS-Beautify on all of your files for every commit with Unibeautify CI.

Is there a JS-Beautify sandbox or playground?

You can quickly try JS-Beautify online with Unibeautify Playground.

← GofmtPHP-CS-Fixer →
  • About
  • Install
  • Usage
  • Options
  • FAQ
    • How to use JS-Beautify in Atom, VSCode, and other editors?
    • How to enable JS-Beautify to format on save?
    • How to run JS-Beautify on all files?
    • Is there a JS-Beautify sandbox or playground?
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