Repository: jlongster/prettier
Pull request #205 (2017-01-14 20:16:13)

Add newline for empty blocks {}
I find it weird to put `{}` together. So I figured I would change it to have an empty line and ask for feedback :)

![image](https://cloud.githubusercontent.com/assets/197597/21739279/062adc80-d44c-11e6-8bb7-5e0768f3ddde.png)

Beware: most of the test cases are not representative of real code, you almost never define blocks with no content in practice.

jlongster: I think we should probably do this. It's come up once or twice and I think it is interrupting to collapse it in case you're in the middle of writing code and have a habit of formatting it (which tends to happen after using this for a while). It's annoying to have to un-collapse it to fill it in with code.
jlongster: Since nobody has argued against it, let's go ahead and do this. Do you mind rebasing?
vjeux: It is rebased

Patch:
diff --git a/package.json b/package.json
index 04c16ab22..5b682278e 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
     "esutils": "^2.0.2",
     "flow-parser": "^0.37.0",
     "get-stdin": "^5.0.1",
+    "jsesc": "^2.4.0",
     "minimist": "^1.2.0",
     "private": "^0.1.6"
   },
diff --git a/src/printer.js b/src/printer.js
index 4afe8c1f2..9711c87d5 100644
--- a/src/printer.js
+++ b/src/printer.js
@@ -25,6 +25,7 @@ var isObject = types.builtInTypes.object;
 var FastPath = require("./fast-path");
 var util = require("./util");
 var isIdentifierName = require("esutils").keyword.isIdentifierNameES6;
