From 6909f59c1740b866fe09e9411715c6bf59a6a787 Mon Sep 17 00:00:00 2001 From: "Mr.Mao" <951416545@qq.com> Date: Fri, 9 Aug 2024 11:18:46 +0800 Subject: [PATCH] chore: eslint fix --- packages/@swag/fetch-js/src/parser/index.ts | 4 +--- packages/@swag/fetch-ts/src/parser/index.ts | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/@swag/fetch-js/src/parser/index.ts b/packages/@swag/fetch-js/src/parser/index.ts index f8147a3..6037d11 100644 --- a/packages/@swag/fetch-js/src/parser/index.ts +++ b/packages/@swag/fetch-js/src/parser/index.ts @@ -69,10 +69,8 @@ export function transformPaths(paths: Paths, { configRead, functions, interfaces required: false, }) - - if (config.method.toLowerCase() !== 'get') { + if (config.method.toLowerCase() !== 'get') options.unshift(['method', `"${config.method}"`]) - } transformHeaderOptions('body', { options, parameters }) diff --git a/packages/@swag/fetch-ts/src/parser/index.ts b/packages/@swag/fetch-ts/src/parser/index.ts index 882dbc0..2830fc1 100644 --- a/packages/@swag/fetch-ts/src/parser/index.ts +++ b/packages/@swag/fetch-ts/src/parser/index.ts @@ -64,13 +64,11 @@ export function transformPaths(paths: Paths, { configRead, functions, interfaces required: false, }) - if (config.method.toLowerCase() !== 'get') { + if (config.method.toLowerCase() !== 'get') options.unshift(['method', `"${config.method}"`]) - } transformHeaderOptions('body', { options, parameters }) - options.push(['...', 'config']) const { spaceResponseType } = transformParameters(parameters, {