From 5057e0314394c011b0afee36c13b3e365b96a78a Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Sat, 2 Apr 2022 17:33:19 +0300 Subject: [PATCH] chore(lint): error on no-useless-call --- .eslintrc.js | 2 +- packages/jest-mock/src/__tests__/index.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4d69f9235bad..8e4aec244a31 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -467,7 +467,7 @@ module.exports = { 'no-unused-expressions': 'off', 'no-unused-vars': ['error', {argsIgnorePattern: '^_'}], 'no-use-before-define': 'off', - 'no-useless-call': 'warn', + 'no-useless-call': 'error', 'no-useless-computed-key': 'error', 'no-useless-concat': 'error', 'no-var': 'error', diff --git a/packages/jest-mock/src/__tests__/index.test.ts b/packages/jest-mock/src/__tests__/index.test.ts index 371ba0a04ea8..4bb1e01af98c 100644 --- a/packages/jest-mock/src/__tests__/index.test.ts +++ b/packages/jest-mock/src/__tests__/index.test.ts @@ -442,9 +442,9 @@ describe('moduleMocker', () => { expect(fn.mock.contexts[2]).toBe(ctx2); // null context - fn.apply(null, []); + fn.apply(null, []); // eslint-disable-line no-useless-call expect(fn.mock.contexts[3]).toBe(null); - fn.call(null); + fn.call(null); // eslint-disable-line no-useless-call expect(fn.mock.contexts[4]).toBe(null); fn.bind(null)(); expect(fn.mock.contexts[5]).toBe(null);