GithubHelp home page GithubHelp logo

brackets-esformatter's Introduction

Brackets esformatter

Brackets Extension for formatting JavaScript files using esformatter version 0.8.1.

This is a shameless port of the excelent brackets-beautify that formats files using js-beautify. I've used it for some time, but never really liked the fact that lines break on every single bracket, even for very short objects, or ES6 import statements. esformatter on the other hand seems to have that covered!

Installation

Unfortunately, I couldn't get the extension uploaded into the Brackets Extension Registry, so currently it has to be installed manually.

  1. Clone the repository
  2. cd node
  3. npm install to install esformatter and its dependencies
  4. zip the whole thing and install using Brackets built-in Extension Manager.

For *nix systems, there's a build.sh that should do steps 1 through 3.

Configuration

The extension uses the tab character and tab size defined in the editor. Other than that, you can put an .esformatter file in the root of your project and the extension will use it. Or else, the extension will use the default configuration file, that can be found under node/node_modules/esformatter/lib/preset/default.json from where the extension is installed.

brackets-esformatter's People

Contributors

rjbma avatar

Watchers

 avatar  avatar  avatar

brackets-esformatter's Issues

Support formatting JSON

Apparently esformatterdoesn't format JSON

Maybe some dirty hack like adding 'var x = ' and removing it after formatting would do the trick for now?

Problem formatting json

if we configure esformatter to add a new line at the EOF, formatting json stops working because the last round bracket is not removed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.