From d19a0f3226ca4f04128d5683de7fbca223b9d2d9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 7 Aug 2024 07:00:04 +0200 Subject: [PATCH] chore: improve eslint no-unused-vars rule --- eslint.config.mjs | 9 ++++++++- src/components/charts/PlotConfigurator.vue | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9c804fe0..8a58934a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -30,7 +30,14 @@ export default [ // // disable eslint no-shadow as it's causing false positives on typescript enums // 'no-shadow': 'off', '@typescript-eslint/no-explicit-any': 'warn', - '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + caughtErrors: 'all', + caughtErrorsIgnorePattern: '^err|^error', + }, + ], // Custom vue rules 'vue/block-lang': [ diff --git a/src/components/charts/PlotConfigurator.vue b/src/components/charts/PlotConfigurator.vue index 91a64eca..8d59aaee 100644 --- a/src/components/charts/PlotConfigurator.vue +++ b/src/components/charts/PlotConfigurator.vue @@ -169,7 +169,7 @@ async function loadPlotConfigFromStrategy() { if (botStore.activeBot.strategyPlotConfig) { plotStore.editablePlotConfig = botStore.activeBot.strategyPlotConfig; } - } catch (data) { + } catch (error) { // showAlert('Failed to load Plot configuration from Strategy.'); }