From b369a68eb372be028953add44e9cfdb6e6e9d29d Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Wed, 21 Oct 2020 15:54:51 -0230 Subject: [PATCH] Fix node/no-callback-literal issues (#9668) Refs #9663 See [`node/no-callback-literal`][1] for more information. This change enables `node/no-callback-literal` and fixes the issues raised by the rule. [1]:https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-callback-literal.md --- .eslintrc.js | 1 - test/e2e/helpers.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3f09f8ad3..13de96e90 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -98,7 +98,6 @@ module.exports = { 'node/no-path-concat': 'off', 'dot-notation': 'off', 'mocha/max-top-level-suites': 'off', - 'node/no-callback-literal': 'off', }, overrides: [{ diff --git a/test/e2e/helpers.js b/test/e2e/helpers.js index c0aa19f74..26047550d 100644 --- a/test/e2e/helpers.js +++ b/test/e2e/helpers.js @@ -10,7 +10,7 @@ const largeDelayMs = regularDelayMs * 2 const dappPort = 8080 -async function withFixtures (options, callback) { +async function withFixtures (options, testSuite) { const { dapp, fixtures, ganacheOptions, driverOptions, title } = options const fixtureServer = new FixtureServer() const ganacheServer = new Ganache() @@ -33,8 +33,7 @@ async function withFixtures (options, callback) { const { driver } = await buildWebDriver(driverOptions) webDriver = driver - // eslint-disable-next-line node/callback-return,node/no-callback-literal - await callback({ + await testSuite({ driver, })