From ba1d36bcdade6d6deeb9061cec76d58c75267ca7 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Wed, 15 May 2024 12:21:55 +0700 Subject: [PATCH] Allowed underscore prefixed unused params With TypeScript, when creating mock instances, it's preferable to maintain a reference to the params, even if they're not used. This allows us to have unused variables as long as they're prefixed with an underscore. --- ghost/ghost/.eslintrc.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ghost/ghost/.eslintrc.js b/ghost/ghost/.eslintrc.js index 99420306c4..fd7c5da2c9 100644 --- a/ghost/ghost/.eslintrc.js +++ b/ghost/ghost/.eslintrc.js @@ -6,6 +6,14 @@ module.exports = { ], rules: { // disable file naming rule in favor or dotted notation e.g. `snippets.service.ts` - 'ghost/filenames/match-exported-class': [0, null, true] + 'ghost/filenames/match-exported-class': [0, null, true], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_' + } + ] } };