From 428636c047f946738ca77796599aeb32cd607072 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 23 Jul 2021 23:19:24 -0700 Subject: [PATCH] [eslint] enable `wrap-iife` --- .eslintrc | 3 +++ index.js | 4 ++-- lib/test.js | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 356a6546..5a8de8df 100644 --- a/.eslintrc +++ b/.eslintrc @@ -32,6 +32,9 @@ "nonwords": false, }], "strict": "error", + "wrap-iife": ["error", "outside", { + "functionPrototypeMethods": true, + }], }, "ignorePatterns": [ "syntax-error.*" ], "overrides": [ diff --git a/index.js b/index.js index 0e9bb5a2..4aa5f8e5 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,7 @@ module.exports = (function () { if (!harness) harness = createExitHarness(opts, wait); return harness; } -})(); +}()); function createExitHarness(conf, wait) { var config = conf || {}; @@ -137,7 +137,7 @@ function createHarness(conf_) { st.on('result', function (r) { if (!r.todo && !r.ok && typeof r !== 'string') test._exitCode = 1; }); - })(t); + }(t)); results.push(t); return t; diff --git a/lib/test.js b/lib/test.js index ed005cb6..bf27b818 100644 --- a/lib/test.js +++ b/lib/test.js @@ -92,7 +92,7 @@ function Test(name_, opts_, cb_) { }; } return val; - })(this, this[prop]); + }(this, this[prop])); } }