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

ESLint Beautifier

npm downloads GitHub Stars GitHub Issues

Edit ESLint Beautifier

About

ESLint beautifier for Unibeautify

PackageDocsLatest
@unibeautify/beautifier-eslintv0.6.0npm
unibeautifyv0.17.1npm
eslintv4.19.1npm
eslint-plugin-reactv7.21.5npm

Install

Install with npm:

npm install --save-dev unibeautify eslint eslint-plugin-react @unibeautify/beautifier-eslint

Or with yarn:

yarn add --dev unibeautify eslint eslint-plugin-react @unibeautify/beautifier-eslint

Usage

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

{
  "LANGUAGE_NAME": {
    "beautifiers": [
      "ESLint"
    ]
  }
}

Note: The LANGUAGE_NAME should be replaced with your desired supported language name, such as JSX, JavaScript, etc.

Advanced

The following beautifier option(s) are supported:

  • prefer_beautifier_config

See beautifier options docs for more information.

Example advanced configuration:

{
  "LANGUAGE_NAME": {
    "beautifiers": [
      "ESLint"
    ],
    "ESLint": {
      "prefer_beautifier_config": true
    }
  }
}

Options

OptionJSXJavaScript
Arrow Parens✅✅
Brace Style✅✅
Break Chained Methods✅✅
Comma First✅✅
End With Comma✅✅
End With Newline✅✅
End With Semicolon✅✅
Indent Chained Methods✅✅
Indent Size✅✅
Indent Style✅✅
Keep Array Indentation✅✅
Object Curly Spacing✅✅
Quotes✅✅
Remove Trailing Whitespace✅✅
Space After Anon Function✅✅
Space Before Conditional✅✅
Space In Paren✅✅

FAQ

How to use ESLint in Atom, VSCode, and other editors?

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

How to use ESLint configuration file?

You can override Unibeautify configuration and use ESLint's own configuration file instead with prefer_beautifier_config beautifier option.

{
  "LANGUAGE_NAME": {
    "beautifiers": [
      "ESLint"
    ],
    "ESLint": {
      "prefer_beautifier_config": "path/to/ESLint/config/file"
    }
  }
}

See beautifier options docs for more information.

How to enable ESLint to format on save?

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

How to run ESLint on all files?

You can run ESLint on all of your files for every commit with Unibeautify CI.

Is there a ESLint sandbox or playground?

You can quickly try ESLint online with Unibeautify Playground.

← CSScombGofmt →
  • About
  • Install
  • Usage
    • Advanced
  • Options
  • FAQ
    • How to use ESLint in Atom, VSCode, and other editors?
    • How to use ESLint configuration file?
    • How to enable ESLint to format on save?
    • How to run ESLint on all files?
    • Is there a ESLint 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