const runner = require("./runner");
const marshal = require("./marshal");
const hasFailingChecks = require("./lib/has-failing-checks");

module.exports = (checks = []) => {
  const runChecks = runner(checks);

  return (req, res, next) =>
    runChecks(
      (err, result) =>
        (err
          ? next(err)
          : res
              .status(hasFailingChecks(result) ? 500 : 200)
              .json(marshal(result)))
    );
};

@@ -278,17 +278,16 @@
         
-(
 err%0A    
@@ -416,17 +416,16 @@
 result))
-)
 %0A    );%0A

Format middleware according to new prettier config