From 73fbe80cff436277dd6bc29e9cfdf4aac02dbf2a Mon Sep 17 00:00:00 2001 From: Joachim Van Herwegen Date: Tue, 12 Mar 2024 15:43:52 +0100 Subject: [PATCH] refactor: Enable global-require rule --- eslint/general.js | 1 + test/util/SetupTests.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/eslint/general.js b/eslint/general.js index 4bb61b991..2ecd1b0ec 100644 --- a/eslint/general.js +++ b/eslint/general.js @@ -14,6 +14,7 @@ module.exports = { 'function-call-argument-newline': [ 'error', 'consistent' ], 'function-paren-newline': [ 'error', 'consistent' ], 'getter-return': [ 'error', { allowImplicit: true }], + 'global-require': 'error', 'grouped-accessor-pairs': [ 'error', 'getBeforeSet' ], 'guard-for-in': 'error', 'line-comment-position': [ 'error', { position: 'above' }], diff --git a/test/util/SetupTests.ts b/test/util/SetupTests.ts index 520b3309a..ebebad1da 100644 --- a/test/util/SetupTests.ts +++ b/test/util/SetupTests.ts @@ -12,7 +12,7 @@ export default async function(): Promise { // Also set the logger factory of transpiled JS modules // (which are instantiated by Components.js) try { - // eslint-disable-next-line ts/no-var-requires,ts/no-require-imports + // eslint-disable-next-line global-require,ts/no-var-requires,ts/no-require-imports const dist = require('../../dist/logging/LogUtil'); dist.setGlobalLoggerFactory(loggerFactory); } catch {