Merge pull request #357 from yourpalal/master

Enable typescript-formatter defaults.
This commit is contained in:
Glavin Wiechert 2015-05-22 11:01:46 -03:00
commit 6b1a66037d
3 changed files with 46 additions and 45 deletions

View File

@ -5,7 +5,7 @@ module XYZ {
z
}
var zZz={
var zZz = {
a: 123,
b: 456
};
@ -15,9 +15,9 @@ enum En {
CD
}
var y=3;
var y = 3;
switch(y {
switch (y {
case X:
console.log("x");
break;
@ -25,12 +25,12 @@ switch(y {
console.log("y");
}
if(x===3) {
if(y===4) {
if (x === 3) {
if (y === 4) {
console.log("hey");
}
console.log("x");
x=y.hey
x = y.hey
.b
.c
.d;

View File

@ -11,8 +11,9 @@ module.exports = class TypeScriptFormatter extends Beautifier
return new @Promise((resolve, reject) =>
format = require("typescript-formatter/lib/formatter")
formatterUtils = require("typescript-formatter/lib/utils")
opts = {}
opts = formatterUtils.createDefaultFormatCodeOptions()
opts.TabSize = options.tab_width or options.indent_size
opts.IndentSize = options.indent_size
opts.IndentStyle = 'space'