From ba83cf04bdd518b5b2c5548f78a9c6eb1022b349 Mon Sep 17 00:00:00 2001 From: dblock Date: Wed, 5 Jun 2024 15:48:42 -0400 Subject: [PATCH] Turn on @typescript-eslint/no-unused-var. Signed-off-by: dblock --- eslint.config.mjs | 1 + tools/src/merger/GlobalParamsGenerator.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 53cdb0af2..c577ce741 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -53,6 +53,7 @@ export default [ } ], '@typescript-eslint/require-await': 'error', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], 'array-callback-return': 'off', 'new-cap': 'off', 'no-return-assign': 'error', diff --git a/tools/src/merger/GlobalParamsGenerator.ts b/tools/src/merger/GlobalParamsGenerator.ts index 8077db00f..1e1af59fb 100644 --- a/tools/src/merger/GlobalParamsGenerator.ts +++ b/tools/src/merger/GlobalParamsGenerator.ts @@ -24,8 +24,8 @@ export default class GlobalParamsGenerator { spec.components.parameters = { ...this.global_params, ...spec.components.parameters } const global_param_refs = Object.keys(this.global_params).map(param => ({ $ref: `#/components/parameters/${param}` })) - Object.entries(spec.paths as Document).forEach(([path, path_item]) => { - Object.entries(path_item as Document).forEach(([method, operation]) => { + Object.entries(spec.paths as Document).forEach(([_path, path_item]) => { + Object.entries(path_item as Document).forEach(([_method, operation]) => { const params = operation.parameters ?? [] operation.parameters = [...params, ...Object.values(global_param_refs)] })