+var jsesc = require("jsesc");
 
 function Printer(originalOptions) {
   assert.ok(this instanceof Printer);
@@ -491,11 +492,6 @@ function genericPrintNoParens(path, options, print) {
       const hasContent = getFirstString(naked);
       const hasDirectives = n.directives && n.directives.length > 0;
 
-      // If there are no contents, return a simple block
-      if (!hasContent && !hasDirectives) {
-        return "{}";
-      }
-
       parts.push("{");
 
       // Babel 6
@@ -2127,12 +2123,6 @@ function lastNonSpaceCharacter(lines) {
   } while (lines.prevPos(pos));
 }
 
-function swapQuotes(str) {
-  return str.replace(/['"]/g, function(m) {
-    return m === '"' ? "'" : '"';
-  });
-}
-
 function nodeStr(str, options) {
   isString.assert(str);
 
@@ -2147,11 +2137,10 @@ function nodeStr(str, options) {
     shouldUseSingleQuote = true;
   }
 
-  if (shouldUseSingleQuote) {
-    return swapQuotes(JSON.stringify(swapQuotes(str)));
-  } else {
-    return JSON.stringify(str);
-  }
+  return jsesc(str, {
+    quotes: shouldUseSingleQuote ? 'single' : 'double',
+    wrap: true
+  });
 }
 
 function isFirstStatement(path) {


Test patch:
diff --git a/tests/abnormal/__snapshots__/jsfmt.spec.js.snap b/tests/abnormal/__snapshots__/jsfmt.spec.js.snap
index d8cbcd17d..204e04062 100644
--- a/tests/abnormal/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/abnormal/__snapshots__/jsfmt.spec.js.snap
@@ -30,7 +30,8 @@ function foo() {
     bar(x);
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function bar(x: number) {}
+function bar(x: number) {
+}
 function foo() {
   var x = null;
   if (x == null) return;
diff --git a/tests/annot/__snapshots__/jsfmt.spec.js.snap b/tests/annot/__snapshots__/jsfmt.spec.js.snap
index 250d32228..587e49d24 100644
--- a/tests/annot/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/annot/__snapshots__/jsfmt.spec.js.snap
@@ -172,7 +172,8 @@ exports[`test issue-530.js 1`] = `
 
 module.exports = foo;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function foo(...args: any) {}
+function foo(...args: any) {
+}
 
 module.exports = foo;
 "
diff --git a/tests/arith/__snapshots__/jsfmt.spec.js.snap b/tests/arith/__snapshots__/jsfmt.spec.js.snap
index c9efa9f60..37a6a6922 100644
--- a/tests/arith/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arith/__snapshots__/jsfmt.spec.js.snap
@@ -93,9 +93,11 @@ let tests = [
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @providesModule Arith */
 
-function num(x: number) {}
+function num(x: number) {
+}
 
-function str(x: string) {}
+function str(x: string) {
+}
 
 function foo() {
   var x = 0;
@@ -283,7 +285,8 @@ y *= 2; // error
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-function num(x: number) {}
+function num(x: number) {
+}
 
 num(null * 1);
 num(1 * null);
diff --git a/tests/arraylib/__snapshots__/jsfmt.spec.js.snap b/tests/arraylib/__snapshots__/jsfmt.spec.js.snap
index 3031ed92a..4530854c4 100644
--- a/tests/arraylib/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arraylib/__snapshots__/jsfmt.spec.js.snap
@@ -58,7 +58,8 @@ function from_test() {
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
-function foo(x: string) {}
+function foo(x: string) {
+}
 
 var a = [ 0 ];
 var b = a.map(function(x) {
diff --git a/tests/arrays/__snapshots__/jsfmt.spec.js.snap b/tests/arrays/__snapshots__/jsfmt.spec.js.snap
index 5f4208b26..8b9f6b5ec 100644
--- a/tests/arrays/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arrays/__snapshots__/jsfmt.spec.js.snap
@@ -41,7 +41,8 @@ module.exports = \"arrays\";
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @providesModule Arrays */
 
-function foo(x: string) {}
+function foo(x: string) {
+}
 
 var a = [];
 a[0] = 1;
diff --git a/tests/arrows/__snapshots__/jsfmt.spec.js.snap b/tests/arrows/__snapshots__/jsfmt.spec.js.snap
index 24c85d6b9..728c2470a 100644
--- a/tests/arrows/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/arrows/__snapshots__/jsfmt.spec.js.snap
@@ -28,7 +28,8 @@ var ident = <T>(x: T): T => x;
 exports[`test arrow_function_expression.js 1`] = `
 "(a => {}).length
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-(a => {}).length;
+(a => {
+}).length;
 "
 `;
 
@@ -62,7 +63,8 @@ exports[`test long-call-no-args.js 1`] = `
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 veryLongCall(
   VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_VERY_LONG_CONSTANT,
-  () => {}
+  () => {
+  }
 );
 "
 `;
diff --git a/tests/async/__snapshots__/jsfmt.spec.js.snap b/tests/async/__snapshots__/jsfmt.spec.js.snap
index d0b6434b0..463e39066 100644
--- a/tests/async/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/async/__snapshots__/jsfmt.spec.js.snap
@@ -171,24 +171,42 @@ console.log(x.async);
 var async = 3;
 var y = { async };
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-async function f() {}
-async function ft<T>(a: T) {}
+async function f() {
+}
+async function ft<T>(a: T) {
+}
 
 class C {
-  async m() {}
-  async mt<T>(a: T) {}
-  static async m(a) {}
-  static async mt<T>(a: T) {}
+  async m() {
+  }
+  async mt<T>(a: T) {
+  }
+  static async m(a) {
+  }
+  static async mt<T>(a: T) {
+  }
 }
 
-var e = async function() {};
-var et = async function<T>(a: T) {};
+var e = async function() {
+};
+var et = async function<T>(a: T) {
+};
 
-var n = new async function() {}();
+var n = new async function() {
+}();
 
-var o = { async m() {} };
-var ot = { async m<T>(a: T) {} };
-var oz = { async async() {} };
+var o = {
+  async m() {
+  }
+};
+var ot = {
+  async m<T>(a: T) {
+  }
+};
+var oz = {
+  async async() {
+  }
+};
 
 var x = { async: 5 };
 console.log(x.async);
@@ -236,7 +254,8 @@ async function foo2(): Promise<string> {
 }
 
 async function foo3(): Promise<string> {
-  function bar() {}
+  function bar() {
+  }
   return bar();
 }
 "
diff --git a/tests/binary/__snapshots__/jsfmt.spec.js.snap b/tests/binary/__snapshots__/jsfmt.spec.js.snap
index 9a91562f0..98d5a6fd2 100644
--- a/tests/binary/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/binary/__snapshots__/jsfmt.spec.js.snap
@@ -99,11 +99,14 @@ let tests = [
   },
   // in predicates
   function() {
-    if (\"foo\" in 123) {}
+    if (\"foo\" in 123) {
+    }
     // error
-    if (!\"foo\" in {}) {}
+    if (!\"foo\" in {}) {
+    }
     // error, !\'foo\' is a boolean
-    if (!(\"foo\" in {})) {}
+    if (!(\"foo\" in {})) {
+    }
   },
   // annotations on RHS
   function(x: Object, y: mixed) {
diff --git a/tests/binding/__snapshots__/jsfmt.spec.js.snap b/tests/binding/__snapshots__/jsfmt.spec.js.snap
index 25e74d4c7..effea2a9d 100644
--- a/tests/binding/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/binding/__snapshots__/jsfmt.spec.js.snap
@@ -410,16 +410,20 @@ function var_var() {
 
 // function x *
 function function_toplevel() {
-  function a() {}
+  function a() {
+  }
 
-  function a() {}
+  function a() {
+  }
 }
 
 function function_block() {
   {
-    function a() {}
+    function a() {
+    }
 
-    function a() {}
+    function a() {
+    }
   }
 }
 
@@ -443,7 +447,8 @@ function type_shadow_nested_scope() {
 }
 
 // fn params name clash
-function fn_params_name_clash(x, x /* error: x already bound */) {}
+function fn_params_name_clash(x, x /* error: x already bound */) {
+}
 function fn_params_clash_fn_binding(x, y) {
   let x = 0;
   // error: x already bound
@@ -631,32 +636,38 @@ function try_scope() {
 
 function for_scope_let() {
   let a: number = 0;
-  for (let a = \"\" /* ok: local to init */; ; ) {}
+  for (let a = \"\" /* ok: local to init */; ; ) {
+  }
 }
 
 function for_scope_var() {
   var a: number = 0;
-  for (var a = \"\" /* error: string ~> number */; ; ) {}
+  for (var a = \"\" /* error: string ~> number */; ; ) {
+  }
 }
 
 function for_in_scope_let(o: Object) {
   let a: number = 0;
-  for (let a /* ok: local to init */ in o) {}
+  for (let a /* ok: local to init */ in o) {
+  }
 }
 
 function for_in_scope_var(o: Object) {
   var a: number = 0;
-  for (var a /* error: string ~> number */ in o) {}
+  for (var a /* error: string ~> number */ in o) {
+  }
 }
 
 function for_of_scope_let(xs: string[]) {
   let a: number = 0;
-  for (let a /* ok: local to init */ of xs) {}
+  for (let a /* ok: local to init */ of xs) {
+  }
 }
 
 function for_of_scope_var(xs: string[]) {
   var a: number = 0;
-  for (var a /* error: string ~> number */ of xs) {}
+  for (var a /* error: string ~> number */ of xs) {
+  }
 }
 
 function default_param_1() {
diff --git a/tests/bom/__snapshots__/jsfmt.spec.js.snap b/tests/bom/__snapshots__/jsfmt.spec.js.snap
index 4c9fa199d..7754aeac8 100644
--- a/tests/bom/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/bom/__snapshots__/jsfmt.spec.js.snap
@@ -151,25 +151,34 @@ a.delete(\"xx\");
 a.delete(3);
 // incorrect
 // keys
-for (let x: string of a.keys()) {}
+for (let x: string of a.keys()) {
+}
 // correct
-for (let x: number of a.keys()) {}
+for (let x: number of a.keys()) {
+}
 // incorrect
 // values
-for (let x: string | File of a.values()) {}
+for (let x: string | File of a.values()) {
+}
 // correct
-for (let x: string | File | Blob of a.values()) {}
+for (let x: string | File | Blob of a.values()) {
+}
 // incorrect
 // entries
-for (let [ x, y ]: [string, string | File] of a.entries()) {}
+for (let [ x, y ]: [string, string | File] of a.entries()) {
+}
 // correct
-for (let [ x, y ]: [string, string | File | Blob] of a.entries()) {}
+for (let [ x, y ]: [string, string | File | Blob] of a.entries()) {
+}
 // incorrect
-for (let [ x, y ]: [number, string] of a.entries()) {}
+for (let [ x, y ]: [number, string] of a.entries()) {
+}
 // incorrect
-for (let [ x, y ]: [string, number] of a.entries()) {}
+for (let [ x, y ]: [string, number] of a.entries()) {
+}
 // incorrect
-for (let [ x, y ]: [number, number] of a.entries()) {} // incorrect
+for (let [ x, y ]: [number, number] of a.entries()) {
+} // incorrect
 "
 `;
 
@@ -217,13 +226,15 @@ const o: MutationObserver = new MutationObserver(callback);
 // correct
 new MutationObserver((arr: Array<MutationRecord>) => true);
 // correct
-new MutationObserver(() => {});
+new MutationObserver(() => {
+});
 // correct
 new MutationObserver();
 // incorrect
 new MutationObserver(42);
 // incorrect
-new MutationObserver((n: number) => {});
+new MutationObserver((n: number) => {
+});
 // incorrect
 // observe
 const div = document.createElement(\"div\");
diff --git a/tests/bounded_poly/__snapshots__/jsfmt.spec.js.snap b/tests/bounded_poly/__snapshots__/jsfmt.spec.js.snap
index d660a9d35..fba6afe28 100644
--- a/tests/bounded_poly/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/bounded_poly/__snapshots__/jsfmt.spec.js.snap
@@ -4,7 +4,8 @@ foo(0, \"\");
 
 function bar<X:number, Y:X>(x:X, y:Y): number { return y*0; }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function foo<X, Y: X>(x: X, y: Y): void {}
+function foo<X, Y: X>(x: X, y: Y): void {
+}
 foo(0, \"\");
 
 function bar<X: number, Y: X>(x: X, y: Y): number {
diff --git a/tests/builtins/__snapshots__/jsfmt.spec.js.snap b/tests/builtins/__snapshots__/jsfmt.spec.js.snap
index 2b71cffab..75b39770f 100644
--- a/tests/builtins/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/builtins/__snapshots__/jsfmt.spec.js.snap
@@ -63,7 +63,8 @@ class Foo<T> {
   map<U>(callbackfn: () => U): Foo<U> {
     return new Foo();
   }
-  set(x: T): void {}
+  set(x: T): void {
+  }
   get(): T {
     return this.x;
   }
diff --git a/tests/call_properties/__snapshots__/jsfmt.spec.js.snap b/tests/call_properties/__snapshots__/jsfmt.spec.js.snap
index a69ea1699..24509cde8 100644
--- a/tests/call_properties/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/call_properties/__snapshots__/jsfmt.spec.js.snap
@@ -106,13 +106,15 @@ var d: { (): string } = function(x: number): string {
 };
 
 // ...but subtyping rules still apply
-var e: { (x: any): void } = function() {};
+var e: { (x: any): void } = function() {
+};
 // arity
 var f: { (): mixed } = function(): string {
   return \"hi\";
 };
 // return type
-var g: { (x: string): void } = function(x: mixed) {};
+var g: { (x: string): void } = function(x: mixed) {
+};
 // param type
 // A function can be an object
 var y: {} = function(x: number): string {
@@ -261,13 +263,16 @@ f.myProp = 123;
 var c : { myProp: number } = f;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // Expecting properties that don\'t exist should be an error
-var a: { someProp: number } = function() {};
+var a: { someProp: number } = function() {
+};
 
 // Expecting properties that do exist should be fine
-var b: { apply: Function } = function() {};
+var b: { apply: Function } = function() {
+};
 
 // Expecting properties in the functions statics should be fine
-var f = function() {};
+var f = function() {
+};
 f.myProp = 123;
 var c: { myProp: number } = f;
 "
@@ -310,7 +315,8 @@ var c: { (x: string): string } = x => x.toFixed();
 var d: { (): string } = x => \"hi\";
 
 // ...but subtyping rules still apply
-var e: { (x: any): void } = () => {};
+var e: { (x: any): void } = () => {
+};
 // arity
 var f: { (): mixed } = () => \"hi\";
 // return type
diff --git a/tests/callable/__snapshots__/jsfmt.spec.js.snap b/tests/callable/__snapshots__/jsfmt.spec.js.snap
index bb912356b..f386a880e 100644
--- a/tests/callable/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/callable/__snapshots__/jsfmt.spec.js.snap
@@ -44,7 +44,8 @@ callable(0); // error, number ~> string
 callable.call(null, 0); // error, number ~> string
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 var x = Boolean(4);
-function foo(fn: (value: any) => boolean) {}
+function foo(fn: (value: any) => boolean) {
+}
 foo(Boolean);
 
 var dict: { [k: string]: any } = {};
diff --git a/tests/class_statics/__snapshots__/jsfmt.spec.js.snap b/tests/class_statics/__snapshots__/jsfmt.spec.js.snap
index c15b4776f..8cf1ec6f3 100644
--- a/tests/class_statics/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/class_statics/__snapshots__/jsfmt.spec.js.snap
@@ -64,15 +64,19 @@ module.exports = {
 class A {
   static x: number;
   static y: string;
-  static foo(x: number) {}
-  static bar(y: string) {}
+  static foo(x: number) {
+  }
+  static bar(y: string) {
+  }
 }
-A.qux = function(x: string) {};
+A.qux = function(x: string) {
+};
 // error?
 class B extends A {
   static x: string;
   // error?
-  static foo(x: string) {}
+  static foo(x: string) {
+  }
   // error?
   static main() {
     B.x = 0;
@@ -98,7 +102,8 @@ class B extends A {
 
 class C<X> {
   static x: X;
-  static bar(x: X) {}
+  static bar(x: X) {
+  }
   static create(): C<*> {
     return new this();
   }
diff --git a/tests/class_subtyping/__snapshots__/jsfmt.spec.js.snap b/tests/class_subtyping/__snapshots__/jsfmt.spec.js.snap
index 871374f24..431b531cd 100644
--- a/tests/class_subtyping/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/class_subtyping/__snapshots__/jsfmt.spec.js.snap
@@ -69,7 +69,8 @@ class C<X> {
   x: X;
 }
 
-function foo<X>(c: C<X>, x: X) {}
+function foo<X>(c: C<X>, x: X) {
+}
 
 type O = { f: number };
 
diff --git a/tests/class_type/__snapshots__/jsfmt.spec.js.snap b/tests/class_type/__snapshots__/jsfmt.spec.js.snap
index d512b80d6..738b41e66 100644
--- a/tests/class_type/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/class_type/__snapshots__/jsfmt.spec.js.snap
@@ -17,7 +17,8 @@ function foo(x: Class<A>): A {
 }
 
 class B {
-  constructor(_: any) {}
+  constructor(_: any) {
+  }
 }
 function bar(x: Class<B>): B {
   return new x(); // error (too few args)
diff --git a/tests/classes/__snapshots__/jsfmt.spec.js.snap b/tests/classes/__snapshots__/jsfmt.spec.js.snap
index 0b099123d..438638244 100644
--- a/tests/classes/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/classes/__snapshots__/jsfmt.spec.js.snap
@@ -6,7 +6,8 @@ exports[`test A.js 1`] = `
 module.exports = A;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class A {
-  foo(x: number): void {}
+  foo(x: number): void {
+  }
 }
 
 module.exports = A;
@@ -49,7 +50,8 @@ module.exports = C;
 var B = require(\"./B\");
 
 class C extends B {
-  foo(x: string): void {}
+  foo(x: string): void {
+  }
 }
 
 let c = new C();
diff --git a/tests/closure/__snapshots__/jsfmt.spec.js.snap b/tests/closure/__snapshots__/jsfmt.spec.js.snap
index 42eae2706..740bb6e7d 100644
--- a/tests/closure/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/closure/__snapshots__/jsfmt.spec.js.snap
@@ -85,13 +85,15 @@ function local_meth() {
  * @flow
  */
 
-function takes_string(_: string) {}
+function takes_string(_: string) {
+}
 
 // global write from function
 //
 var global_x = \"hello\";
 
-function global_f() {}
+function global_f() {
+}
 function global_g() {
   global_x = 42;
 }
@@ -109,7 +111,8 @@ global_x = 42;
 function local_func() {
   var local_x = \"hello\";
 
-  function local_f() {}
+  function local_f() {
+  }
   function local_g() {
     local_x = 42;
   }
@@ -128,7 +131,8 @@ function local_func() {
 var global_y = \"hello\";
 
 var global_o = {
-  f: function() {},
+  f: function() {
+  },
   g: function() {
     global_y = 42;
   }
@@ -148,7 +152,8 @@ function local_meth() {
   var local_y = \"hello\";
 
   var local_o = {
-    f: function() {},
+    f: function() {
+    },
     g: function() {
       local_y = 42;
     }
@@ -253,7 +258,8 @@ call_me();
  */
 
 // global, anybody can call it at any time
-var call_me: () => void = () => {};
+var call_me: () => void = () => {
+};
 
 function g(x: ?number) {
   const const_x = x;
diff --git a/tests/commonjs/__snapshots__/jsfmt.spec.js.snap b/tests/commonjs/__snapshots__/jsfmt.spec.js.snap
index 671e7cb5d..7c1b434b8 100644
--- a/tests/commonjs/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/commonjs/__snapshots__/jsfmt.spec.js.snap
@@ -4,7 +4,8 @@ function f(x:string) { }
 
 module.exports = f;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function f(x: string) {}
+function f(x: string) {
+}
 
 module.exports = f;
 "
diff --git a/tests/constructor/__snapshots__/jsfmt.spec.js.snap b/tests/constructor/__snapshots__/jsfmt.spec.js.snap
index e0326bbe3..dedcd22fa 100644
--- a/tests/constructor/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/constructor/__snapshots__/jsfmt.spec.js.snap
@@ -10,11 +10,13 @@ class D {
 module.exports = C;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class C {
-  constructor() {}
+  constructor() {
+  }
 }
 
 class D {
-  constructor(): number {}
+  constructor(): number {
+  }
 }
 
 module.exports = C;
diff --git a/tests/coverage/__snapshots__/jsfmt.spec.js.snap b/tests/coverage/__snapshots__/jsfmt.spec.js.snap
index 8558ef841..5efd3bf05 100644
--- a/tests/coverage/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/coverage/__snapshots__/jsfmt.spec.js.snap
@@ -11,12 +11,14 @@ declare module bar {
 
 // TODO
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-declare module foo {}
+declare module foo {
+}
 // TODO
 // This file triggers a violation of the \"disjoint-or-nested ranges invariant\"
 // that we implicitly assume in type-at-pos and coverage implementations. In
 // particular, when unchecked it causes a crash with coverage --color.
-declare module bar {}
+declare module bar {
+}
 "
 `;
 
@@ -28,7 +30,8 @@ declare module foo {
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // check coverage of declare module
 
-declare module foo {}
+declare module foo {
+}
 "
 `;
 
@@ -57,11 +60,13 @@ declare module bar {
 declare class qux {
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-declare module foo {}
+declare module foo {
+}
 // This file triggers a violation of the \"disjoint-or-nested ranges invariant\"
 // that we implicitly assume in type-at-pos and coverage implementations. In
 // particular, when unchecked it causes non-termination with coverage --color.
-declare module bar {}
+declare module bar {
+}
 // TODO
 declare class qux {}
 "
diff --git a/tests/destructuring/__snapshots__/jsfmt.spec.js.snap b/tests/destructuring/__snapshots__/jsfmt.spec.js.snap
index ebfacac4d..11bd677f3 100644
--- a/tests/destructuring/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/destructuring/__snapshots__/jsfmt.spec.js.snap
@@ -211,13 +211,17 @@ var {
 };
 (p: void);
 // error: string ~> void
-function obj_prop_err({ x: { y } } = null) {}
+function obj_prop_err({ x: { y } } = null) {
+}
 // error: property \`x\` cannot be accessed on null
-function obj_rest_err({ ...o } = 0) {}
+function obj_rest_err({ ...o } = 0) {
+}
 // error: expected object instead of number
-function arr_elem_err([ x ] = null) {}
+function arr_elem_err([ x ] = null) {
+}
 // error: element 0 cannot be accessed on null
-function arr_rest_err([ ...a ] = null) {}
+function arr_rest_err([ ...a ] = null) {
+}
 // error: expected array instead of null
 function gen<T>(x: T, { p = x }: { p: T }): T {
   return p;
@@ -229,14 +233,19 @@ obj_prop_fun(({}: { p?: { q?: null } }));
 obj_prop_var(({}: { p?: { q?: null } }));
 // ok
 // union-like upper bounds preserved through destructuring
-function obj_prop_opt({ p }: { p?: string } = { p: 0 }) {}
-function obj_prop_maybe({ p }: { p: ?string } = { p: 0 }) {}
-function obj_prop_union({ p }: { p: number | string } = { p: true }) {}
+function obj_prop_opt({ p }: { p?: string } = { p: 0 }) {
+}
+function obj_prop_maybe({ p }: { p: ?string } = { p: 0 }) {
+}
+function obj_prop_union({ p }: { p: number | string } = { p: true }) {
+}
 
 // TODO: union-of-objects upper bounds preserved through destructuring
-function obj_prop_union2({ p }: { p: number } | { p: string } = { p: true }) {}
+function obj_prop_union2({ p }: { p: number } | { p: string } = { p: true }) {
+}
 
-function default_expr_scope({ a, b = a }) {}
+function default_expr_scope({ a, b = a }) {
+}
 "
 `;
 
@@ -342,9 +351,11 @@ bar({ x: \"\", y: 0 });
 var spread = { y: \"\" };
 var extend: { x: number, y: string, z: boolean } = { x: 0, ...spread };
 
-function qux(_: { a: number }) {}
+function qux(_: { a: number }) {
+}
 qux({ a: \"\" });
-function corge({ b }: { b: string }) {}
+function corge({ b }: { b: string }) {
+}
 corge({ b: 0 });
 
 var { n }: { n: number } = { n: \"\" };
@@ -463,24 +474,32 @@ function arr_rest_pattern<X>([ _, ...a ] : ArrRest<X>) { // a: [X]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 
-function obj_pattern<X>({ prop }: { prop: X }) {}
+function obj_pattern<X>({ prop }: { prop: X }) {
+}
 // prop: X
 type Prop<X> = { prop: X };
-function obj_pattern2<X>({ prop }: Prop<X>) {}
+function obj_pattern2<X>({ prop }: Prop<X>) {
+}
 // prop: X
-function arr_pattern<X>([ elem ]: X[]) {}
+function arr_pattern<X>([ elem ]: X[]) {
+}
 // elem: X
 type Elem<X> = X[];
-function arr_pattern2<X>([ elem ]: Elem<X>) {}
+function arr_pattern2<X>([ elem ]: Elem<X>) {
+}
 // elem: X
-function tup_pattern<X>([ proj ]: [X]) {}
+function tup_pattern<X>([ proj ]: [X]) {
+}
 // proj: X
 type Proj<X> = [X];
-function tup_pattern2<X>([ proj ]: Proj<X>) {}
+function tup_pattern2<X>([ proj ]: Proj<X>) {
+}
 // proj: X
-function rest_antipattern<T>(...t: T) {}
+function rest_antipattern<T>(...t: T) {
+}
 // nonsense
-function rest_pattern<X>(...r: X[]) {}
+function rest_pattern<X>(...r: X[]) {
+}
 // r: X[]
 function obj_rest_pattern<X>({ _, ...o }: { _: any, x: X }) {
   // o: { x: X }
diff --git a/tests/dom/__snapshots__/jsfmt.spec.js.snap b/tests/dom/__snapshots__/jsfmt.spec.js.snap
index b35f0dcb6..d43956262 100644
--- a/tests/dom/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/dom/__snapshots__/jsfmt.spec.js.snap
@@ -300,7 +300,8 @@ let tests = [
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 
-let listener: EventListener = function(event: Event): void {};
+let listener: EventListener = function(event: Event): void {
+};
 
 let tests = [
   // attachEvent
@@ -422,16 +423,26 @@ let tests = [
   function() {
     document.registerElement(\"custom-element\", {
       prototype: Object.create(HTMLElement.prototype, {
-        createdCallback: { value: function createdCallback() {} },
-        attachedCallback: { value: function attachedCallback() {} },
-        detachedCallback: { value: function detachedCallback() {} },
+        createdCallback: {
+          value: function createdCallback() {
+          }
+        },
+        attachedCallback: {
+          value: function attachedCallback() {
+          }
+        },
+        detachedCallback: {
+          value: function detachedCallback() {
+          }
+        },
         attributeChangedCallback: {
           value: function attributeChangedCallback(
             attributeLocalName,
             oldAttributeValue,
             newAttributeValue,
             attributeNamespace
-          ) {}
+          ) {
+          }
         }
       })
     });
@@ -440,15 +451,19 @@ let tests = [
   function() {
     document.registerElement(\"custom-element\", {
       prototype: Object.assign(Object.create(HTMLElement.prototype), {
-        createdCallback() {},
-        attachedCallback() {},
-        detachedCallback() {},
+        createdCallback() {
+        },
+        attachedCallback() {
+        },
+        detachedCallback() {
+        },
         attributeChangedCallback(
           attributeLocalName,
           oldAttributeValue,
           newAttributeValue,
           attributeNamespace
-        ) {}
+        ) {
+        }
       })
     });
   },
@@ -463,7 +478,8 @@ let tests = [
           newVal: string,
           // Error: This might be null
           namespace: string
-        ) {}
+        ) {
+        }
       }
     });
   }
diff --git a/tests/dump-types/__snapshots__/jsfmt.spec.js.snap b/tests/dump-types/__snapshots__/jsfmt.spec.js.snap
index 4a861550a..1ee68a6e3 100644
--- a/tests/dump-types/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/dump-types/__snapshots__/jsfmt.spec.js.snap
@@ -7,7 +7,8 @@ module.exports = num;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 var num = 42;
-function bar() {}
+function bar() {
+}
 bar();
 module.exports = num;
 "
@@ -38,7 +39,8 @@ const idxResult = idx(obj, obj => obj.a.b.c.d);
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 var num = require(\"./import\");
-function foo(x) {}
+function foo(x) {
+}
 foo(0);
 var a: string = num;
 
diff --git a/tests/duplicate_methods/__snapshots__/jsfmt.spec.js.snap b/tests/duplicate_methods/__snapshots__/jsfmt.spec.js.snap
index 8eb108bc9..644e80150 100644
--- a/tests/duplicate_methods/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/duplicate_methods/__snapshots__/jsfmt.spec.js.snap
@@ -36,8 +36,10 @@ class C5 {
 new C5().m = new C5().m - 42;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class C1 {
-  m() {}
-  m() {}
+  m() {
+  }
+  m() {
+  }
 }
 
 new C1().m();
@@ -46,14 +48,17 @@ class C2 {
   get m() {
     return 42;
   }
-  m() {}
+  m() {
+  }
 }
 
 new C2().m();
 
 class C3 {
-  set m(x) {}
-  m() {}
+  set m(x) {
+  }
+  m() {
+  }
 }
 
 new C3().m();
@@ -62,17 +67,20 @@ class C4 {
   get m() {
     return 42;
   }
-  set m(x: number) {}
+  set m(x: number) {
+  }
 }
 
 new C4().m = new C4().m - 42;
 
 class C5 {
-  m() {}
+  m() {
+  }
   get m() {
     return 42;
   }
-  set m(x: number) {}
+  set m(x: number) {
+  }
 }
 
 new C5().m = new C5().m - 42;
diff --git a/tests/error_messages/__snapshots__/jsfmt.spec.js.snap b/tests/error_messages/__snapshots__/jsfmt.spec.js.snap
index 23fd81f9f..586bafed0 100644
--- a/tests/error_messages/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/error_messages/__snapshots__/jsfmt.spec.js.snap
@@ -1,6 +1,7 @@
 exports[`test errors.js 1`] = `
 "if (typeof define === \'function\' && define.amd) { }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-if (typeof define === \"function\" && define.amd) {}
+if (typeof define === \"function\" && define.amd) {
+}
 "
 `;
diff --git a/tests/facebookisms/__snapshots__/jsfmt.spec.js.snap b/tests/facebookisms/__snapshots__/jsfmt.spec.js.snap
index 0481d54ca..71dbf0fce 100644
--- a/tests/facebookisms/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/facebookisms/__snapshots__/jsfmt.spec.js.snap
@@ -79,7 +79,8 @@ let tests = [
   },
   // passed as a function
   function(copyProperties: Object$Assign) {
-    function x(cb: Function) {}
+    function x(cb: Function) {
+    }
     x(copyProperties);
   }
 ];
@@ -205,7 +206,8 @@ let tests = [
   },
   // passed as a function
   function(mergeInto: $Facebookism$MergeInto) {
-    function x(cb: Function) {}
+    function x(cb: Function) {
+    }
     x(mergeInto);
   }
 ];
diff --git a/tests/fetch/__snapshots__/jsfmt.spec.js.snap b/tests/fetch/__snapshots__/jsfmt.spec.js.snap
index dbfddbae8..9a12618a4 100644
--- a/tests/fetch/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/fetch/__snapshots__/jsfmt.spec.js.snap
@@ -117,7 +117,8 @@ for (let v of e.entries()) {
   const [ i, j ]: [string, string] = v; // correct
 }
 
-e.getAll(\"content-type\").forEach((v: string) => {}); // correct
+e.getAll(\"content-type\").forEach((v: string) => {
+}); // correct
 "
 `;
 
@@ -390,6 +391,7 @@ for (let v of e.entries()) {
   const [ i, j ]: [string, string] = v; // correct
 }
 
-e.getAll(\"key1\").forEach((v: string) => {}); // correct
+e.getAll(\"key1\").forEach((v: string) => {
+}); // correct
 "
 `;
diff --git a/tests/for/__snapshots__/jsfmt.spec.js.snap b/tests/for/__snapshots__/jsfmt.spec.js.snap
index 2f651c203..e9bcb4c28 100644
--- a/tests/for/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/for/__snapshots__/jsfmt.spec.js.snap
@@ -285,7 +285,9 @@ exports[`test for.js 1`] = `
 "for (;;) {}
 for (var i = 0; i < 10; ++i) {}
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-for (;;) {}
-for (var i = 0; i < 10; ++i) {}
+for (;;) {
+}
+for (var i = 0; i < 10; ++i) {
+}
 "
 `;
diff --git a/tests/function/__snapshots__/jsfmt.spec.js.snap b/tests/function/__snapshots__/jsfmt.spec.js.snap
index 56ae4a714..e33bd50d5 100644
--- a/tests/function/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/function/__snapshots__/jsfmt.spec.js.snap
@@ -308,7 +308,8 @@ function bad(x: Function, y: Object): void {
 
 let tests = [
   function(y: () => void, z: Function) {
-    function x() {}
+    function x() {
+    }
     (x.length: void);
     // error, it\'s a number
     (y.length: void);
@@ -322,7 +323,8 @@ let tests = [
     (z.name: void); // error, it\'s a string
   },
   function(y: () => void, z: Function) {
-    function x() {}
+    function x() {
+    }
     x.length = \"foo\";
     // error, it\'s a number
     y.length = \"foo\";
diff --git a/tests/generators/__snapshots__/jsfmt.spec.js.snap b/tests/generators/__snapshots__/jsfmt.spec.js.snap
index d6b71521e..c4453cee9 100644
--- a/tests/generators/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/generators/__snapshots__/jsfmt.spec.js.snap
@@ -164,9 +164,9 @@ class GeneratorExamples {
 
   *widen_next() {
     var x = yield 0;
-    if (typeof x === \"number\") {}
-    else if (typeof x === \"boolean\") {}
-    else {
+    if (typeof x === \"number\") {
+    } else if (typeof x === \"boolean\") {
+    } else {
       (x: string); // ok, sherlock
     }
   }
@@ -234,9 +234,9 @@ for (var x of examples.infer_stmt()) {
 // error: number ~> string
 var infer_stmt_next = examples.infer_stmt().next(0).value;
 // error: number ~> boolean
-if (typeof infer_stmt_next === \"undefined\") {}
-else if (typeof infer_stmt_next === \"number\") {}
-else {
+if (typeof infer_stmt_next === \"undefined\") {
+} else if (typeof infer_stmt_next === \"number\") {
+} else {
   (infer_stmt_next: boolean); // error: string ~> boolean
 }
 
@@ -245,9 +245,9 @@ examples.widen_next().next(\"\");
 examples.widen_next().next(true);
 
 for (var x of examples.widen_yield()) {
-  if (typeof x === \"number\") {}
-  else if (typeof x === \"boolean\") {}
-  else {
+  if (typeof x === \"number\") {
+  } else if (typeof x === \"boolean\") {
+  } else {
     (x: string); // ok, sherlock
   }
 }
@@ -306,9 +306,9 @@ for (var x of examples.infer_stmt()) {
 // error: number ~> string
 var infer_stmt_next = examples.infer_stmt().next(0).value;
 // error: number ~> boolean
-if (typeof infer_stmt_next === \"undefined\") {}
-else if (typeof infer_stmt_next === \"number\") {}
-else {
+if (typeof infer_stmt_next === \"undefined\") {
+} else if (typeof infer_stmt_next === \"number\") {
+} else {
   (infer_stmt_next: boolean); // error: string ~> boolean
 }
 "
@@ -481,17 +481,17 @@ for (var x of infer_stmt()) {
 // error: number ~> string
 var infer_stmt_next = infer_stmt().next(0).value;
 // error: number ~> boolean
-if (typeof infer_stmt_next === \"undefined\") {}
-else if (typeof infer_stmt_next === \"number\") {}
-else {
+if (typeof infer_stmt_next === \"undefined\") {
+} else if (typeof infer_stmt_next === \"number\") {
+} else {
   (infer_stmt_next: boolean); // error: string ~> boolean
 }
 
 function* widen_next() {
   var x = yield 0;
-  if (typeof x === \"number\") {}
-  else if (typeof x === \"boolean\") {}
-  else {
+  if (typeof x === \"number\") {
+  } else if (typeof x === \"boolean\") {
+  } else {
     (x: string); // ok, sherlock
   }
 }
@@ -505,9 +505,9 @@ function* widen_yield() {
   yield true;
 }
 for (var x of widen_yield()) {
-  if (typeof x === \"number\") {}
-  else if (typeof x === \"boolean\") {}
-  else {
+  if (typeof x === \"number\") {
+  } else if (typeof x === \"boolean\") {
+  } else {
     (x: string); // ok, sherlock
   }
 }
diff --git a/tests/get-def2/__snapshots__/jsfmt.spec.js.snap b/tests/get-def2/__snapshots__/jsfmt.spec.js.snap
index e8a1cee63..f1ef42351 100644
--- a/tests/get-def2/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/get-def2/__snapshots__/jsfmt.spec.js.snap
@@ -78,7 +78,8 @@ class D extends C {
 // @flow
 
 class C {
-  override() {}
+  override() {
+  }
 }
 
 class D extends C {
@@ -88,7 +89,8 @@ class D extends C {
   bar() {
     this.override;
   }
-  override() {}
+  override() {
+  }
 }
 "
 `;
diff --git a/tests/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap b/tests/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap
index 0344d7036..41bc82686 100644
--- a/tests/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/getters_and_setters_enabled/__snapshots__/jsfmt.spec.js.snap
@@ -79,16 +79,19 @@ class Foo {
   get propWithMatchingGetterAndSetter(): number {
     return 4;
   }
-  set propWithMatchingGetterAndSetter(x: number) {}
+  set propWithMatchingGetterAndSetter(x: number) {
+  }
 
   // The getter and setter need not have the same type - no error
   get propWithSubtypingGetterAndSetter(): ?number {
     return 4;
   }
-  set propWithSubtypingGetterAndSetter(x: number) {}
+  set propWithSubtypingGetterAndSetter(x: number) {
+  }
 
   // The getter and setter need not have the same type - no error
-  set propWithSubtypingGetterAndSetterReordered(x: number) {}
+  set propWithSubtypingGetterAndSetterReordered(x: number) {
+  }
   get propWithSubtypingGetterAndSetterReordered(): ?number {
     return 4;
   }
@@ -96,7 +99,8 @@ class Foo {
   get propWithMismatchingGetterAndSetter(): number {
     return 4;
   }
-  set propWithMismatchingGetterAndSetter(x: string) {}
+  set propWithMismatchingGetterAndSetter(x: string) {
+  }
   // doesn\'t match getter (OK)
   propOverriddenWithGetter: number;
   get propOverriddenWithGetter() {
@@ -104,7 +108,8 @@ class Foo {
   }
 
   propOverriddenWithSetter: number;
-  set propOverriddenWithSetter(x: string) {}
+  set propOverriddenWithSetter(x: string) {
+  }
 }
 
 var foo = new Foo();
@@ -222,14 +227,17 @@ var obj = {
   get propWithMatchingGetterAndSetter(): number {
     return 4;
   },
-  set propWithMatchingGetterAndSetter(x: number) {},
+  set propWithMatchingGetterAndSetter(x: number) {
+  },
   // The getter and setter need not have the same type
   get propWithSubtypingGetterAndSetter(): ?number {
     return 4;
   },
   // OK
-  set propWithSubtypingGetterAndSetter(x: number) {},
-  set propWithSubtypingGetterAndSetterReordered(x: number) {},
+  set propWithSubtypingGetterAndSetter(x: number) {
+  },
+  set propWithSubtypingGetterAndSetterReordered(x: number) {
+  },
   // OK
   get propWithSubtypingGetterAndSetterReordered(): ?number {
     return 4;
@@ -237,8 +245,10 @@ var obj = {
   get exampleOfOrderOfGetterAndSetter(): A {
     return new A();
   },
-  set exampleOfOrderOfGetterAndSetter(x: B) {},
-  set exampleOfOrderOfGetterAndSetterReordered(x: B) {},
+  set exampleOfOrderOfGetterAndSetter(x: B) {
+  },
+  set exampleOfOrderOfGetterAndSetterReordered(x: B) {
+  },
   get exampleOfOrderOfGetterAndSetterReordered(): A {
     return new A();
   }
@@ -415,7 +425,8 @@ class Base {
 
 (class extends Base {
   // error: setter incompatible with read/write property
-  set x(value: B): void {}
+  set x(value: B): void {
+  }
 });
 
 (class extends Base {
@@ -423,12 +434,14 @@ class Base {
   get x(): C {
     return c;
   }
-  set x(value: A): void {}
+  set x(value: A): void {
+  }
 });
 
 (class extends Base {
   // error: setter incompatible with read-only property
-  set pos(value: B): void {}
+  set pos(value: B): void {
+  }
 });
 
 (class extends Base {
@@ -447,7 +460,8 @@ class Base {
 
 (class extends Base {
   // ok: setter contravariant with write-only property
-  set neg(value: A): void {}
+  set neg(value: A): void {
+  }
 });
 
 (class extends Base {
diff --git a/tests/init/__snapshots__/jsfmt.spec.js.snap b/tests/init/__snapshots__/jsfmt.spec.js.snap
index 7482a041d..37571c74e 100644
--- a/tests/init/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/init/__snapshots__/jsfmt.spec.js.snap
@@ -53,42 +53,48 @@ function _for_of(arr: Array<number>) {
 
 function _if(b: () => boolean) {
   if (b()) {
-    var f = function() {};
+    var f = function() {
+    };
   }
   f(); // error, possibly undefined
 }
 
 function _while(b: () => boolean) {
   while (b()) {
-    var f = function() {};
+    var f = function() {
+    };
   }
   f(); // error, possibly undefined
 }
 
 function _do_while(b: () => boolean) {
   do {
-    var f = function() {};
+    var f = function() {
+    };
   } while (b());
   f(); // ok
 }
 
 function _for(n: number) {
   for (var i = 0; i < n; i++) {
-    var f = function() {};
+    var f = function() {
+    };
   }
   f(); // error, possibly undefined
 }
 
 function _for_in(obj: Object) {
   for (var p in obj) {
-    var f = function() {};
+    var f = function() {
+    };
   }
   f(); // error, possibly undefined
 }
 
 function _for_of(arr: Array<number>) {
   for (var x of arr) {
-    var f = function() {};
+    var f = function() {
+    };
   }
   f(); // error, possibly undefined
 }
diff --git a/tests/interface/__snapshots__/jsfmt.spec.js.snap b/tests/interface/__snapshots__/jsfmt.spec.js.snap
index 73bb233d8..11a81a470 100644
--- a/tests/interface/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/interface/__snapshots__/jsfmt.spec.js.snap
@@ -186,10 +186,12 @@ declare class C {
 new C().bar((x: string) => { }); // error, number ~/~> string
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 interface I { foo(x: number): void }
-(function foo(x: number) {}: I);
+(function foo(x: number) {
+}: I);
 // error, property \`foo\` not found function
 declare class C { bar(i: I): void, bar(f: (x: number) => void): void }
 
-new C().bar((x: string) => {}); // error, number ~/~> string
+new C().bar((x: string) => {
+}); // error, number ~/~> string
 "
 `;
diff --git a/tests/iter/__snapshots__/jsfmt.spec.js.snap b/tests/iter/__snapshots__/jsfmt.spec.js.snap
index e73f61f29..bfd088d91 100644
--- a/tests/iter/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/iter/__snapshots__/jsfmt.spec.js.snap
@@ -38,7 +38,8 @@ for (var y in this) {
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 var a = [ true, false ];
-function foo(x) {}
+function foo(x) {
+}
 
 for (var i = 0; i < 3; i++) {
   foo(a[i]);
@@ -70,6 +71,7 @@ for (var x in null) {
   foo(x); // unreachable
 }
 
-for (var y in this) {}
+for (var y in this) {
+}
 "
 `;
diff --git a/tests/lib/__snapshots__/jsfmt.spec.js.snap b/tests/lib/__snapshots__/jsfmt.spec.js.snap
index bf7befa3a..b784a4796 100644
--- a/tests/lib/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/lib/__snapshots__/jsfmt.spec.js.snap
@@ -20,6 +20,7 @@ var a = new Map();
 a.delete(\"foobar\");
 
 var b = undefined;
-if (undefined) {}
+if (undefined) {
+}
 "
 `;
diff --git a/tests/literal/__snapshots__/jsfmt.spec.js.snap b/tests/literal/__snapshots__/jsfmt.spec.js.snap
index 655ae21ee..38f2ef1d3 100644
--- a/tests/literal/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/literal/__snapshots__/jsfmt.spec.js.snap
@@ -37,11 +37,13 @@ var red:string = tuple[indices.red]; // error: tuple[0] is a number
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 var APIKeys = require(\"./enum\");
 // object that maps \"AGE\" to \"age\", \"NAME\" to \"name\"
-function foo(x: $Keys<typeof APIKeys>) {}
+function foo(x: $Keys<typeof APIKeys>) {
+}
 foo(\"AGE\");
 foo(\"LOCATION\");
 // error
-function bar(x: $Keys<{ age: number }>) {}
+function bar(x: $Keys<{ age: number }>) {
+}
 bar(APIKeys.AGE);
 // not an error: APIKeys.AGE = \"age\"
 bar(APIKeys.NAME);
diff --git a/tests/locals/__snapshots__/jsfmt.spec.js.snap b/tests/locals/__snapshots__/jsfmt.spec.js.snap
index 030a1f806..f9545040c 100644
--- a/tests/locals/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/locals/__snapshots__/jsfmt.spec.js.snap
@@ -159,7 +159,8 @@ var x: string = 0;
 var x: number = 1;
 
 //declare var T: $Type<number | Array<T>>;
-function foo(p: boolean) {}
+function foo(p: boolean) {
+}
 
 function sorry(really: boolean) {
   if (really) {
diff --git a/tests/method_properties/__snapshots__/jsfmt.spec.js.snap b/tests/method_properties/__snapshots__/jsfmt.spec.js.snap
index 912b0405f..67f22cd84 100644
--- a/tests/method_properties/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/method_properties/__snapshots__/jsfmt.spec.js.snap
@@ -36,9 +36,12 @@ function f(x) {
 f(foo);
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class C {
-  C() {}
-  foo() {}
-  static bar() {}
+  C() {
+  }
+  foo() {
+  }
+  static bar() {
+  }
   qux() {
     this.constructor.x;
   }
diff --git a/tests/misc/__snapshots__/jsfmt.spec.js.snap b/tests/misc/__snapshots__/jsfmt.spec.js.snap
index a62ca5f16..e21fb02c8 100644
--- a/tests/misc/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/misc/__snapshots__/jsfmt.spec.js.snap
@@ -21,7 +21,8 @@ module.exports = {};
 var A = { x: true, ...{} };
 module.exports.cls = A;
 
-function f(x: boolean) {}
+function f(x: boolean) {
+}
 module.exports.fn = f;
 
 A.y = \"?\";
@@ -146,7 +147,8 @@ module.exports = {obj: o};
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @providesModule E */
 
-function h(x: number) {}
+function h(x: number) {
+}
 var proto = { fn: h };
 
 var o = Object.create(proto);
diff --git a/tests/modules/__snapshots__/jsfmt.spec.js.snap b/tests/modules/__snapshots__/jsfmt.spec.js.snap
index e162ca3f6..2ee719900 100644
--- a/tests/modules/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/modules/__snapshots__/jsfmt.spec.js.snap
@@ -41,7 +41,8 @@ module.exports = f;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-function g(x: string) {}
+function g(x: string) {
+}
 
 //function f(x) { g(x); return x; }
 //function f(x:number) { g(x); return x; }
diff --git a/tests/more_annot/__snapshots__/jsfmt.spec.js.snap b/tests/more_annot/__snapshots__/jsfmt.spec.js.snap
index eb6ae489e..eff48d027 100644
--- a/tests/more_annot/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/more_annot/__snapshots__/jsfmt.spec.js.snap
@@ -42,7 +42,8 @@ var o2: Foo = new Foo();
 function Foo() {
   this.x = 0;
 }
-Foo.prototype.m = function() {};
+Foo.prototype.m = function() {
+};
 
 var o1: { x: number, m(): void } = new Foo();
 
@@ -57,7 +58,8 @@ class D extends C { }
 var d: { +m: () => void } = new D();
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class C {
-  m() {}
+  m() {
+  }
 }
 class D extends C {}
 
diff --git a/tests/more_classes/__snapshots__/jsfmt.spec.js.snap b/tests/more_classes/__snapshots__/jsfmt.spec.js.snap
index 5e1e692cf..fecb8de07 100644
--- a/tests/more_classes/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/more_classes/__snapshots__/jsfmt.spec.js.snap
@@ -121,7 +121,8 @@ class Qux {
     return this.w;
   }
 
-  fooqux(x: number) {}
+  fooqux(x: number) {
+  }
 }
 
 module.exports = Qux;
diff --git a/tests/more_path/__snapshots__/jsfmt.spec.js.snap b/tests/more_path/__snapshots__/jsfmt.spec.js.snap
index abf56ba58..2edb50eb4 100644
--- a/tests/more_path/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/more_path/__snapshots__/jsfmt.spec.js.snap
@@ -59,7 +59,8 @@ module.exports = true;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @providesModule Condition */
 
-function f(x: number) {}
+function f(x: number) {
+}
 function g() {
   return 42 || \"hello\";
 }
@@ -85,7 +86,8 @@ function bar() {
 }
 
 class C {
-  qux() {}
+  qux() {
+  }
 }
 
 function foo() {
@@ -100,7 +102,8 @@ function goofy() {
   var x = g();
   if (typeof x == \"function\") {
     x();
-  } else {}
+  } else {
+  }
 }
 
 function goofy2() {
@@ -111,7 +114,8 @@ function goofy2() {
   var y = o.x;
   if (typeof y == \"function\") {
     y();
-  } else {}
+  } else {
+  }
 }
 
 module.exports = true;
@@ -134,7 +138,8 @@ module.exports = FlowSA;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @providesModule FlowSA */
 
-function check(x: string) {}
+function check(x: string) {
+}
 
 function FlowSA() {
   var x = 0;
@@ -191,15 +196,18 @@ module.exports = \"sigma\";
 /* @providesModule Sigma */
 
 class A {
-  a() {}
+  a() {
+  }
 }
 
 class B extends A {
-  b() {}
+  b() {
+  }
 }
 
 class C extends B {
-  c() {}
+  c() {
+  }
 }
 
 function bar(x: B) {
@@ -224,11 +232,13 @@ function foo(x: A) {
 }
 
 class D {
-  d() {}
+  d() {
+  }
 }
 
 function baz(x: D) {
-  if (x instanceof A) {}
+  if (x instanceof A) {
+  }
 }
 
 module.exports = \"sigma\";
diff --git a/tests/namespace/__snapshots__/jsfmt.spec.js.snap b/tests/namespace/__snapshots__/jsfmt.spec.js.snap
index 47c3ef33a..a54e5e519 100644
--- a/tests/namespace/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/namespace/__snapshots__/jsfmt.spec.js.snap
@@ -31,7 +31,8 @@ module.exports = { foo: (\"\": number) };
 /*@flow*/
 // import type { T } from \'...\'
 type T = (x: number) => void;
-var f: T = function(x: string): void {};
+var f: T = function(x: string): void {
+};
 
 type Map<X, Y> = (x: X) => Y;
 
diff --git a/tests/node_tests/stream/__snapshots__/jsfmt.spec.js.snap b/tests/node_tests/stream/__snapshots__/jsfmt.spec.js.snap
index 22dea08fc..a7e1dcb05 100644
--- a/tests/node_tests/stream/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/node_tests/stream/__snapshots__/jsfmt.spec.js.snap
@@ -44,14 +44,18 @@ var data = \"foo\";
 
 ls.stdin.write(data);
 ls.stdin.write(data, \"utf-8\");
-ls.stdin.write(data, () => {});
-ls.stdin.write(data, \"utf-8\", () => {});
+ls.stdin.write(data, () => {
+});
+ls.stdin.write(data, \"utf-8\", () => {
+});
 
 ls.stdin.end();
 ls.stdin.end(data);
 ls.stdin.end(data, \"utf-8\");
-ls.stdin.end(data, () => {});
-ls.stdin.end(data, \"utf-8\", () => {});
+ls.stdin.end(data, () => {
+});
+ls.stdin.end(data, \"utf-8\", () => {
+});
 
 var ws = fs.createWriteStream(\"/dev/null\");
 ls.stdout.pipe(ws).end();
diff --git a/tests/nullable/__snapshots__/jsfmt.spec.js.snap b/tests/nullable/__snapshots__/jsfmt.spec.js.snap
index 33cfd5db7..2faa45672 100644
--- a/tests/nullable/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/nullable/__snapshots__/jsfmt.spec.js.snap
@@ -42,9 +42,11 @@ function bar(): ?string {
   return null;
 }
 
-function qux(x: string) {}
+function qux(x: string) {
+}
 
-function corge(x: number) {}
+function corge(x: number) {
+}
 
 var x = bar();
 // x: ?string
@@ -73,12 +75,15 @@ bar(\'hmm\');
 function fn(data: ?{}) {}
 fn({some: \'literal\'});
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function foo(x: ?string) {}
-function bar(x: ?number) {}
+function foo(x: ?string) {
+}
+function bar(x: ?number) {
+}
 foo(\"hmm\");
 bar(\"hmm\");
 
-function fn(data: ?{}) {}
+function fn(data: ?{}) {
+}
 fn({ some: \"literal\" });
 "
 `;
diff --git a/tests/object_api/__snapshots__/jsfmt.spec.js.snap b/tests/object_api/__snapshots__/jsfmt.spec.js.snap
index 85a0b68cf..d5f9db607 100644
--- a/tests/object_api/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/object_api/__snapshots__/jsfmt.spec.js.snap
@@ -4,7 +4,10 @@ exports[`test a.js 1`] = `
 module.exports = { a() {} };~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-module.exports = { a() {} };
+module.exports = {
+  a() {
+  }
+};
 "
 `;
 
@@ -19,7 +22,14 @@ module.exports = b;
 /* @flow */
 
 var a = require(\"./a\");
-var b = Object.assign({ bar() {}, ...{} }, a);
+var b = Object.assign(
+  {
+    bar() {
+    },
+    ...{}
+  },
+  a
+);
 b.a();
 // works here
 module.exports = b;
@@ -194,14 +204,16 @@ var any: Object = {};
 // error, Array<string>
 class Foo {
   prop: string;
-  foo() {}
+  foo() {
+  }
 }
 // constructor and foo not enumerable
 (Object.keys(new Foo()): Array<\"error\">);
 // error: prop ~> error
 class Bar extends Foo {
   bar_prop: string;
-  bar() {}
+  bar() {
+  }
 }
 // only own enumerable props
 (Object.keys(new Bar()): Array<\"error\">); // error: bar_prop ~> error
@@ -395,10 +407,14 @@ var k : Object = a.constructor;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-function takesABool(x: boolean) {}
-function takesAString(x: string) {}
-function takesANumber(x: number) {}
-function takesAnObject(x: Object) {}
+function takesABool(x: boolean) {
+}
+function takesAString(x: string) {
+}
+function takesANumber(x: number) {
+}
+function takesAnObject(x: Object) {
+}
 
 class Foo {}
 
@@ -452,7 +468,8 @@ takesAString(y.toString());
 // ... on a primitive
 (123).toString();
 (123).toString;
-(123).toString = function() {};
+(123).toString = function() {
+};
 // error
 (123).toString(2);
 (123).toString(\"foo\");
diff --git a/tests/object_freeze/__snapshots__/jsfmt.spec.js.snap b/tests/object_freeze/__snapshots__/jsfmt.spec.js.snap
index 77fbfde32..8455ae4d7 100644
--- a/tests/object_freeze/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/object_freeze/__snapshots__/jsfmt.spec.js.snap
@@ -37,7 +37,8 @@ bliffl.corge;
 // error
 bliffl.constructor = baz;
 // error
-bliffl.toString = function() {};
+bliffl.toString = function() {
+};
 // error
 baz.baz = 0;
 
diff --git a/tests/optional/__snapshots__/jsfmt.spec.js.snap b/tests/optional/__snapshots__/jsfmt.spec.js.snap
index 2cf99b2d8..bd0ad193e 100644
--- a/tests/optional/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/optional/__snapshots__/jsfmt.spec.js.snap
@@ -27,10 +27,12 @@ class C {
   x<T>(x: T = 0) {}
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function x<T>(x: T = 0) {}
+function x<T>(x: T = 0) {
+}
 
 class C {
-  x<T>(x: T = 0) {}
+  x<T>(x: T = 0) {
+  }
 }
 "
 `;
@@ -264,7 +266,8 @@ function testOptionalNullableProperty(obj: { x?: ?string }): string {
 }
 
 function testOptionalNullableFlowingToNullable(x?: ?string): ?string {
-  var f = function(y: ?string) {};
+  var f = function(y: ?string) {
+  };
   f(x);
 }
 "
@@ -294,7 +297,8 @@ function bar(x = \"bar\"): string {
 }
 bar(undefined); // ok
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function foo(x?: number) {}
+function foo(x?: number) {
+}
 foo(undefined);
 // ok
 function bar(x = \"bar\"): string {
diff --git a/tests/optional_props/__snapshots__/jsfmt.spec.js.snap b/tests/optional_props/__snapshots__/jsfmt.spec.js.snap
index a8b1cce41..1fa88a8f9 100644
--- a/tests/optional_props/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/optional_props/__snapshots__/jsfmt.spec.js.snap
@@ -22,7 +22,8 @@ y = o;
 // OK; we know that narrowing could not have happened
 o.foo = 0;
 // future widening is constrained
-function bar(config: { foo?: number }) {}
+function bar(config: { foo?: number }) {
+}
 bar({});
 bar({ foo: \"\" });
 "
diff --git a/tests/predicates-declared/__snapshots__/jsfmt.spec.js.snap b/tests/predicates-declared/__snapshots__/jsfmt.spec.js.snap
index fef907d3c..2921aea1a 100644
--- a/tests/predicates-declared/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/predicates-declared/__snapshots__/jsfmt.spec.js.snap
@@ -72,13 +72,15 @@ class D {
   m: Function;
 
   n() {
-    if (this.m({})) {}
+    if (this.m({})) {
+    }
   }
 }
 
 declare var m: Function;
 const x = \"\";
-if (m.bind(this)(x)) {}
+if (m.bind(this)(x)) {
+}
 "
 `;
 
@@ -254,7 +256,8 @@ function f(_this: { m: ?Meeting }): string {
     return \"0\";
   }
 
-  if (_this.m.es.some(a => a.fbid === 0)) {}
+  if (_this.m.es.some(a => a.fbid === 0)) {
+  }
   return \"3\";
 }
 "
diff --git a/tests/predicates-parsing/__snapshots__/jsfmt.spec.js.snap b/tests/predicates-parsing/__snapshots__/jsfmt.spec.js.snap
index 0bb77ba91..b28d1c664 100644
--- a/tests/predicates-parsing/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/predicates-parsing/__snapshots__/jsfmt.spec.js.snap
@@ -24,7 +24,8 @@ function f6(x: mixed): %checks (x !== null) {  }
 
 // Error: no return statement
 
-function f6(x: mixed): %checks(x !== null) {}
+function f6(x: mixed): %checks(x !== null) {
+}
 "
 `;
 
diff --git a/tests/promises/__snapshots__/jsfmt.spec.js.snap b/tests/promises/__snapshots__/jsfmt.spec.js.snap
index 4e517531e..7bd62309f 100644
--- a/tests/promises/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/promises/__snapshots__/jsfmt.spec.js.snap
@@ -586,7 +586,8 @@ Promise
 // TODO: resolvedPromise<T> -> catch() -> then():T
 Promise
   .resolve(0)
-  .catch(function(err) {})
+  .catch(function(err) {
+  })
   .then(function(num) {
     var a: number = num;
 
diff --git a/tests/quotes/__snapshots__/jsfmt.spec.js.snap b/tests/quotes/__snapshots__/jsfmt.spec.js.snap
index cbc3e7bd5..fe175ae9e 100644
--- a/tests/quotes/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/quotes/__snapshots__/jsfmt.spec.js.snap
@@ -70,8 +70,8 @@ exports[`test strings.js 1`] = `
 \"\\\\\";
 \"\\\\\";
 
-\"\\u0000\";
-\"🐶\";
+\"\\0\";
+\"\\uD83D\\uDC36\";
 "
 `;
 
@@ -117,7 +117,7 @@ exports[`test strings.js 2`] = `
 \'\\\\\';
 \'\\\\\';
 
-\'\\u0000\';
-\'🐶\';
+\'\\0\';
+\'\\uD83D\\uDC36\';
 "
 `;
diff --git a/tests/react/__snapshots__/jsfmt.spec.js.snap b/tests/react/__snapshots__/jsfmt.spec.js.snap
index b8ee1ec40..5739f880d 100644
--- a/tests/react/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/react/__snapshots__/jsfmt.spec.js.snap
@@ -197,8 +197,18 @@ var Example = React.createClass({
   propTypes: { func: React.PropTypes.func.isRequired }
 });
 
-var ok_void = <Example func={() => {}} />;
-var ok_args = <Example func={x => {}} />;
+var ok_void = (
+  <Example
+    func={() => {
+      }}
+  />
+);
+var ok_args = (
+  <Example
+    func={x => {
+      }}
+  />
+);
 var ok_retval = <Example func={() => 1} />;
 
 var fail_mistyped = <Example func={2} />;
diff --git a/tests/react_functional/__snapshots__/jsfmt.spec.js.snap b/tests/react_functional/__snapshots__/jsfmt.spec.js.snap
index 49f42bff8..cb87e3c61 100644
--- a/tests/react_functional/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/react_functional/__snapshots__/jsfmt.spec.js.snap
@@ -15,7 +15,8 @@ var Z = 0;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 import React from \"react\";
 
-function F(props: { foo: string }) {}
+function F(props: { foo: string }) {
+}
 <F />;
 /* error: missing \`foo\`*/
 <F foo={0} />;
@@ -23,7 +24,8 @@ function F(props: { foo: string }) {}
 <F foo=\"\" />;
 // ok
 // props subtyping is property-wise covariant
-function G(props: { foo: string | numner }) {}
+function G(props: { foo: string | numner }) {
+}
 <G foo=\"\" />;
 // ok
 var Z = 0;
diff --git a/tests/recheck/__snapshots__/jsfmt.spec.js.snap b/tests/recheck/__snapshots__/jsfmt.spec.js.snap
index 1d76eff3e..90d4b695f 100644
--- a/tests/recheck/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/recheck/__snapshots__/jsfmt.spec.js.snap
@@ -130,7 +130,8 @@ export function foo(props: { x: number }) { }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 
-export function foo(props: { x: number }) {}
+export function foo(props: { x: number }) {
+}
 "
 `;
 
diff --git a/tests/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap b/tests/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap
index 0a6ff906a..ec0274ca4 100644
--- a/tests/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/recheck/tmp2c/__snapshots__/jsfmt.spec.js.snap
@@ -5,6 +5,7 @@ export function foo(props: { y: number }) { }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 
-export function foo(props: { y: number }) {}
+export function foo(props: { y: number }) {
+}
 "
 `;
diff --git a/tests/refi/__snapshots__/jsfmt.spec.js.snap b/tests/refi/__snapshots__/jsfmt.spec.js.snap
index 090250741..934e63275 100644
--- a/tests/refi/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/refi/__snapshots__/jsfmt.spec.js.snap
@@ -79,8 +79,8 @@ var tests = [
     }
   },
   function() {
-    if (x == null) {}
-    else {
+    if (x == null) {
+    } else {
       var y: string = x; // ok
     }
   },
@@ -89,8 +89,8 @@ var tests = [
     var y: string = x; // ok
   },
   function() {
-    if (!(x != null)) {}
-    else {
+    if (!(x != null)) {
+    } else {
       var y: string = x; // ok
     }
   },
@@ -104,12 +104,13 @@ var tests = [
   },
   */
   function() {
-    if (x != null) {}
+    if (x != null) {
+    }
     var y: string = x; // not ok
   },
   function() {
-    if (x != null) {}
-    else {
+    if (x != null) {
+    } else {
       var y: string = x; // not ok
     }
   },
@@ -375,8 +376,8 @@ var tests = [
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p == null) {}
-    else {
+    if (x.p == null) {
+    } else {
       var y: string = x.p; // ok
     }
   },
@@ -387,8 +388,8 @@ var tests = [
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (!(x.p != null)) {}
-    else {
+    if (!(x.p != null)) {
+    } else {
       var y: string = x.p; // ok
     }
   },
@@ -408,13 +409,14 @@ var tests = [
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p != null) {}
+    if (x.p != null) {
+    }
     var y: string = x.p; // not ok
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p != null) {}
-    else {
+    if (x.p != null) {
+    } else {
       var y: string = x.p; // not ok
     }
   },
@@ -443,8 +445,8 @@ var tests = [
   },
   function() {
     var x: { y: ?string } = { y: null };
-    if (x.y) {}
-    else {
+    if (x.y) {
+    } else {
       x.y = \"foo\";
     }
     (x.y: string);
@@ -526,11 +528,13 @@ var tests = [
     (x.y: string);
   },
   function(x: string) {
-    if (x === \"a\") {}
+    if (x === \"a\") {
+    }
     (x: \"b\"); // error (but only once, string !~> \'b\'; \'a\' is irrelevant)
   },
   function(x: mixed) {
-    if (typeof x.bar === \"string\") {}
+    if (typeof x.bar === \"string\") {
+    }
     // error, so \`x.bar\` refinement is empty
     (x: string & number);
   },
@@ -543,7 +547,8 @@ var tests = [
   function() {
     let x: { foo: ?string } = { foo: null };
     if (!x.foo) {
-      if (false) {}
+      if (false) {
+      }
       x.foo = \"foo\";
     }
     (x.foo: string);
@@ -551,7 +556,8 @@ var tests = [
   function() {
     let x: { foo: ?string } = { foo: null };
     if (!x.foo) {
-      while (false) {}
+      while (false) {
+      }
       x.foo = \"foo\";
     }
     (x.foo: string);
@@ -559,7 +565,8 @@ var tests = [
   function() {
     let x: { foo: ?string } = { foo: null };
     if (!x.foo) {
-      for (var i = 0; i < 0; i++) {}
+      for (var i = 0; i < 0; i++) {
+      }
       x.foo = \"foo\";
     }
     (x.foo: string);
@@ -753,8 +760,8 @@ var paths = [
   },
   function() {
     var x: ?string = \"xxx\";
-    if (x == null) {}
-    else {
+    if (x == null) {
+    } else {
       var y: string = x; // ok
     }
   },
@@ -765,8 +772,8 @@ var paths = [
   },
   function() {
     var x: ?string = \"xxx\";
-    if (!(x != null)) {}
-    else {
+    if (!(x != null)) {
+    } else {
       var y: string = x; // ok
     }
   },
@@ -779,13 +786,14 @@ var paths = [
   },
   function() {
     var x: ?string = \"xxx\";
-    if (x != null) {}
+    if (x != null) {
+    }
     var y: string = x; // not ok
   },
   function() {
     var x: ?string = \"xxx\";
-    if (x != null) {}
-    else {
+    if (x != null) {
+    } else {
       var y: string = x; // not ok
     }
   },
@@ -1001,22 +1009,22 @@ var null_tests = [
   // expr == null
   function() {
     var x: ?string = \"xxx\";
-    if (x == null) {}
-    else {
+    if (x == null) {
+    } else {
       var y: string = x; // ok
     }
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p == null) {}
-    else {
+    if (x.p == null) {
+    } else {
       var y: string = x.p; // ok
     }
   },
   function() {
     var x: { p: { q: ?string } } = { p: { q: \"xxx\" } };
-    if (x.p.q == null) {}
-    else {
+    if (x.p.q == null) {
+    } else {
       var y: string = x.p.q; // ok
     }
   },
@@ -1042,22 +1050,22 @@ var null_tests = [
   // expr === null
   function() {
     var x: ?string = \"xxx\";
-    if (x === null) {}
-    else {
+    if (x === null) {
+    } else {
       var y: string | void = x; // ok
     }
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p === null) {}
-    else {
+    if (x.p === null) {
+    } else {
       var y: string | void = x.p; // ok
     }
   },
   function() {
     var x: { p: { q: ?string } } = { p: { q: \"xxx\" } };
-    if (x.p.q === null) {}
-    else {
+    if (x.p.q === null) {
+    } else {
       var y: string | void = x.p.q; // ok
     }
   }
@@ -1406,22 +1414,22 @@ var null_tests = [
   // typeof expr != typename
   function() {
     var x: ?string = \"xxx\";
-    if (typeof x != \"string\") {}
-    else {
+    if (typeof x != \"string\") {
+    } else {
       var y: string = x; // ok
     }
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (typeof x.p != \"string\") {}
-    else {
+    if (typeof x.p != \"string\") {
+    } else {
       var y: string = x.p; // ok
     }
   },
   function() {
     var x: { p: { q: ?string } } = { p: { q: \"xxx\" } };
-    if (typeof x.p.q != \"string\") {}
-    else {
+    if (typeof x.p.q != \"string\") {
+    } else {
       var y: string = x.p.q; // ok
     }
   },
@@ -1447,22 +1455,22 @@ var null_tests = [
   // typeof expr !== typename
   function() {
     var x: ?string = \"xxx\";
-    if (typeof x !== \"string\") {}
-    else {
+    if (typeof x !== \"string\") {
+    } else {
       var y: string = x; // ok
     }
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (typeof x.p !== \"string\") {}
-    else {
+    if (typeof x.p !== \"string\") {
+    } else {
       var y: string = x.p; // ok
     }
   },
   function() {
     var x: { p: { q: ?string } } = { p: { q: \"xxx\" } };
-    if (typeof x.p.q !== \"string\") {}
-    else {
+    if (typeof x.p.q !== \"string\") {
+    } else {
       var y: string = x.p.q; // ok
     }
   }
@@ -1601,22 +1609,22 @@ var undef_tests = [
   // expr === undefined
   function() {
     var x: ?string = \"xxx\";
-    if (x === undefined || x === null) {}
-    else {
+    if (x === undefined || x === null) {
+    } else {
       var y: string = x; // ok
     }
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p === undefined || x.p === null) {}
-    else {
+    if (x.p === undefined || x.p === null) {
+    } else {
       var y: string = x.p; // ok
     }
   },
   function() {
     var x: { p: { q: ?string } } = { p: { q: \"xxx\" } };
-    if (x.p.q === undefined || x.p.q === null) {}
-    else {
+    if (x.p.q === undefined || x.p.q === null) {
+    } else {
       var y: string = x.p.q; // ok
     }
   }
@@ -1745,22 +1753,22 @@ var void_tests = [
   // expr === void(...)
   function() {
     var x: ?string = \"xxx\";
-    if (x === void 0 || x === null) {}
-    else {
+    if (x === void 0 || x === null) {
+    } else {
       var y: string = x; // ok
     }
   },
   function() {
     var x: { p: ?string } = { p: \"xxx\" };
-    if (x.p === void 0 || x.p === null) {}
-    else {
+    if (x.p === void 0 || x.p === null) {
+    } else {
       var y: string = x.p; // ok
     }
   },
   function() {
     var x: { p: { q: ?string } } = { p: { q: \"xxx\" } };
-    if (x.p.q === void 0 || x.p.q === null) {}
-    else {
+    if (x.p.q === void 0 || x.p.q === null) {
+    } else {
       var y: string = x.p.q; // ok
     }
   }
diff --git a/tests/refinements/__snapshots__/jsfmt.spec.js.snap b/tests/refinements/__snapshots__/jsfmt.spec.js.snap
index e70352b9c..6d4bbd66c 100644
--- a/tests/refinements/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/refinements/__snapshots__/jsfmt.spec.js.snap
@@ -208,7 +208,8 @@ function testLiteralProperty(a: A) {
 
 type A = { \"b_c\": ?string };
 
-function stuff(str: string) {}
+function stuff(str: string) {
+}
 
 function testProperty(a: A) {
   if (a.b_c) {
@@ -371,22 +372,29 @@ let tests = [
 
 let tests = [
   function(x: string, y: number) {
-    if (x == y) {}
+    if (x == y) {
+    }
     // error, string & number are not comparable (unsafe casting)
-    if (x === y) {} // no error, to match \`let z = (x === y)\` which is allowed
+    if (x === y) {
+    } // no error, to match \`let z = (x === y)\` which is allowed
   },
   function(x: string) {
-    if (x == undefined) {}
+    if (x == undefined) {
+    }
     // ok
-    if (x == void 0) {} // ok
+    if (x == void 0) {
+    } // ok
   },
   function(x: string) {
-    if (x == null) {} // ok
+    if (x == null) {
+    } // ok
   },
   function(x: { y: \"foo\" } | { y: \"bar\" }) {
-    if (x.y == 123) {}
+    if (x.y == 123) {
+    }
     // error
-    if (x.y === 123) {} // ok
+    if (x.y === 123) {
+    } // ok
   }
 ];
 "
@@ -593,7 +601,8 @@ function def_assign_setprop_nohavoc(obj: Obj, obj2: Obj2) {
 
 type Obj = { p: number | string };
 
-function f() {}
+function f() {
+}
 
 function def_assign_function_havoc(obj: Obj) {
   obj.p = 10;
@@ -790,28 +799,36 @@ function foo5() {
     o.p();
   }
   function _foo5() {
-    o.p = function() {};
+    o.p = function() {
+    };
   }
 }
 
 function foo6(o: mixed) {
-  if (o.bar) {} // error, any lookup on mixed is unsafe
+  if (o.bar) {
+  } // error, any lookup on mixed is unsafe
 }
 
 function foo7(o: mixed) {
-  if (typeof o.bar === \"string\") {}
+  if (typeof o.bar === \"string\") {
+  }
   // error
-  if (o && typeof o.bar === \"string\") {}
+  if (o && typeof o.bar === \"string\") {
+  }
   // ok
-  if (o != null && typeof o.bar === \"string\") {}
+  if (o != null && typeof o.bar === \"string\") {
+  }
   // ok
-  if (o !== null && o !== undefined && typeof o.bar === \"string\") {} // ok
+  if (o !== null && o !== undefined && typeof o.bar === \"string\") {
+  } // ok
 }
 
 function foo8(o: { p: mixed }) {
-  if (o.p && o.p.q) {}
+  if (o.p && o.p.q) {
+  }
   // this is ok because o.p is truthy, so o.p.q is safe
-  if (o.p && o.p.q && o.p.q.r) {}
+  if (o.p && o.p.q && o.p.q.r) {
+  }
 }
 "
 `;
@@ -941,8 +958,10 @@ function arr0(x: mixed) {
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-function takesNumber(x: number) {}
-function takesString(x: string) {}
+function takesNumber(x: number) {
+}
+function takesString(x: string) {
+}
 
 function num(x: mixed) {
   if (typeof x === \"number\") {
@@ -1395,10 +1414,12 @@ let tests = [
     }
   },
   function(num: number, obj: { foo: number }) {
-    if (num === obj.bar) {}
+    if (num === obj.bar) {
+    }
   },
   function(num: number, obj: { [key: string]: number }) {
-    if (num === obj.bar) {}
+    if (num === obj.bar) {
+    }
   },
   function(n: number): Mode {
     if (n !== 0 && n !== 1 && n !== 2) {
@@ -1705,7 +1726,8 @@ function bar(b) {
   var z: string = x;
 }
 
-function maybe_throw() {}
+function maybe_throw() {
+}
 function qux() {
   var x = 0;
   try {
@@ -1755,14 +1777,16 @@ function waldo() {
 function global_in_conditional0(x: number) {
   // merge_env
   if (x != 0) {
-    if (BAZ) {}
+    if (BAZ) {
+    }
   }
 }
 
 function global_in_conditional2(x: number) {
   // copy_env
   for (var i = 0; i < 100; i++) {
-    if (BAZ) {}
+    if (BAZ) {
+    }
   }
 }
 "
@@ -1970,10 +1994,12 @@ let tests = [
     }
   },
   function(str: string, obj: { foo: string }) {
-    if (str === obj.bar) {}
+    if (str === obj.bar) {
+    }
   },
   function(str: string, obj: { [key: string]: string }) {
-    if (str === obj.bar) {}
+    if (str === obj.bar) {
+    }
   },
   function(str: string): Mode {
     var ch = str[0];
@@ -2530,14 +2556,18 @@ let tests = [
   },
   // nested objects
   function test8(x: { foo: { bar: 1 } }) {
-    if (x.foo.bar === 1) {}
-    if (x.fooTypo.bar === 1) {} // error, fooTypo doesn\'t exist
+    if (x.foo.bar === 1) {
+    }
+    if (x.fooTypo.bar === 1) {
+    } // error, fooTypo doesn\'t exist
   },
   // invalid RHS
   function(x: A) {
-    if (x.kind === null.toString()) {}
+    if (x.kind === null.toString()) {
+    }
     // error, method on null
-    if ({ kind: 1 }.kind === null.toString()) {} // error, method on null
+    if ({ kind: 1 }.kind === null.toString()) {
+    } // error, method on null
   },
   // non-objects on LHS
   function(
@@ -2549,28 +2579,32 @@ let tests = [
     s: Function,
     t: () => void
   ) {
-    if (x.length === 0) {}
+    if (x.length === 0) {
+    }
     if (x.legnth === 0) {
       // typos are allowed to be tested
       (x.legnth: number);
       // inside the block, it\'s a number
       (x.legnth: string); // error: number literal 0 !~> string
     }
-    if (y.length === 0) {}
+    if (y.length === 0) {
+    }
     if (y.legnth === 0) {
       // typos are allowed to be tested
       (y.legnth: number);
       // inside the block, it\'s a number
       (y.legnth: string); // error: number literal 0 !~> string
     }
-    if (z.toString === 0) {}
+    if (z.toString === 0) {
+    }
     if (z.toStirng === 0) {
       // typos are allowed to be tested
       (z.toStirng: number);
       // inside the block, it\'s a number
       (z.toStirng: string); // error: number literal 0 !~> string
     }
-    if (q.valueOf === 0) {}
+    if (q.valueOf === 0) {
+    }
     if (q.valeuOf === 0) {
       // typos are allowed to be tested
       (q.valeuOf: number);
@@ -2581,12 +2615,14 @@ let tests = [
       // typos are allowed to be tested
       (r.toStirng: empty); // props on AnyObjT are \`any\`
     }
-    if (s.call === 0) {}
+    if (s.call === 0) {
+    }
     if (s.calll === 0) {
       // typos are allowed to be tested
       (t.calll: empty); // ok, props on functions are \`any\` :/
     }
-    if (t.call === 0) {}
+    if (t.call === 0) {
+    }
     if (t.calll === 0) {
       // typos are allowed to be tested
       (t.calll: empty); // ok, props on functions are \`any\` :/
@@ -2958,8 +2994,8 @@ function undef_var(x: ?number) {
 }
 
 function undef_var_rev(x: ?number) {
-  if (x === null || x === undefined) {}
-  else {
+  if (x === null || x === undefined) {
+  } else {
     var y = x * 1000;
   }
 }
@@ -2971,8 +3007,8 @@ function undef_prop(x: { x: ?number }) {
 }
 
 function undef_prop_rev(x: { x: ?number }) {
-  if (x.x === null || x.x === undefined) {}
-  else {
+  if (x.x === null || x.x === undefined) {
+  } else {
     var y = x.x * 1000;
   }
 }
@@ -2984,8 +3020,8 @@ function undef_var_fail(x: ?number) {
 }
 
 function undef_var_fail_rev(x: ?number) {
-  if (x === undefined) {}
-  else {
+  if (x === undefined) {
+  } else {
     var y = x * 1000;
   }
 }
@@ -2997,8 +3033,8 @@ function undef_prop_fail(x: { x: ?number }) {
 }
 
 function undef_prop_fail_rev(x: { x: ?number }) {
-  if (x.x === undefined) {}
-  else {
+  if (x.x === undefined) {
+  } else {
     var y = x.x * 1000;
   }
 }
@@ -3185,8 +3221,8 @@ function void_var(x: ?number) {
 }
 
 function void_var_rev(x: ?number) {
-  if (x === null || x === void 0) {}
-  else {
+  if (x === null || x === void 0) {
+  } else {
     var y = x * 1000;
   }
 }
@@ -3198,8 +3234,8 @@ function void_pro(x: { x: ?number }) {
 }
 
 function void_pro_rev(x: { x: ?number }) {
-  if (x.x === null || x.x === void 0) {}
-  else {
+  if (x.x === null || x.x === void 0) {
+  } else {
     var y = x.x * 1000;
   }
 }
@@ -3211,8 +3247,8 @@ function void_var_fail(x: ?number) {
 }
 
 function void_var_fail_rev(x: ?number) {
-  if (x === void 0) {}
-  else {
+  if (x === void 0) {
+  } else {
     var y = x * 1000;
   }
 }
@@ -3224,8 +3260,8 @@ function void_pro_fail(x: { x: ?number }) {
 }
 
 function void_pro_fail_rev(x: { x: ?number }) {
-  if (x.x === void 0) {}
-  else {
+  if (x.x === void 0) {
+  } else {
     var y = x.x * 1000;
   }
 }
@@ -3237,8 +3273,8 @@ function void_var_side_effect(x: ?number) {
 }
 
 function void_var_side_effect_rev(x: ?number) {
-  if (x === null || x === void (x * 1000)) {}
-  else {
+  if (x === null || x === void (x * 1000)) {
+  } else {
     var y = x * 1000;
   }
 }
@@ -3250,8 +3286,8 @@ function void_prop_side_effect(x: { x: ?number }) {
 }
 
 function void_prop_side_effect_rev(x: { x: ?number }) {
-  if (x.x === null || x.x === void (x.x * 1000)) {}
-  else {
+  if (x.x === null || x.x === void (x.x * 1000)) {
+  } else {
     var y = x.x * 1000;
   }
 }
diff --git a/tests/replace/__snapshots__/jsfmt.spec.js.snap b/tests/replace/__snapshots__/jsfmt.spec.js.snap
index 9a21d5fb8..786ec1112 100644
--- a/tests/replace/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/replace/__snapshots__/jsfmt.spec.js.snap
@@ -7,7 +7,8 @@ foo(\"\");
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 var a = 0;
 
-function foo(x) {}
+function foo(x) {
+}
 
 foo(\"\");
 "
diff --git a/tests/require/__snapshots__/jsfmt.spec.js.snap b/tests/require/__snapshots__/jsfmt.spec.js.snap
index 388455c30..2ce6c59a4 100644
--- a/tests/require/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/require/__snapshots__/jsfmt.spec.js.snap
@@ -74,7 +74,8 @@ require(\"not a module name\");
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 
-function require() {}
+function require() {
+}
 require(\"not a module name\");
 "
 `;
@@ -131,8 +132,10 @@ require.call(null, \"DoesNotExist\");
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-function takesANumber(num: number): void {}
-function takesAString(str: string): void {}
+function takesANumber(num: number): void {
+}
+function takesAString(str: string): void {
+}
 
 // @providesModule
 var A = require(\"A\");
diff --git a/tests/requireLazy/__snapshots__/jsfmt.spec.js.snap b/tests/requireLazy/__snapshots__/jsfmt.spec.js.snap
index bdb550327..83a0c27da 100644
--- a/tests/requireLazy/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/requireLazy/__snapshots__/jsfmt.spec.js.snap
@@ -85,7 +85,8 @@ var notB: Object = B;
 
 requireLazy();
 // Error: No args
-requireLazy([ nope ], function() {});
+requireLazy([ nope ], function() {
+});
 // Error: Non-stringliteral args
 requireLazy([ \"A\" ]); // Error: No calback expression
 "
diff --git a/tests/return/__snapshots__/jsfmt.spec.js.snap b/tests/return/__snapshots__/jsfmt.spec.js.snap
index 7aad9fe5b..f543e0ec6 100644
--- a/tests/return/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/return/__snapshots__/jsfmt.spec.js.snap
@@ -37,7 +37,8 @@ module.exports = C;
 //module.exports = fn;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class C {
-  foo() {}
+  foo() {
+  }
   bar() {
     return;
   }
diff --git a/tests/return_new/__snapshots__/jsfmt.spec.js.snap b/tests/return_new/__snapshots__/jsfmt.spec.js.snap
index bf637d0f9..98cb0e0f6 100644
--- a/tests/return_new/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/return_new/__snapshots__/jsfmt.spec.js.snap
@@ -22,7 +22,8 @@ function Bar() {
 }
 var bar: number = new Bar();
 // error (returns new object)
-function Qux() {}
+function Qux() {
+}
 var qux: number = new Qux();
 // error (returns new object)
 class A {}
diff --git a/tests/sealed/__snapshots__/jsfmt.spec.js.snap b/tests/sealed/__snapshots__/jsfmt.spec.js.snap
index 52cdc2263..d098debd8 100644
--- a/tests/sealed/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/sealed/__snapshots__/jsfmt.spec.js.snap
@@ -41,7 +41,8 @@ var export_o: { x:any; } = o; // awkward type cast
 
 module.exports = export_o;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function Foo() {}
+function Foo() {
+}
 var o = new Foo();
 var x: number = o.x;
 
diff --git a/tests/shebang/__snapshots__/jsfmt.spec.js.snap b/tests/shebang/__snapshots__/jsfmt.spec.js.snap
index ab63719bc..db7ecc65f 100644
--- a/tests/shebang/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/shebang/__snapshots__/jsfmt.spec.js.snap
@@ -3,6 +3,7 @@ exports[`test shebang.js 1`] = `
 function a() {}
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 #!/usr/bin/env node
-function a() {}
+function a() {
+}
 "
 `;
diff --git a/tests/singleton/__snapshots__/jsfmt.spec.js.snap b/tests/singleton/__snapshots__/jsfmt.spec.js.snap
index ca2a406dc..607a779c0 100644
--- a/tests/singleton/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/singleton/__snapshots__/jsfmt.spec.js.snap
@@ -122,7 +122,8 @@ bar(2);
 bar(3);
 // error
 type ComparatorResult = -1 | 0 | 1;
-function sort(fn: (x: any, y: any) => ComparatorResult) {}
+function sort(fn: (x: any, y: any) => ComparatorResult) {
+}
 sort((x, y) => -1);
 "
 `;
diff --git a/tests/spread/__snapshots__/jsfmt.spec.js.snap b/tests/spread/__snapshots__/jsfmt.spec.js.snap
index 3aa4d9d7c..df7c48ec5 100644
--- a/tests/spread/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/spread/__snapshots__/jsfmt.spec.js.snap
@@ -74,7 +74,8 @@ foo({foo: 42});
 function foo(o) {
   bar({ ...o });
 }
-function bar(_: { foo: number }) {}
+function bar(_: { foo: number }) {
+}
 foo({ foo: 42 });
 "
 `;
@@ -118,7 +119,8 @@ function test(...nums: Array<number>) {}
 test(0, ...[1, 2, 3]);
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
-function test(...nums: Array<number>) {}
+function test(...nums: Array<number>) {
+}
 
 test(0, ...[ 1, 2, 3 ]);
 "
diff --git a/tests/statics/__snapshots__/jsfmt.spec.js.snap b/tests/statics/__snapshots__/jsfmt.spec.js.snap
index b2e1eff3d..162ffe9a0 100644
--- a/tests/statics/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/statics/__snapshots__/jsfmt.spec.js.snap
@@ -10,7 +10,8 @@ C.g(0);
 var x:number = C.x;
 C.x = 0;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class C {
-  static f(x: number) {}
+  static f(x: number) {
+  }
   static x: string;
 }
 
@@ -31,7 +32,8 @@ C.g = function(x) { return x; };
 
 var x:string = new C().f();
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function C() {}
+function C() {
+}
 C.prototype.f = function() {
   return C.g(0);
 };
diff --git a/tests/strict/__snapshots__/jsfmt.spec.js.snap b/tests/strict/__snapshots__/jsfmt.spec.js.snap
index b3211cedc..1cb6a693b 100644
--- a/tests/strict/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/strict/__snapshots__/jsfmt.spec.js.snap
@@ -15,7 +15,8 @@ class B extends A {
   foo(x: A): A {
     return x;
   }
-  bar(x) {}
+  bar(x) {
+  }
   qux<X, Y>(x: X, y: Y): X {
     return x;
   }
diff --git a/tests/strings/__snapshots__/jsfmt.spec.js.snap b/tests/strings/__snapshots__/jsfmt.spec.js.snap
index 3e21efa76..b97984909 100644
--- a/tests/strings/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/strings/__snapshots__/jsfmt.spec.js.snap
@@ -37,8 +37,8 @@ exports[`test strings.js 1`] = `
   \"\'\\\"\",
   \"\\\\\",
   \"\\\\\",
-  \"\\u0000\",
-  \"🐶\"
+  \"\\0\",
+  \"\\uD83D\\uDC36\"
 ];
 "
 `;
diff --git a/tests/super/__snapshots__/jsfmt.spec.js.snap b/tests/super/__snapshots__/jsfmt.spec.js.snap
index b2ecf83cd..843951805 100644
--- a/tests/super/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/super/__snapshots__/jsfmt.spec.js.snap
@@ -223,7 +223,8 @@ class I_ {
   constructor(leaked_this) {
     leaked_this.foo();
   }
-  foo() {}
+  foo() {
+  }
 }
 class I extends I_ {
   constructor() {
@@ -237,7 +238,8 @@ class J_ extends J__ {
     closure_leaking_this();
     super();
   }
-  foo() {}
+  foo() {
+  }
 }
 class J extends J_ {
   constructor() {
@@ -255,7 +257,8 @@ class K_ {
   constructor(closure_leaking_this) {
     this.closure_leaking_this = closure_leaking_this;
   }
-  foo() {}
+  foo() {
+  }
 }
 class K extends K_ {
   constructor() {
@@ -359,11 +362,13 @@ class B extends A {
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 class A {
-  constructor(x: number) {}
+  constructor(x: number) {
+  }
   static staticMethod(x: string): string {
     return x;
   }
-  f(x: string) {}
+  f(x: string) {
+  }
 }
 
 class B extends A {
diff --git a/tests/suppress/__snapshots__/jsfmt.spec.js.snap b/tests/suppress/__snapshots__/jsfmt.spec.js.snap
index 9db2b0b86..7e9749d15 100644
--- a/tests/suppress/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/suppress/__snapshots__/jsfmt.spec.js.snap
@@ -69,7 +69,8 @@ function runTest(y: number): void {
   );
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function takesAString(x: string): void {}
+function takesAString(x: string): void {
+}
 
 function runTest(y: number): void {
   takesAString(
diff --git a/tests/tabWith/__snapshots__/jsfmt.spec.js.snap b/tests/tabWith/__snapshots__/jsfmt.spec.js.snap
index 03113ea47..42d77f8ed 100644
--- a/tests/tabWith/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/tabWith/__snapshots__/jsfmt.spec.js.snap
@@ -61,7 +61,8 @@ function a() {
   }
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-const c = () => {};
+const c = () => {
+};
 
 function a() {
   return function b() {
@@ -88,7 +89,8 @@ function a() {
   }
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-const c = () => {};
+const c = () => {
+};
 
 function a() {
     return function b() {
diff --git a/tests/template/__snapshots__/jsfmt.spec.js.snap b/tests/template/__snapshots__/jsfmt.spec.js.snap
index 70c3fb59a..19e3cc213 100644
--- a/tests/template/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/template/__snapshots__/jsfmt.spec.js.snap
@@ -14,7 +14,10 @@ var x = {
   \`
 };
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-var o = { [\`key\`]: () => {} };
+var o = {
+  [\`key\`]: () => {
+  }
+};
 
 var x = {
   y: () => Relay.QL\`
diff --git a/tests/this/__snapshots__/jsfmt.spec.js.snap b/tests/this/__snapshots__/jsfmt.spec.js.snap
index 3ea1510b0..04d4672f0 100644
--- a/tests/this/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/this/__snapshots__/jsfmt.spec.js.snap
@@ -69,7 +69,8 @@ F.prototype.m = function() {
   this.y = 0;
 };
 
-function foo(p: string) {}
+function foo(p: string) {
+}
 
 var o1 = new F();
 // sets o1.x to 0
@@ -190,7 +191,8 @@ var j = g();
 (j: D);
 // error, since return type of bar is C, not the type of \`this\`
 class E {
-  foo(x: number) {}
+  foo(x: number) {
+  }
 }
 class F extends E {
   foo() {
diff --git a/tests/this_type/__snapshots__/jsfmt.spec.js.snap b/tests/this_type/__snapshots__/jsfmt.spec.js.snap
index 69395d88d..e8ebc8dd0 100644
--- a/tests/this_type/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/this_type/__snapshots__/jsfmt.spec.js.snap
@@ -89,11 +89,13 @@ var d = new D();
 (d.next: D);
 // sneaky
 class A {
-  foo<X: this>(that: X) {} // error: can\'t hide contravariance using a bound
+  foo<X: this>(that: X) {
+  } // error: can\'t hide contravariance using a bound
 }
 
 class B extends A {
-  foo<Y: this>(that: Y) {} // error (see above, catches hidden override)
+  foo<Y: this>(that: Y) {
+  } // error (see above, catches hidden override)
 }
 
 // covariance checks on this type in invariant positions
@@ -101,13 +103,15 @@ class Invariant {
   out_object(): { _: this } {
     return { _: this };
   }
-  in_object(_: { _: this }) {}
+  in_object(_: { _: this }) {
+  }
   inout_object: { _: this };
 
   out_array(): Array<this> {
     return [ this ];
   }
-  in_array(_: Array<this>) {}
+  in_array(_: Array<this>) {
+  }
   inout_array: Array<this>;
 }
 
@@ -117,14 +121,16 @@ class Misc {
   out_set(): Set<this> {
     return new Set().add(this);
   }
-  in_set(_: Set<this>) {}
+  in_set(_: Set<this>) {
+  }
   inout_set: Set<this>;
 
   // Promise<X> has covariant X
   async out_promise(): Promise<this> {
     return this;
   }
-  in_promise(_: Promise<this>) {}
+  in_promise(_: Promise<this>) {
+  }
   inout_promise: Promise<this>;
 
   // Generator<X,Y,Z> has covariant X, covariant Y, contravariant Z
@@ -132,7 +138,8 @@ class Misc {
     yield this;
     return this;
   }
-  in_generator(_: Generator<this, this, this>) {}
+  in_generator(_: Generator<this, this, this>) {
+  }
   inout_generator: Generator<this, this, this>;
 }
 "
@@ -517,8 +524,10 @@ class Base2 {
     return this.bar();
   }
 
-  corge(that: this) {}
-  grault(that: Base2) {}
+  corge(that: this) {
+  }
+  grault(that: Base2) {
+  }
 }
 
 class Inherit2 extends Base2 {}
@@ -537,10 +546,12 @@ class Override2 extends Base2 {
   }
   // error (cf. OK above)
   // see exploit below
-  corge(that: this) {}
+  corge(that: this) {
+  }
   // error
   // see exploit below
-  grault(that: this) {} // error, too
+  grault(that: this) {
+  } // error, too
 }
 
 class InheritOverride2 extends Override2 {}
diff --git a/tests/traces/__snapshots__/jsfmt.spec.js.snap b/tests/traces/__snapshots__/jsfmt.spec.js.snap
index 6729365f8..fec2cca37 100644
--- a/tests/traces/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/traces/__snapshots__/jsfmt.spec.js.snap
@@ -21,21 +21,24 @@ function double(n) { return n * 2 }
 f3(double);
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // arg/param type mismatch on arg 0
-function g0(y: string) {}
+function g0(y: string) {
+}
 function f0(x) {
   g0(x);
 }
 f0(0);
 
 // ...on arg n
-function g1(a: string, b: string) {}
+function g1(a: string, b: string) {
+}
 function f1(x, y) {
   g1(x, y);
 }
 f1(\"hey\", 0);
 
 // h/o call with function expr
-function g2(ylam: (s: string) => number) {}
+function g2(ylam: (s: string) => number) {
+}
 function f2(xlam) {
   g2(xlam);
 }
@@ -44,7 +47,8 @@ f2(function(x) {
 });
 
 // h/o call with function def
-function g3(ylam: (s: string) => number) {}
+function g3(ylam: (s: string) => number) {
+}
 function f3(xlam) {
   g3(xlam);
 }
diff --git a/tests/trailingComma/__snapshots__/jsfmt.spec.js.snap b/tests/trailingComma/__snapshots__/jsfmt.spec.js.snap
index d6a325b0a..8586b8015 100644
--- a/tests/trailingComma/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/trailingComma/__snapshots__/jsfmt.spec.js.snap
@@ -11,7 +11,8 @@ a(
 
 a(\'value\', \'value2\', a(\'long-nested-value\', \'long-nested-value2\', \'long-nested-value3\'));
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-const a = (param1, param2, param3) => {};
+const a = (param1, param2, param3) => {
+};
 
 a(\"value\", \"value2\", \"value3\");
 
@@ -42,7 +43,8 @@ a(
 
 a(\'value\', \'value2\', a(\'long-nested-value\', \'long-nested-value2\', \'long-nested-value3\'));
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-const a = (param1, param2, param3) => {};
+const a = (param1, param2, param3) => {
+};
 
 a(\"value\", \"value2\", \"value3\");
 
diff --git a/tests/try/__snapshots__/jsfmt.spec.js.snap b/tests/try/__snapshots__/jsfmt.spec.js.snap
index 1f3d26836..93a7bbae1 100644
--- a/tests/try/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/try/__snapshots__/jsfmt.spec.js.snap
@@ -23,7 +23,8 @@ function foo() {
  * abnormal. It was weird.
  */
 function foo() {
-  try {} catch (error) {
+  try {
+  } catch (error) {
     if (error.foo === 4) {
       throw error;
     }
@@ -195,19 +196,22 @@ function f(b) {
 
 // for illustrative purposes only - Flow considers a throw possible
 // anywhere within a block
-function might_throw() {}
+function might_throw() {
+}
 
 // local use of annotated var within try is ok
 function f() {
   try {
     var x: number = 0;
     var y: number = x;
-  } catch (e) {}
+  } catch (e) {
+  }
 }
 
 // and within catch
 function f() {
-  try {} catch (e) {
+  try {
+  } catch (e) {
     var x: number = 0;
     var y: number = x;
   }
@@ -235,7 +239,8 @@ function f() {
 
 // or catch/finally
 function f() {
-  try {} catch (e) {
+  try {
+  } catch (e) {
     var x: number = 0;
   } finally {
     var y: number = x; // error
@@ -268,7 +273,9 @@ function f() {
 
 // and here
 function f() {
-  try {} catch (e) {} finally {
+  try {
+  } catch (e) {
+  } finally {
     might_throw();
     // ...but if so, suffix is not reached
     var x: number = 0;
@@ -280,7 +287,8 @@ function f() {
 function f() {
   try {
     var x: number;
-  } catch (e) {} finally {
+  } catch (e) {
+  } finally {
     might_throw();
     // ...but if so, suffix is not reached
     x = 0;
@@ -290,7 +298,8 @@ function f() {
 
 // and here, thank you JS for the wonder that is hoisting
 function f() {
-  try {} catch (e) {
+  try {
+  } catch (e) {
     var x: number;
   } finally {
     might_throw();
@@ -306,20 +315,23 @@ function f() {
   // error
   try {
     var x: number = 0;
-  } catch (e) {}
+  } catch (e) {
+  }
 }
 
 // another non-dominated post
 function f() {
   try {
     var x: number = 0;
-  } catch (e) {}
+  } catch (e) {
+  }
   var y: number = x; // error
 }
 
 // ditto
 function f() {
-  try {} catch (e) {
+  try {
+  } catch (e) {
     var x: number = 0;
   }
   var y: number = x; // error
@@ -333,7 +345,8 @@ function f(b) {
       throw new Error();
     }
     x = 0;
-  } catch (e) {}
+  } catch (e) {
+  }
   var y: number = x; // error
 }
 "
@@ -411,7 +424,8 @@ function corge(): string {
  */
 
 function foo(x: ?number): string {
-  try {} catch (e) {
+  try {
+  } catch (e) {
     return \"bar\";
   }
   console.log();
@@ -438,7 +452,8 @@ function baz(): string {
 function qux(): string {
   try {
     throw new Error(\"foo\");
-  } catch (e) {}
+  } catch (e) {
+  }
   console.log();
   return \"bar\";
 }
@@ -446,7 +461,8 @@ function qux(): string {
 function quux(): string {
   try {
     return qux();
-  } catch (e) {}
+  } catch (e) {
+  }
   return \"bar\";
 }
 
@@ -545,14 +561,16 @@ function bar(response) {
     throw new Error(\"...\");
   }
   // here via [try] only.
-  if (payload.error) {}
+  if (payload.error) {
+  }
 }
 
 function qux() {
   var x = 5;
   try {
     throw -1;
-  } finally {}
+  } finally {
+  }
   x(); // unreachable
 }
 "
diff --git a/tests/tuples/__snapshots__/jsfmt.spec.js.snap b/tests/tuples/__snapshots__/jsfmt.spec.js.snap
index dfc69350b..c9adebad6 100644
--- a/tests/tuples/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/tuples/__snapshots__/jsfmt.spec.js.snap
@@ -48,7 +48,8 @@ foo([ {} ]); // error, too few elements in array passed to a tuple
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 /* @flow */
 
-function foo(a: [Object, Object]) {}
+function foo(a: [Object, Object]) {
+}
 
 foo([ {} ]); // error, too few elements in array passed to a tuple
 "
diff --git a/tests/type-at-pos/__snapshots__/jsfmt.spec.js.snap b/tests/type-at-pos/__snapshots__/jsfmt.spec.js.snap
index 86b27b27f..8a7f4ed5a 100644
--- a/tests/type-at-pos/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/type-at-pos/__snapshots__/jsfmt.spec.js.snap
@@ -59,7 +59,10 @@ const y = {
 //   foo(): void {}
 // }
 
-const y = { bar(): void {} };
+const y = {
+  bar(): void {
+  }
+};
 "
 `;
 
@@ -132,7 +135,8 @@ module.exports = num;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 var num = 42;
-function bar() {}
+function bar() {
+}
 bar();
 module.exports = num;
 "
@@ -205,9 +209,12 @@ if (Array.isArray(x)) {}
 /* @flow */
 
 let x = 0;
-if (x == null) {}
-if (x == undefined) {}
-if (Array.isArray(x)) {}
+if (x == null) {
+}
+if (x == undefined) {
+}
+if (Array.isArray(x)) {
+}
 "
 `;
 
@@ -247,7 +254,8 @@ const w:MyNum = 42;
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 // @flow
 var str = require(\"./import\");
-function foo() {}
+function foo() {
+}
 foo();
 str;
 
@@ -273,6 +281,7 @@ try {
 
 try {
   throw \"foo\";
-} catch (e) {}
+} catch (e) {
+}
 "
 `;
diff --git a/tests/type_param_scope/__snapshots__/jsfmt.spec.js.snap b/tests/type_param_scope/__snapshots__/jsfmt.spec.js.snap
index 44c79a221..601f64caa 100644
--- a/tests/type_param_scope/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/type_param_scope/__snapshots__/jsfmt.spec.js.snap
@@ -15,7 +15,8 @@ class C<T> {
     this.b(a); // error: A ~> incompatible instance of T
   }
 
-  b(x: T) {}
+  b(x: T) {
+  }
 }
 "
 `;
@@ -36,7 +37,8 @@ f(0); // ok
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 function f<T>(a: T) {
   function g<U>(b: U, c: T = a) {
-    function h(d: U = b) {}
+    function h(d: U = b) {
+    }
     h();
     // ok
     h(b);
diff --git a/tests/typecast/__snapshots__/jsfmt.spec.js.snap b/tests/typecast/__snapshots__/jsfmt.spec.js.snap
index e5b5187b5..802943aa2 100644
--- a/tests/typecast/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typecast/__snapshots__/jsfmt.spec.js.snap
@@ -42,7 +42,8 @@ var tests = [
     // (parens always required around typecasts)
     var s: string = ((0: number), (\"hey\": string));
   },
-  () => {}
+  () => {
+  }
 ];
 "
 `;
diff --git a/tests/undefined/__snapshots__/jsfmt.spec.js.snap b/tests/undefined/__snapshots__/jsfmt.spec.js.snap
index d869ee280..227f852b2 100644
--- a/tests/undefined/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/undefined/__snapshots__/jsfmt.spec.js.snap
@@ -22,7 +22,8 @@ function doSomethingAsync(): Promise<void> {
 }
 
 // simpler repro to show that too few args are fine when expecting void
-function foo(x: void) {}
+function foo(x: void) {
+}
 foo();
 "
 `;
@@ -50,7 +51,8 @@ function bar() {
   if (x) x.bar();
 }
 
-function qux(x?: number, y: string = \"\", z) {}
+function qux(x?: number, y: string = \"\", z) {
+}
 "
 `;
 
diff --git a/tests/union/__snapshots__/jsfmt.spec.js.snap b/tests/union/__snapshots__/jsfmt.spec.js.snap
index 9d76de7e8..f79a666ae 100644
--- a/tests/union/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/union/__snapshots__/jsfmt.spec.js.snap
@@ -110,8 +110,27 @@ myclass.myfun([\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", function (ar) {}
 declare class Myclass { myfun(myarray: Array<Function | string>): any }
 declare var myclass: Myclass;
 
-myclass.myfun([ \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", function(ar) {} ]);
-myclass.myfun([ \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", function(ar) {} ]);
+myclass.myfun([
+  \"1\",
+  \"2\",
+  \"3\",
+  \"4\",
+  \"5\",
+  \"6\",
+  function(ar) {
+  }
+]);
+myclass.myfun([
+  \"1\",
+  \"2\",
+  \"3\",
+  \"4\",
+  \"5\",
+  \"6\",
+  \"7\",
+  function(ar) {
+  }
+]);
 "
 `;
 
@@ -325,7 +344,8 @@ type Foo<X: ?C> = Array<X>;
 // workaround
 var x: Array<C> = [];
 var y: Array<?C> = [];
-function foo<X>(x: Foo<X>) {}
+function foo<X>(x: Foo<X>) {
+}
 foo(x);
 foo(y);
 
@@ -336,7 +356,8 @@ type Bar = () => C | string;
 function f() {
   return \"\";
 }
-function bar(x: Bar) {}
+function bar(x: Bar) {
+}
 bar(f);
 "
 `;
@@ -410,7 +431,8 @@ function corge(b) {
     new F().foo(x);
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-function bar(x: Document | string): void {}
+function bar(x: Document | string): void {
+}
 bar(0);
 
 class C {}
@@ -419,9 +441,11 @@ function CD(b) {
   var E = b ? C : D;
   var c: C = new E();
   // error, since E could be D, and D is not a subtype of C
-  function qux(e: E) {}
+  function qux(e: E) {
+  }
   // this annotation is an error: is it C, or is it D?
-  function qux2(e: C | D) {}
+  function qux2(e: C | D) {
+  }
   // OK
   qux2(new C());
 }
diff --git a/tests/union_new/__snapshots__/jsfmt.spec.js.snap b/tests/union_new/__snapshots__/jsfmt.spec.js.snap
index e0e214dfe..4e04d09ea 100644
--- a/tests/union_new/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/union_new/__snapshots__/jsfmt.spec.js.snap
@@ -157,7 +157,8 @@ function node(content: ?Foobar | String | Array<String>) {
 /* @flow */
 import type { Foobar } from \"./issue-1455-helper\";
 
-function create(content: ?Foobar | String | Array<String>) {}
+function create(content: ?Foobar | String | Array<String>) {
+}
 
 function node(content: ?Foobar | String | Array<String>) {
   create(content);
@@ -490,7 +491,8 @@ type B4 = string;
 /////////////////////////////////////////////
 // similar example with class instance types
 /////////////////////////////////////////////
-function inst(a: A5 | A6) {}
+function inst(a: A5 | A6) {
+}
 
 class B5 {}
 class B6 {}
@@ -590,7 +592,8 @@ type B6 = string;
 // example with object types
 //////////////////////////////
 
-function obj(a: { x: number } | { x: string }) {}
+function obj(a: { x: number } | { x: string }) {
+}
 
 obj(({ x: \"\" }: A1));
 
@@ -601,7 +604,8 @@ type B1 = string;
 ///////////////////////////////////////
 // similar example with function types
 ///////////////////////////////////////
-function fun(a: (() => number) | (() => string)) {}
+function fun(a: (() => number) | (() => string)) {
+}
 
 fun((() => \"\": A2));
 
@@ -614,7 +618,8 @@ type B2 = string;
 /////////////////////////////////////////////////////
 class C<X> {}
 
-function inst(a: C<number> | C<string>) {}
+function inst(a: C<number> | C<string>) {
+}
 
 inst((new C(): A3));
 
@@ -625,8 +630,12 @@ type B3 = string;
 /////////////////////////////////////////////
 // similar example with generic type aliases
 /////////////////////////////////////////////
-function alias(a: T<number> | T<string>) {}
-alias({ x: (x: V<B4>) => {} });
+function alias(a: T<number> | T<string>) {
+}
+alias({
+  x: (x: V<B4>) => {
+  }
+});
 
 type T<X> = { x: U<X> };
 type U<X> = (x: V<X>) => void;
@@ -635,7 +644,8 @@ type V<X> = X;
 type B4 = string;
 
 // class statics
-function stat(a: { x: number } | { x: string }) {}
+function stat(a: { x: number } | { x: string }) {
+}
 
 class D {
   static x: B5;
@@ -646,7 +656,8 @@ stat(D);
 type B5 = string;
 
 // tuples
-function tup(a: [number, boolean] | [string, boolean]) {}
+function tup(a: [number, boolean] | [string, boolean]) {
+}
 
 tup(([ \"\", false ]: A6));
 
@@ -696,9 +707,13 @@ type B2 = string;
 // example with function types
 ///////////////////////////////
 
-function fun(a: ((x: number) => void) | ((x: string) => void)) {}
+function fun(a: ((x: number) => void) | ((x: string) => void)) {
+}
 
-fun((x => {}: A1));
+fun(
+  (x => {
+  }: A1)
+);
 
 type A1 = (x: B1) => void;
 
@@ -707,7 +722,8 @@ type B1 = string;
 ////////////////////////////
 // example with array types
 ////////////////////////////
-function arr(a: number[] | string[]) {}
+function arr(a: number[] | string[]) {
+}
 
 arr(([]: A2));
 
@@ -765,9 +781,11 @@ type B2 = string;
 // example with function types
 ///////////////////////////////
 
-function fun(a: ((x: number) => void) | ((x: string) => void)) {}
+function fun(a: ((x: number) => void) | ((x: string) => void)) {
+}
 
-const a1 = (x => {}: A1);
+const a1 = (x => {
+}: A1);
 fun(a1);
 
 function fun_call(x: string) {
@@ -781,7 +799,8 @@ type B1 = string;
 ////////////////////////////
 // example with array types
 ////////////////////////////
-function arr(a: number[] | string[]) {}
+function arr(a: number[] | string[]) {
+}
 
 const a2 = ([]: A2);
 arr(a2);
@@ -838,7 +857,8 @@ function arr_set(x: string, i: number) { a2[i] = x; }
 // example with function types
 ///////////////////////////////
 
-function fun(a: ((x: number) => number) | ((x: string) => string)) {}
+function fun(a: ((x: number) => number) | ((x: string) => string)) {
+}
 
 function a1(x) {
   return x;
@@ -852,7 +872,8 @@ function fun_call(x: string): string {
 /////////////////////////////
 // example with array types
 /////////////////////////////
-function arr(a: number[] | string[]) {}
+function arr(a: number[] | string[]) {
+}
 
 var a2 = [];
 arr(a2);
@@ -961,7 +982,8 @@ type PG<X> = { x: X, y?: PG<X> };
 // recursive types
 ////////////////////
 
-function rec(x: F1 | F2) {}
+function rec(x: F1 | F2) {
+}
 rec({ x: 0 });
 
 type F1 = G1;
@@ -974,7 +996,8 @@ type H2 = number;
 ///////////////////////////////
 // polymorphic recursive types
 ///////////////////////////////
-function polyrec(x: PF<number> | PF<string>) {}
+function polyrec(x: PF<number> | PF<string>) {
+}
 rec({ x: 0 });
 
 type PF<X> = PG<X>;
@@ -1017,7 +1040,8 @@ type H2_ = number;
 // nested union types
 //////////////////////
 
-function rec(x: F1 | F2) {}
+function rec(x: F1 | F2) {
+}
 rec({ x: 0 });
 
 type F1 = G1 | G1_;
@@ -1065,7 +1089,8 @@ function square(x? = 0) {
   return x * x;
 }
 
-function foo(f: ((_: ?number) => ?number) | (() => void)) {}
+function foo(f: ((_: ?number) => ?number) | (() => void)) {
+}
 foo((x): number => square(x));
 "
 `;
@@ -1153,7 +1178,8 @@ function id<X>(x: X): X {
 /////////////////////////
 // primitive annotations
 /////////////////////////
-function check_prim(_: number | string) {}
+function check_prim(_: number | string) {
+}
 
 // ok
 check_prim(\"\");
@@ -1166,7 +1192,8 @@ check_prim(id(\"\"));
 //////////////////////////////
 class C {}
 class D {}
-function check_inst(_: C | D) {}
+function check_inst(_: C | D) {
+}
 
 // ok
 check_inst(new D());
@@ -1177,7 +1204,8 @@ check_inst(id(new C()));
 ////////////////////////
 // function annotations
 ////////////////////////
-function check_fun(_: ((_: number) => number) | ((_: string) => string)) {}
+function check_fun(_: ((_: number) => number) | ((_: string) => string)) {
+}
 
 // help!
 check_fun(x => x);
@@ -1185,7 +1213,8 @@ check_fun(x => x);
 //////////////////////
 // object annotations
 //////////////////////
-function check_obj(_: { x: number } | { x: string }) {}
+function check_obj(_: { x: number } | { x: string }) {
+}
 
 // ok
 check_obj({ x: \"\" });
@@ -1196,7 +1225,8 @@ check_obj({ x: id(\"\") });
 /////////////////////
 // array annotations
 /////////////////////
-function check_arr(_: number[] | string[]) {}
+function check_arr(_: number[] | string[]) {
+}
 
 // ok
 check_arr([ \"\" ]);
@@ -1208,7 +1238,8 @@ check_arr([ id(\"\") ]);
 // generic class instance annotations
 //////////////////////////////////////
 class P<X> {}
-function check_poly_inst(_: P<number> | P<string>) {}
+function check_poly_inst(_: P<number> | P<string>) {
+}
 
 // help!
 check_poly_inst(new P());
@@ -1325,7 +1356,8 @@ function foo(c: C<number>) {
 
 declare class C<X> { get(): X }
 
-function union(o: { x: string } | { x: number }) {}
+function union(o: { x: string } | { x: number }) {
+}
 
 function foo(c: C<number>) {
   union({ x: c.get() });
@@ -1364,7 +1396,8 @@ bar(() => { });
 // functions as objects
 
 function foo<X>(target: EventTarget) {
-  target.addEventListener(\"click\", e => {});
+  target.addEventListener(\"click\", e => {
+  });
 }
 
 declare class EventTarget {
@@ -1379,9 +1412,11 @@ type EventHandler = (event: Event) => mixed;
 type KeyboardEventHandler = (event: KeyboardEvent) => mixed;
 
 // example where globals are not yet resolved
-function bar(x: (() => void) | { x: number }) {}
+function bar(x: (() => void) | { x: number }) {
+}
 
-bar(() => {});
+bar(() => {
+});
 "
 `;
 
@@ -1414,10 +1449,12 @@ type Foo = T | (() => boolean);
 
 type Bar = number | (() => string) | (() => boolean);
 
-function foo(x: Foo) {}
+function foo(x: Foo) {
+}
 foo(() => qux());
 
-function bar(x: Bar) {}
+function bar(x: Bar) {
+}
 bar(() => qux());
 
 var x = false;
diff --git a/tests/while/__snapshots__/jsfmt.spec.js.snap b/tests/while/__snapshots__/jsfmt.spec.js.snap
index c2d260910..61d584b89 100644
--- a/tests/while/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/while/__snapshots__/jsfmt.spec.js.snap
@@ -61,7 +61,8 @@ class C {
     return new C();
   }
 }
-function blah() {}
+function blah() {
+}
 var node: ?C = new C();
 while (node) {
   var parent = node.m();