diff --git a/.oxlintrc.json b/.oxlintrc.json index 52b22d40a8e..a31f16ac98b 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -8,6 +8,220 @@ }, "rules": { "curly": "error", + "eslint/no-underscore-dangle": [ + "error", + { + "allow": [ + "__agentId", + "__bundledOverrideRuntime", + "__bundledPluginFailureLoads", + "__bundledPluginUndefinedLoads", + "__bundledRootRuntime", + "__bundledSecretsFailureLoads", + "__bundledSetupFailureLoads", + "__bundledSetupOnlyMainLoaded", + "__bundledSetupOnlyPluginLoaded", + "__bundledSetupOnlySetupLoaded", + "__bundledSetupSecretsFailureLoads", + "__esModule", + "__dirname", + "__filename", + "__testing", + "__test__", + "__test", + "__testing_resetResolvedSkillsCache", + "__openclaw", + "__openclawBundledChannelReenter", + "__openclawBundledOverrideRuntime", + "__openclawBundledPluginFailureLoads", + "__openclawBundledPluginUndefinedLoads", + "__openclawBundledRootRuntime", + "__openclawBundledSecretsFailureLoads", + "__openclawBundledSetupFailureLoads", + "__openclawBundledSetupOnlyMainLoaded", + "__openclawBundledSetupOnlyPluginLoaded", + "__openclawBundledSetupOnlySetupLoaded", + "__openclawBundledSetupSecretsFailureLoads", + "__openclawDiagnosticStabilityState", + "__openclawLastA2UIAction", + "__openclawPreauthBudgetClaimed", + "__openclawPreauthBudgetKey", + "__openclawSessionEventWriteLockInstalled", + "__openclawSessionLockPromptReleaseInstalled", + "__openclawSessionWriteLockInstalled", + "__OPENCLAW_TEST_REFRESH_OPENAI_CODEX_TOKEN__", + "__countTrackedSessionBrowserTabsForTests", + "__emit", + "__gatewayStartupSecretsRuntimeMock", + "__image", + "__matrixQaProfileTesting", + "__OPENCLAW_VERSION__", + "__OPENCLAW_CONTROL_UI_BUILD_ID__", + "__OPENCLAW_NATIVE_CONTROL_AUTH__", + "__OPENCLAW_CONTROL_UI_BASE_PATH__", + "__testDivider", + "__proofAttachmentApi", + "__proofAttachmentLog", + "__QA_IMAGE_UNDERSTANDING_LARGE_PNG_BASE64", + "__QA_IMAGE_UNDERSTANDING_PNG_BASE64", + "__resetContainerEnvironmentCacheForTest", + "__resetDiscordChannelInfoCacheForTest", + "__resetDiscordDirectoryCacheForTest", + "__resetDiscordThreadStarterCacheForTest", + "__resetGatewayModelPricingCacheForTest", + "__resetLmstudioPreloadCooldownForTest", + "__resetModelCatalogCacheForTest", + "__resetSlackChannelTypeCacheForTest", + "__resetTrackedSessionBrowserTabsForTests", + "__resetUsageFormatCachesForTest", + "__sessionKey", + "__sessionUpdateMock", + "__setGatewayModelPricingForTest", + "__setMaxChatHistoryMessagesBytesForTest", + "__setMembers", + "__setModelCatalogImportForTest", + "__setRealtimeVoiceAgentConsultDepsForTest", + "__slackClient", + "__slackHandlers", + "__testOnlyOpenAiHttp", + "__truncated", + "__unhandledDestroyError", + "_accountRegistry", + "_adapter", + "_adapterFactory", + "_agentEventQueue", + "_ambiguousThreadReply", + "_approveRuntimeGetter", + "_audioPort", + "_baseSystemPrompt", + "_body", + "_boundaryPrefix", + "_cache", + "_cachedCapability", + "_callbackChain", + "_capturedPayload", + "_clearForTest", + "_client", + "_advancedWaitingSort", + "_diaryEntryCount", + "_diaryPage", + "_diarySubTab", + "_dreamIndex", + "_dreamLastSwap", + "_expandedInsightCards", + "_expandedPalaceCards", + "_indices", + "_keys", + "_pendingUpdate", + "_refreshSeq", + "_subTab", + "_wikiPreviewContent", + "_wikiPreviewError", + "_wikiPreviewLoading", + "_wikiPreviewOpen", + "_wikiPreviewPath", + "_wikiPreviewTitle", + "_wikiPreviewTotalLines", + "_wikiPreviewTruncated", + "_wikiPreviewUpdatedAt", + "_config", + "_createdAt", + "_createGraphCollectionResponse", + "_createHostedImageContents", + "_createMemoryConfig", + "_createMemorySyncControlConfigForTests", + "_createPdfResponse", + "_createUnboundConfiguredRoute", + "_data", + "_default", + "_def", + "_distance", + "_doIdle", + "_doPartialReply", + "_embeddedMode", + "_event", + "_exhaustive", + "_extensionRunner", + "_fallbackLogger", + "_findChatGuidForTest", + "_flow", + "_formatImagePlaceholder", + "_getActiveHandles", + "_getActiveRequests", + "_getData", + "_getStatusCode", + "_getTrustedDirs", + "_globalUndiciStreamTimeoutMs", + "_GRAPH_HOST", + "_handlers", + "_host", + "_id", + "_instruction", + "_isMockFunction", + "_item", + "_logger", + "_maxPayload", + "_meta", + "_mode", + "_normalizeDirectChatIdentifierForTest", + "_openclawVersion", + "_openRouterMusicTestInternals", + "_parsed", + "_pendingSessionText", + "_pendingUploadId", + "_pluginVersion", + "_private", + "_probeThrottleInternals", + "_processAgentEvent", + "_rawData", + "_ready", + "_rebuildSystemPrompt", + "_receiver", + "_registerOpenAIPlugin", + "_registerProvider", + "_requestLanguageOverride", + "_requestPromptOverride", + "_resetActiveManagedProxyStateForTests", + "_resetBootstrapWarningCacheForTest", + "_resetIMessageShortIdState", + "_resetMemoryEmbeddingProviders", + "_resetMemoryPluginState", + "_resetResolveSystemBin", + "_resetThreadParentContextCachesForTest", + "_resetWindowsInstallRootsForTests", + "_resolveFilename", + "_resolveVersion", + "_resolveWhatsAppAccountConfig", + "_rewriteFile", + "_setComfyFetchGuardForTesting", + "_setFalFetchGuardForTesting", + "_setFalVideoFetchGuardForTesting", + "_setGitHubCopilotDeviceFlowFetchGuardForTesting", + "_SHAREPOINT_HOST", + "_silkWasmAvailable", + "_silkWasmPromise", + "_socket", + "_status", + "_test", + "_token", + "_truncated", + "_videoGenerationSdkCompat", + "_QA_IMAGE_UNDERSTANDING_LARGE_PNG_BASE64", + "_QA_IMAGE_UNDERSTANDING_PNG_BASE64", + "_TEST_URL_HTML_A", + "_TEST_URL_HTML_B", + "_TEST_URL_IMAGE_1_PNG", + "_TEST_URL_IMAGE_2_JPG", + "_TEST_URL_IMAGE_PNG", + "_TEST_URL_PDF", + "_TEST_URL_PDF_1", + "_TEST_URL_PDF_2", + "isManuallyStopped_", + "resetRestartAttempts_", + "require_" + ] + } + ], "eslint-plugin-unicorn/prefer-array-find": "error", "eslint/no-array-constructor": "error", "eslint/no-await-in-loop": "off", diff --git a/scripts/lib/local-heavy-check-runtime.mjs b/scripts/lib/local-heavy-check-runtime.mjs index 485bf1fd2af..5691d762dc1 100644 --- a/scripts/lib/local-heavy-check-runtime.mjs +++ b/scripts/lib/local-heavy-check-runtime.mjs @@ -85,7 +85,6 @@ export function applyLocalOxlintPolicy(args, env, hostResources) { insertBeforeSeparator(nextArgs, "--type-aware"); insertBeforeSeparator(nextArgs, "--tsconfig", "config/tsconfig/oxlint.json"); - insertBeforeSeparator(nextArgs, "--allow", "eslint/no-underscore-dangle"); if ( !hasFlag(nextArgs, "--report-unused-disable-directives") && !hasFlag(nextArgs, "--report-unused-disable-directives-severity") diff --git a/test/scripts/local-heavy-check-runtime.test.ts b/test/scripts/local-heavy-check-runtime.test.ts index b16208b3abb..8cea45bb337 100644 --- a/test/scripts/local-heavy-check-runtime.test.ts +++ b/test/scripts/local-heavy-check-runtime.test.ts @@ -233,8 +233,6 @@ describe("local-heavy-check-runtime", () => { "--type-aware", "--tsconfig", "config/tsconfig/oxlint.json", - "--allow", - "eslint/no-underscore-dangle", "--report-unused-disable-directives-severity", "error", "--threads=1", @@ -248,8 +246,6 @@ describe("local-heavy-check-runtime", () => { "--type-aware", "--tsconfig", "config/tsconfig/oxlint.json", - "--allow", - "eslint/no-underscore-dangle", "--report-unused-disable-directives-severity", "error", "--threads=1", @@ -264,8 +260,6 @@ describe("local-heavy-check-runtime", () => { "--type-aware", "--tsconfig", "config/tsconfig/oxlint.json", - "--allow", - "eslint/no-underscore-dangle", "--report-unused-disable-directives-severity", "error", ]); @@ -284,8 +278,6 @@ describe("local-heavy-check-runtime", () => { "--type-aware", "--tsconfig", "config/tsconfig/oxlint.json", - "--allow", - "eslint/no-underscore-dangle", "--report-unused-disable-directives-severity", "error", ]); diff --git a/test/scripts/mantis-publish-pr-evidence.test.ts b/test/scripts/mantis-publish-pr-evidence.test.ts index 0d5a8dd9254..7ed6283a8d5 100644 --- a/test/scripts/mantis-publish-pr-evidence.test.ts +++ b/test/scripts/mantis-publish-pr-evidence.test.ts @@ -152,7 +152,7 @@ describe("scripts/mantis/publish-pr-evidence", () => { "content-type": "image/png", "x-amz-date": expect.any(String), }); - expect(String((requests[0]?.headers as Record).authorization)).toContain( + expect((requests[0]?.headers as Record).authorization).toContain( "Credential=access/", ); expect(String(requests[4]?.body)).toContain(