From 860a3d210dca5208295f371baf1fc60e3d12ef44 Mon Sep 17 00:00:00 2001 From: Roman Godmaire Date: Sat, 10 Feb 2024 08:23:49 -0500 Subject: [PATCH] lint: ignore unused vars with _ prefix --- plice/.eslintrc.cjs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plice/.eslintrc.cjs b/plice/.eslintrc.cjs index 4b29a01..551c581 100644 --- a/plice/.eslintrc.cjs +++ b/plice/.eslintrc.cjs @@ -26,5 +26,18 @@ module.exports = { parser: '@typescript-eslint/parser' } } - ] + ], + rules: { + // note you must disable the base rule + // as it can report incorrect errors + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_' + } + ] + } };