typescript-formatter icon indicating copy to clipboard operation
typescript-formatter copied to clipboard

Multiple blank lines not handled in all situations

Open myitcv opened this issue 10 years ago • 0 comments

Haven't had a chance to look into this yet, but the following:

declare const JSON: JSON;


/////////////////////////////
/// ECMAScript Array API (specially handled by compiler)
/////////////////////////////

when passed through tsfmt (assume this is the contents of app/lib.core.d.ts), doesn't result in formatted code that is valid:

$ cat app/lib.core.d.ts | tsfmt --stdin app/lib.core.d.ts | tsfmt --verify --stdin app/lib.dom.d.ts
app/lib.dom.d.ts is not formatted

Pass it through a second time and it is:

$ cat app/lib.core.d.ts | tsfmt --stdin app/lib.core.d.ts | tsfmt --stdin app/lib.core.d.ts | tsfmt --verify --stdin app/lib.dom.d.ts

myitcv avatar Oct 17 '15 18:10 myitcv