Skip to content

Instantly share code, notes, and snippets.

@lordgreg
Created March 1, 2017 09:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordgreg/e35ddc160519fd382c3808c2b2b468ab to your computer and use it in GitHub Desktop.
Save lordgreg/e35ddc160519fd382c3808c2b2b468ab to your computer and use it in GitHub Desktop.

Before formatting

'use strict';
angular.module('main')
.controller('LoginCtrl', function (
  this.foo = 'bar';

  Service.myPromiseFunction()
  .then(function () {
    console.log('Service function done');
  });
));

After default VSCode formatting (ALT+SHIFT+F)

'use strict';
angular.module('main')
  .controller('LoginCtrl', function (
    this.foo = 'bar';

    Service.myPromiseFunction()
      .then(function () {
        console.log('Service function done');
    });
  ));

How it should be? Without changes from original code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment