From 463418fd415db1494ee93d8c092decfe23301c68 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Thu, 13 Jul 2023 16:48:14 +0200 Subject: [PATCH] chore: disable `node/no-missing-require` eslint rule enforced by TS --- .eslintrc.js | 3 ++- src/rules/__tests__/unbound-method.test.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 3b971f7ce..a7b0157f7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -54,8 +54,9 @@ module.exports = { ], 'sort-imports': ['error', { ignoreDeclarationSort: true }], 'require-unicode-regexp': 'error', - // TS covers this + // TS covers these 2 'node/no-missing-import': 'off', + 'node/no-missing-require': 'off', 'node/no-unsupported-features/es-syntax': 'off', 'node/no-unsupported-features/es-builtins': 'error', 'import/no-commonjs': 'error', diff --git a/src/rules/__tests__/unbound-method.test.ts b/src/rules/__tests__/unbound-method.test.ts index cda01fd76..713cd71d5 100644 --- a/src/rules/__tests__/unbound-method.test.ts +++ b/src/rules/__tests__/unbound-method.test.ts @@ -126,7 +126,7 @@ const requireRule = (throwWhenRequiring: boolean) => { TSESLintPluginRef.throwWhenRequiring = throwWhenRequiring; - // eslint-disable-next-line @typescript-eslint/no-require-imports,node/no-missing-require + // eslint-disable-next-line @typescript-eslint/no-require-imports return require('../unbound-method').default; }; @@ -158,7 +158,7 @@ describe('error handling', () => { jest.resetModules(); - // eslint-disable-next-line @typescript-eslint/no-require-imports,node/no-missing-require + // eslint-disable-next-line @typescript-eslint/no-require-imports expect(() => require('../unbound-method').default).toThrow(/oh noes!/iu); }); });