From be34dfe74a811c38927ee5728da4d3c0dfadf9d5 Mon Sep 17 00:00:00 2001 From: Gregory Schier Date: Fri, 13 Mar 2026 07:48:50 -0700 Subject: [PATCH] Fix no-base-to-string --- plugins/filter-xpath/src/index.ts | 1 + plugins/importer-postman-environment/src/index.ts | 1 + plugins/importer-postman/src/index.ts | 1 + plugins/template-function-xml/src/index.ts | 1 + src-web/components/GrpcProtoSelectionDialog.tsx | 4 ++-- src-web/components/Markdown.tsx | 2 +- src-web/components/core/Input.tsx | 2 +- src-web/components/core/PlainInput.tsx | 2 +- src-web/components/git/HistoryDialog.tsx | 2 +- src-web/components/graphql/GraphQLDocsExplorer.tsx | 6 +++--- src-web/lib/getNodeText.ts | 2 +- 11 files changed, 14 insertions(+), 10 deletions(-) diff --git a/plugins/filter-xpath/src/index.ts b/plugins/filter-xpath/src/index.ts index 538a6529..ebf632b9 100644 --- a/plugins/filter-xpath/src/index.ts +++ b/plugins/filter-xpath/src/index.ts @@ -1,3 +1,4 @@ +/* oxlint-disable no-base-to-string */ import { DOMParser } from '@xmldom/xmldom'; import type { PluginDefinition } from '@yaakapp/api'; import xpath from 'xpath'; diff --git a/plugins/importer-postman-environment/src/index.ts b/plugins/importer-postman-environment/src/index.ts index 7b480b2c..3a47daa1 100644 --- a/plugins/importer-postman-environment/src/index.ts +++ b/plugins/importer-postman-environment/src/index.ts @@ -1,3 +1,4 @@ +/* oxlint-disable no-base-to-string */ import type { Context, Environment, diff --git a/plugins/importer-postman/src/index.ts b/plugins/importer-postman/src/index.ts index 5aa957a6..df2cdc87 100644 --- a/plugins/importer-postman/src/index.ts +++ b/plugins/importer-postman/src/index.ts @@ -1,3 +1,4 @@ +/* oxlint-disable no-base-to-string */ import type { Context, Environment, diff --git a/plugins/template-function-xml/src/index.ts b/plugins/template-function-xml/src/index.ts index bb1e732b..3ba77924 100755 --- a/plugins/template-function-xml/src/index.ts +++ b/plugins/template-function-xml/src/index.ts @@ -1,3 +1,4 @@ +/* oxlint-disable no-base-to-string */ import { DOMParser } from '@xmldom/xmldom'; import type { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api'; import xpath from 'xpath'; diff --git a/src-web/components/GrpcProtoSelectionDialog.tsx b/src-web/components/GrpcProtoSelectionDialog.tsx index 2ce297ff..2b89faf2 100644 --- a/src-web/components/GrpcProtoSelectionDialog.tsx +++ b/src-web/components/GrpcProtoSelectionDialog.tsx @@ -103,7 +103,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp Found services{' '} {services?.slice(0, 5).map((s, i) => { return ( - + m.name).join(',')}> {s.name} {i === services.length - 1 ? '' : i === services.length - 2 ? ' and ' : ', '} @@ -119,7 +119,7 @@ function GrpcProtoSelectionDialogWithRequest({ request }: Props & { request: Grp Server reflection found services {services?.map((s, i) => { return ( - + m.name).join(',')}> {s.name} {i === services.length - 1 ? '' : i === services.length - 2 ? ' and ' : ', '} diff --git a/src-web/components/Markdown.tsx b/src-web/components/Markdown.tsx index ab6df5df..687f9f87 100644 --- a/src-web/components/Markdown.tsx +++ b/src-web/components/Markdown.tsx @@ -102,7 +102,7 @@ const markdownComponents: Partial = { language={match[1]} style={prismTheme} > - {String(children).replace(/\n$/, '')} + {String(children as string).replace(/\n$/, '')} ) : ( diff --git a/src-web/components/core/Input.tsx b/src-web/components/core/Input.tsx index e8efbd40..7d35ca62 100644 --- a/src-web/components/core/Input.tsx +++ b/src-web/components/core/Input.tsx @@ -329,7 +329,7 @@ function BaseInput({ {type === 'password' && !disableObscureToggle && ( void }, PlainInputProps>(fun {type === 'password' && !hideObscureToggle && ( {log.map((l) => ( - + {l.message || No message} diff --git a/src-web/components/graphql/GraphQLDocsExplorer.tsx b/src-web/components/graphql/GraphQLDocsExplorer.tsx index 6c0e95df..dfc1a793 100644 --- a/src-web/components/graphql/GraphQLDocsExplorer.tsx +++ b/src-web/components/graphql/GraphQLDocsExplorer.tsx @@ -146,7 +146,7 @@ export const GraphQLDocsExplorer = memo(function GraphQLDocsExplorer({ ) : (
@@ -202,7 +202,7 @@ function GraphQLExplorerHeader({ })}
diff --git a/src-web/lib/getNodeText.ts b/src-web/lib/getNodeText.ts index 2d5387d6..eab17d19 100644 --- a/src-web/lib/getNodeText.ts +++ b/src-web/lib/getNodeText.ts @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'; * https://stackoverflow.com/questions/50428910/get-text-content-from-node-in-react */ export function getNodeText(node: ReactNode): string { - if (['string', 'number'].includes(typeof node)) { + if (typeof node === 'string' || typeof node === 'number') { return String(node); }