Giter Club home page Giter Club logo

eclipse-formatter-profiles's Introduction

google-style-guide-javascript-eclipse

Eclipse JavaScript Code Formatter profile based on Google's Style Guide.

This was created by first importing Google's C++ profile and applying minor fixes to bring it closer to their JavaScript guide (some of the C++ settings weren't correctly imported).

ABANDONED!

I appreciate the role Eclipse played in the history of open-source development, but I no longer use it and I can't ever see myself returning. This project never perfectly mapped Google's style to Eclipse rules, and I haven't worked on this for 3 years.

Installation

  1. open Eclipse IDE
  2. open the Preferences window
  3. drill down: JavaScript -> Code Style -> Formatter
  4. click Import and select the provided XML file
  5. done!

Known Issues

Wrapping Binary and Ternary Operators

Google's JavaScript Style Guide states that when wrapping long lines with binary (e.g. +) and ternary operations (e.g. ? :), "Always put the operator on the preceding line, so that you don't have to think about implicit semi-colon insertion issues. Otherwise, line breaks and indentation follow the same rules as in other Google style guides."

Good

blah ?
    blah :
    blah;

Bad

blah
    ? blah
    : blah;

There doesn't seem to be an Eclipse setting to enforce this, so it is probably good practice to try and keep these lines short if you don't want Eclipse to break the rules.

eclipse-formatter-profiles's People

Contributors

jokeyrhyme avatar

Watchers

 avatar

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.