diff --git a/.oxlintrc.base.json b/.oxlintrc.base.json index 57e39bcc20dd..c9bc514a6548 100644 --- a/.oxlintrc.base.json +++ b/.oxlintrc.base.json @@ -17,13 +17,11 @@ "no-unused-expressions": ["error", { "allowShortCircuit": true }], "guard-for-in": "error", "array-callback-return": ["error", { "allowImplicit": true }], - "quotes": ["error", "single", { "avoidEscape": true }], - "no-return-await": "error", + "typescript/return-await": "error", "max-lines": ["error", { "max": 300, "skipComments": true, "skipBlankLines": true }], // === Import rules === "import/namespace": "off", - "import/no-unresolved": "off", // === Rules turned off (not enforced in ESLint or causing false positives) === "no-control-regex": "off", @@ -33,6 +31,24 @@ "no-constant-binary-expression": "off", "vitest/hoisted-apis-on-top": "off", "vitest/no-conditional-tests": "off", + // Vitest correctness rules newly surfaced by the oxlint 1.75 bump. We keep the vitest plugin + // (and its many other rules), but disable the ones now firing across the existing test suite. + "vitest/no-standalone-expect": "off", + "vitest/require-mock-type-parameters": "off", + "vitest/no-conditional-expect": "off", + "vitest/expect-expect": "off", + "vitest/require-to-throw-message": "off", + "vitest/valid-title": "off", + "vitest/valid-expect": "off", + "vitest/no-disabled-tests": "off", + "vitest/valid-describe-callback": "off", + // Not trusted / false positives for this codebase: the default-assignment and spread-fallback + // rules over-trigger, and we intentionally implement thenables (SyncPromise etc.). + "typescript/no-useless-default-assignment": "off", + "unicorn/no-useless-fallback-in-spread": "off", + "unicorn/no-thenable": "off", + "unicorn/prefer-string-starts-ends-with": "off", + "unicorn/no-new-array": "off", "no-unsafe-optional-chaining": "off", "no-eval": "off", "no-import-assign": "off", @@ -103,13 +119,12 @@ "typescript/require-array-sort-compare": "off", "typescript/no-base-to-string": "off", "typescript/await-thenable": "off", - "typescript/no-deprecated": "off" - } - }, - { - "files": ["*.tsx"], - "rules": { - "jsdoc/require-jsdoc": "off" + "typescript/no-deprecated": "off", + "no-unreachable": "off", + "unicorn/no-empty-file": "off", + "unicorn/no-single-promise-in-promise-methods": "off", + "unicorn/no-invalid-fetch-options": "off", + "unicorn/no-await-in-promise-methods": "off" } }, { @@ -202,6 +217,14 @@ "rules": { "no-restricted-globals": ["error", "window", "document", "location", "navigator"] } + }, + { + // Intentionally comment-only: a grep marker for the release-injection file, and a + // resolvable-but-empty module used to mock `$app/stores` in sveltekit tests. + "files": ["**/sentry-release-injection-file.js", "**/.empty.js"], + "rules": { + "unicorn/no-empty-file": "off" + } } ] } diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index 0a7a6c1b7d1f..51378b821a4c 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -10,8 +10,8 @@ "scripts": { "clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp", "install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && npx playwright install --with-deps || echo 'Skipping browser installation'", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "lint:types": "tsc --noEmit", "postinstall": "yarn install-browsers", "pretest": "yarn clean && yarn lint:types", diff --git a/dev-packages/browser-integration-tests/utils/helpers.ts b/dev-packages/browser-integration-tests/utils/helpers.ts index 91e5339ff550..e86c25715b76 100644 --- a/dev-packages/browser-integration-tests/utils/helpers.ts +++ b/dev-packages/browser-integration-tests/utils/helpers.ts @@ -520,7 +520,7 @@ export async function getMultipleSentryEnvelopeRequests( timeout?: number; envelopeType?: EnvelopeItemType | EnvelopeItemType[]; }, - requestParser: (req: Request) => T = envelopeRequestParser as (req: Request) => T, + requestParser: (req: Request) => T = envelopeRequestParser, ): Promise { return getMultipleRequests(page, count, envelopeUrlRegex, requestParser, options); } @@ -536,7 +536,7 @@ export async function getMultipleSentryEnvelopeRequests( export async function getFirstSentryEnvelopeRequest( page: Page, url?: string, - requestParser: (req: Request) => T = envelopeRequestParser as (req: Request) => T, + requestParser: (req: Request) => T = envelopeRequestParser, ): Promise { const reqs = await getMultipleSentryEnvelopeRequests(page, 1, { url }, requestParser); diff --git a/dev-packages/bun-integration-tests/package.json b/dev-packages/bun-integration-tests/package.json index 5a3f018a7faf..b09b5a5a21aa 100644 --- a/dev-packages/bun-integration-tests/package.json +++ b/dev-packages/bun-integration-tests/package.json @@ -7,8 +7,8 @@ }, "private": true, "scripts": { - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "lint:types": "tsc --noEmit", "test": "vitest run", "test:watch": "yarn test --watch" diff --git a/dev-packages/bun-integration-tests/runner.ts b/dev-packages/bun-integration-tests/runner.ts index b9831768f78a..6115196213d2 100644 --- a/dev-packages/bun-integration-tests/runner.ts +++ b/dev-packages/bun-integration-tests/runner.ts @@ -240,7 +240,8 @@ export function createRunner(...paths: string[]) { if (process.env.DEBUG) log('making request', method, url, headers, body); try { - const res = await fetch(url, { headers, method, body }); + const init: RequestInit = { headers, method, body }; + const res = await fetch(url, init); if (!res.ok) { if (!expectError) { diff --git a/dev-packages/clear-cache-gh-action/package.json b/dev-packages/clear-cache-gh-action/package.json index 4f71c378d3b5..c05556d8aff1 100644 --- a/dev-packages/clear-cache-gh-action/package.json +++ b/dev-packages/clear-cache-gh-action/package.json @@ -10,8 +10,8 @@ "main": "index.mjs", "type": "module", "scripts": { - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware" + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware" }, "dependencies": { "@actions/core": "1.10.1", diff --git a/dev-packages/cloudflare-integration-tests/package.json b/dev-packages/cloudflare-integration-tests/package.json index 961e60b7307a..22a7f0426906 100644 --- a/dev-packages/cloudflare-integration-tests/package.json +++ b/dev-packages/cloudflare-integration-tests/package.json @@ -7,8 +7,8 @@ }, "private": true, "scripts": { - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "lint:types": "tsc --noEmit", "test": "vitest run", "test:watch": "yarn test --watch" diff --git a/dev-packages/deno-integration-tests/package.json b/dev-packages/deno-integration-tests/package.json index f9093d7e34dc..6d566406f41b 100644 --- a/dev-packages/deno-integration-tests/package.json +++ b/dev-packages/deno-integration-tests/package.json @@ -9,8 +9,8 @@ "scripts": { "deno-types": "node ./scripts/download-deno-types.mjs", "install:deno": "node ./scripts/install-deno.mjs", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "test": "run-s install:deno deno-types test:unit", "test:unit": "deno test --allow-net --allow-read --allow-run --allow-env --no-check" }, diff --git a/dev-packages/e2e-tests/package.json b/dev-packages/e2e-tests/package.json index 12c885301b66..508531ac441f 100644 --- a/dev-packages/e2e-tests/package.json +++ b/dev-packages/e2e-tests/package.json @@ -4,8 +4,8 @@ "license": "MIT", "private": true, "scripts": { - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:ts": "tsc --noEmit", "test:e2e": "run-s test:prepare test:validate test:run", "test:run": "tsx run.ts", diff --git a/dev-packages/external-contributor-gh-action/package.json b/dev-packages/external-contributor-gh-action/package.json index 7d66114b93f6..7e293a617d5a 100644 --- a/dev-packages/external-contributor-gh-action/package.json +++ b/dev-packages/external-contributor-gh-action/package.json @@ -10,8 +10,8 @@ "main": "index.mjs", "type": "module", "scripts": { - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware" + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware" }, "dependencies": { "@actions/core": "1.10.1" diff --git a/dev-packages/node-integration-tests/package.json b/dev-packages/node-integration-tests/package.json index 595611a1e888..3109708dad3d 100644 --- a/dev-packages/node-integration-tests/package.json +++ b/dev-packages/node-integration-tests/package.json @@ -16,8 +16,8 @@ "build:types": "tsc -p tsconfig.types.json", "clean": "rimraf -g suites/**/node_modules suites/**/tmp_* && run-p clean:script", "clean:script": "node scripts/clean.js", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "type-check": "run-s type-check:src type-check:test", "type-check:src": "tsc --noEmit", "type-check:test": "tsc -p tsconfig.test.json --noEmit", diff --git a/dev-packages/node-integration-tests/src/index.ts b/dev-packages/node-integration-tests/src/index.ts index 828b517bc28c..757aa41b8dde 100644 --- a/dev-packages/node-integration-tests/src/index.ts +++ b/dev-packages/node-integration-tests/src/index.ts @@ -83,6 +83,9 @@ export async function waitForConnection Promise>( let lastError: unknown; for (;;) { try { + // probe() is already awaited here; the cast widens to ReturnType (a Promise type), which + // makes return-await think an outer await is still needed, so suppress it. + // oxlint-disable-next-line typescript/return-await return (await probe()) as ReturnType; } catch (error) { lastError = error; diff --git a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs index 56712e33a458..ecf793e49585 100644 --- a/dev-packages/rollup-utils/plugins/bundlePlugins.mjs +++ b/dev-packages/rollup-utils/plugins/bundlePlugins.mjs @@ -157,7 +157,7 @@ export function makeTerserPlugin() { ], }, }, - output: { + format: { comments: false, }, }); diff --git a/dev-packages/size-limit-gh-action/index.mjs b/dev-packages/size-limit-gh-action/index.mjs index 86cbcd21a793..7275274bb3c2 100644 --- a/dev-packages/size-limit-gh-action/index.mjs +++ b/dev-packages/size-limit-gh-action/index.mjs @@ -71,7 +71,7 @@ async function run() { // If we have no comparison branch, we just run size limit & store the result as artifact if (!comparisonBranch) { - return runSizeLimitOnComparisonBranch(); + return await runSizeLimitOnComparisonBranch(); } // Else, we run size limit for the current branch, AND fetch it for the comparison branch diff --git a/dev-packages/size-limit-gh-action/package.json b/dev-packages/size-limit-gh-action/package.json index 5ce36a062fe9..da092ae29735 100644 --- a/dev-packages/size-limit-gh-action/package.json +++ b/dev-packages/size-limit-gh-action/package.json @@ -10,8 +10,8 @@ "main": "index.mjs", "type": "module", "scripts": { - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware" + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware" }, "dependencies": { "@actions/artifact": "^6.1.0", diff --git a/dev-packages/test-utils/package.json b/dev-packages/test-utils/package.json index 4e288b3f7864..47ea0798b349 100644 --- a/dev-packages/test-utils/package.json +++ b/dev-packages/test-utils/package.json @@ -30,8 +30,8 @@ "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" }, "scripts": { - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "build": "run-s build:transpile build:types", "build:tarball": "run-s build:transpile build:types", "build:dev": "yarn build", diff --git a/package.json b/package.json index c783532c4014..d5f6e835054b 100644 --- a/package.json +++ b/package.json @@ -28,8 +28,8 @@ "format:check": "oxfmt . --check", "verify": "run-s format:check lint", "fix": "run-s format lint:fix", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint .", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix", + "lint": "oxlint .", + "lint:fix": "oxlint . --fix", "lint:es-compatibility": "nx run-many -t lint:es-compatibility", "lint:types": "nx run-many -t lint:types", "dedupe-deps:check": "yarn-deduplicate yarn.lock --list --fail", @@ -134,8 +134,8 @@ "npm-run-all2": "^6.2.0", "nx": "22.7.5", "oxfmt": "^0.38.0", - "oxlint": "^1.53.0", - "oxlint-tsgolint": "^0.16.0", + "oxlint": "^1.75.0", + "oxlint-tsgolint": "7", "rimraf": "^5.0.10", "rollup": "^4.60.3", "rollup-plugin-esbuild": "^6.2.1", diff --git a/packages/angular/package.json b/packages/angular/package.json index c65597e0241b..3fc3e4688728 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -52,8 +52,8 @@ "build:tarball": "npm pack ./build", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-angular-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/{esm2020,fesm2015,fesm2020}/*.mjs --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/astro/package.json b/packages/astro/package.json index 824d265f1fbe..482151704961 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -77,8 +77,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-astro-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/astro/src/integration/middleware/index.ts b/packages/astro/src/integration/middleware/index.ts index 0208290c2733..4a57bed425e9 100644 --- a/packages/astro/src/integration/middleware/index.ts +++ b/packages/astro/src/integration/middleware/index.ts @@ -20,5 +20,5 @@ export const onRequest: MiddlewareHandler = (ctx, next) => { // (e.g. `MiddlewareResponseHandler`, which is absent in some supported Astro versions). // The handler returned by `handleRequest()` is typed against Astro's own types, so we cast // back to its expected parameter types here – the runtime shapes are identical. - return middleware(ctx as Parameters[0], next as Parameters[1]); + return middleware(ctx as Parameters[0], next); }; diff --git a/packages/aws-serverless/package.json b/packages/aws-serverless/package.json index c516d711d6f5..a1b745ae3b75 100644 --- a/packages/aws-serverless/package.json +++ b/packages/aws-serverless/package.json @@ -87,8 +87,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build dist-awslambda-layer coverage sentry-serverless-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/npm/cjs/*.js && es-check es2022 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/aws-serverless/src/sdk.ts b/packages/aws-serverless/src/sdk.ts index ed24e5d22501..09986568defd 100644 --- a/packages/aws-serverless/src/sdk.ts +++ b/packages/aws-serverless/src/sdk.ts @@ -129,7 +129,7 @@ function setupTimeoutWarning(context: Context, options: WrapperOptions): NodeJS. scope.setTag('timeout', humanReadableTimeout); captureMessage(`Possible function timeout: ${context.functionName}`, 'warning'); }); - }, timeoutWarningDelay) as unknown as NodeJS.Timeout; + }, timeoutWarningDelay); } return undefined; @@ -184,6 +184,7 @@ export function wrapHandler( captureTimeoutWarning: true, timeoutWarningLimit: 500, captureAllSettledReasons: false, + // oxlint-disable-next-line typescript/no-deprecated -- set only to satisfy the type; see the TODO below startTrace: true, // TODO(v11): Remove this option. Set to true here to satisfy the type, but has no effect. ...wrapOptions, }; diff --git a/packages/browser-utils/package.json b/packages/browser-utils/package.json index ea5a26223bc1..453d108fd9d2 100644 --- a/packages/browser-utils/package.json +++ b/packages/browser-utils/package.json @@ -46,8 +46,8 @@ "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "clean": "rimraf build coverage sentry-browser-utils-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test:unit": "vitest run", "test": "vitest run", diff --git a/packages/browser-utils/src/htmlTreeAsString.ts b/packages/browser-utils/src/htmlTreeAsString.ts index 63872f7b2846..1fd7f75590bf 100644 --- a/packages/browser-utils/src/htmlTreeAsString.ts +++ b/packages/browser-utils/src/htmlTreeAsString.ts @@ -13,7 +13,7 @@ type SimpleNode = { type AccessorKey = 'parentNode' | 'tagName' | 'id' | 'className' | 'getAttribute' | 'dataset'; const accessors: Partial> = {}; -// oxlint-disable typescript-eslint(unbound-method) +// oxlint-disable typescript/unbound-method try { if (typeof Node !== 'undefined') { accessors.parentNode = Object.getOwnPropertyDescriptor(Node.prototype, 'parentNode')!.get!; @@ -31,7 +31,7 @@ try { // Polyfilled or stubbed prototypes may not have the expected descriptors. // _safeRead falls back to direct property access. } -// oxlint-enable typescript-eslint(unbound-method) +// oxlint-enable typescript/unbound-method function _safeRead(el: unknown, prop: AccessorKey, arg?: string): T { const fn = accessors[prop]; diff --git a/packages/browser-utils/src/metrics/web-vitals/lib/initUnique.ts b/packages/browser-utils/src/metrics/web-vitals/lib/initUnique.ts index 5043dcaa62b6..ae955917bd46 100644 --- a/packages/browser-utils/src/metrics/web-vitals/lib/initUnique.ts +++ b/packages/browser-utils/src/metrics/web-vitals/lib/initUnique.ts @@ -27,7 +27,7 @@ export function initUnique(identityObj: object, ClassObj: new () => T): T { instanceMap.set(identityObj, new ClassObj()); } return instanceMap.get(identityObj)! as T; - } catch (_e) { + } catch { // --- START Sentry-custom code (try/catch wrapping) --- // Fix for cases where identityObj is not a valid key for WeakMap (sometimes a problem in Safari) // Just return a new instance without caching it in instanceMap diff --git a/packages/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts b/packages/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts index 5f57c0c6952c..89d5ac59f722 100644 --- a/packages/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts +++ b/packages/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts @@ -57,5 +57,5 @@ export const initInteractionCountPolyfill = (): void => { type: 'event', buffered: true, durationThreshold: 0, - } as PerformanceObserverInit); + }); }; diff --git a/packages/browser/package.json b/packages/browser/package.json index cb7f6aec3afa..ef55d622b1ec 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -62,8 +62,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage .rpt2_cache sentry-browser-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs/prod}/*.js && es-check es2020 ./build/npm/esm/prod/*.js --module", "size:check": "cat build/bundles/bundle.min.js | gzip -9 | wc -c | awk '{$1=$1/1024; print \"ES2017: \",$1,\"kB\";}'", "test": "vitest run", diff --git a/packages/browser/src/eventbuilder.ts b/packages/browser/src/eventbuilder.ts index 346db4e17e9e..948732738c70 100644 --- a/packages/browser/src/eventbuilder.ts +++ b/packages/browser/src/eventbuilder.ts @@ -74,14 +74,14 @@ function eventFromPlainObject( }; } + const exceptionValue: Exception = { + type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error', + value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }), + }; + const event = { exception: { - values: [ - { - type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error', - value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }), - } as Exception, - ], + values: [exceptionValue], }, extra, } satisfies Event; @@ -269,7 +269,7 @@ export function eventFromUnknownInput( ): Event { let event: Event; - if (isErrorEvent(exception as ErrorEvent) && (exception as ErrorEvent).error) { + if (isErrorEvent(exception) && (exception as ErrorEvent).error) { // If it is an ErrorEvent with `error` property, extract it to get actual Error const errorEvent = exception as ErrorEvent; return eventFromError(stackParser, errorEvent.error as Error); @@ -282,7 +282,7 @@ export function eventFromUnknownInput( // https://developer.mozilla.org/en-US/docs/Web/API/DOMError // https://developer.mozilla.org/en-US/docs/Web/API/DOMException // https://webidl.spec.whatwg.org/#es-DOMException-specialness - if (isDOMError(exception) || isDOMException(exception as DOMException)) { + if (isDOMError(exception) || isDOMException(exception)) { const domException = exception as DOMException; if ('stack' in (exception as Error)) { diff --git a/packages/browser/src/integrations/view-hierarchy.ts b/packages/browser/src/integrations/view-hierarchy.ts index 646d52ffb9f4..5073f2ef970e 100644 --- a/packages/browser/src/integrations/view-hierarchy.ts +++ b/packages/browser/src/integrations/view-hierarchy.ts @@ -91,6 +91,7 @@ export const viewHierarchyIntegration = defineIntegration((options: Options = {} const { x, y, width, height } = child.getBoundingClientRect(); const window: ViewHierarchyWindow = { + // oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- rule false positive: the cast drops `undefined` to satisfy `identifier: string`; tsc errors without it identifier: (child.id || undefined) as string, type: componentName || tagName, visible: true, diff --git a/packages/browser/src/profiling/utils.ts b/packages/browser/src/profiling/utils.ts index 7f1ecdbc6d8f..938b7eadb784 100644 --- a/packages/browser/src/profiling/utils.ts +++ b/packages/browser/src/profiling/utils.ts @@ -614,7 +614,7 @@ export function startJSSelfProfile(): JSSelfProfiler | undefined { // as we risk breaking the user's application, so just disable profiling and log an error. try { return new JSProfilerConstructor({ sampleInterval: samplingIntervalMS, maxBufferSize: maxSamples }); - } catch (_e) { + } catch { if (DEBUG_BUILD) { debug.log( "[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.", diff --git a/packages/browser/src/tracing/request.ts b/packages/browser/src/tracing/request.ts index 1c33ceb1f8af..43f31f1ec465 100644 --- a/packages/browser/src/tracing/request.ts +++ b/packages/browser/src/tracing/request.ts @@ -131,6 +131,7 @@ export const defaultRequestInstrumentationOptions: RequestInstrumentationOptions traceFetch: true, traceXHR: true, enableHTTPTimings: true, + // oxlint-disable-next-line typescript/no-deprecated -- default for the deprecated option, kept until it is removed trackFetchStreamPerformance: false, }; diff --git a/packages/bun/package.json b/packages/bun/package.json index da4d858fa105..c7796501483c 100644 --- a/packages/bun/package.json +++ b/packages/bun/package.json @@ -62,8 +62,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-bun-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "install:bun": "node ./scripts/install-bun.js", "test": "run-s install:bun test:bun", diff --git a/packages/bundler-plugins/package.json b/packages/bundler-plugins/package.json index bd0b3c7bc725..fd9ecbc6117e 100644 --- a/packages/bundler-plugins/package.json +++ b/packages/bundler-plugins/package.json @@ -86,8 +86,8 @@ "clean": "rimraf build dist coverage sentry-bundler-plugins-*.tgz", "clean:all": "run-p clean clean:deps", "clean:deps": "rimraf node_modules", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "test": "vitest run", "test:unit": "vitest run" }, diff --git a/packages/bundler-plugins/src/core/build-plugin-manager.ts b/packages/bundler-plugins/src/core/build-plugin-manager.ts index 0df5d5ddd4ce..c54bc59e0301 100644 --- a/packages/bundler-plugins/src/core/build-plugin-manager.ts +++ b/packages/bundler-plugins/src/core/build-plugin-manager.ts @@ -638,9 +638,8 @@ export function createSentryBuildPluginManager( globAssets = buildArtifactPaths; } - const globResult = await startSpan( - { name: 'glob', scope: sentryScope }, - async () => await globFiles(globAssets, { ignore: options.sourcemaps?.ignore }), + const globResult = await startSpan({ name: 'glob', scope: sentryScope }, async () => + globFiles(globAssets, { ignore: options.sourcemaps?.ignore }), ); const debugIdChunkFilePaths = globResult.filter(debugIdChunkFilePath => { diff --git a/packages/bundler-plugins/src/core/options-mapping.ts b/packages/bundler-plugins/src/core/options-mapping.ts index b4ccc584b68e..df716b922851 100644 --- a/packages/bundler-plugins/src/core/options-mapping.ts +++ b/packages/bundler-plugins/src/core/options-mapping.ts @@ -113,6 +113,7 @@ export function normalizeUserOptions(userOptions: UserOptions): NormalizedOption create: userOptions.release?.create ?? true, finalize: userOptions.release?.finalize ?? true, vcsRemote: userOptions.release?.vcsRemote ?? process.env['SENTRY_VSC_REMOTE'] ?? 'origin', + // oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- rule false positive: the cast carries the internal `shouldNotThrowOnFailure` field; tsc errors without it setCommits: userOptions.release?.setCommits as | (SetCommitsOptions & { shouldNotThrowOnFailure?: boolean }) | false diff --git a/packages/cloudflare/package.json b/packages/cloudflare/package.json index f4ea3da77209..7cbc2794f9c5 100644 --- a/packages/cloudflare/package.json +++ b/packages/cloudflare/package.json @@ -85,8 +85,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-cloudflare-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/prod/*.js && es-check es2022 ./build/esm/prod/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/cloudflare/src/defineCloudflareOptions.ts b/packages/cloudflare/src/defineCloudflareOptions.ts index 6e905dad7fa1..b751221f0f61 100644 --- a/packages/cloudflare/src/defineCloudflareOptions.ts +++ b/packages/cloudflare/src/defineCloudflareOptions.ts @@ -39,7 +39,7 @@ export function defineCloudflareOptions( optionsOrCallback: CloudflareOptions | ((env: Env) => CloudflareOptions | undefined), ): (env: Env) => CloudflareOptions | undefined { if (typeof optionsOrCallback === 'function') { - return optionsOrCallback as (env: Env) => CloudflareOptions | undefined; + return optionsOrCallback; } return () => optionsOrCallback; diff --git a/packages/cloudflare/src/instrumentations/instrumentSqlStorage.ts b/packages/cloudflare/src/instrumentations/instrumentSqlStorage.ts index 739a0a7ef14a..590c5814cb34 100644 --- a/packages/cloudflare/src/instrumentations/instrumentSqlStorage.ts +++ b/packages/cloudflare/src/instrumentations/instrumentSqlStorage.ts @@ -30,6 +30,7 @@ export function instrumentSqlStorage(sql: SqlStorage): SqlStorage { const sanitizedQuery = _INTERNAL_sanitizeSqlQuery(query); const querySummary = _INTERNAL_getSqlQuerySummary(sanitizedQuery); + // oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- rule false positive: the cast reaches the Cloudflare-only `durableObjectSqlSpanAllowlist`; tsc errors without it const allowlist = (getClient()?.getOptions() as CloudflareClientOptions | undefined) ?.durableObjectSqlSpanAllowlist; diff --git a/packages/cloudflare/src/vite/transform.ts b/packages/cloudflare/src/vite/transform.ts index 05af1cce0cea..0802ae9f7081 100644 --- a/packages/cloudflare/src/vite/transform.ts +++ b/packages/cloudflare/src/vite/transform.ts @@ -155,7 +155,7 @@ export function applyAutoInstrumentTransforms( // would otherwise wrap it twice). for (const node of ast.body) { if (node.type === 'ExportNamedDeclaration') { - handleNamedExport(node as ExportNamedNode, ctx, state); + handleNamedExport(node, ctx, state); } } for (const node of ast.body) { @@ -260,13 +260,13 @@ function handleNamedExport(node: ExportNamedNode, ctx: TransformContext, state: // `export const MyDO = instrumentDurableObjectWithSentry(...)` — count it // as wrapped so the plugin doesn't warn about it, but leave it alone. if (decl?.type === 'VariableDeclaration') { - collectManuallyWrappedClassExports(decl as VariableDeclarationNode, ctx, state); + collectManuallyWrappedClassExports(decl, ctx, state); return; } // ---- Named class export matching a configured binding ---- if (decl?.type === 'ClassDeclaration') { - wrapInlineClassExport(node, decl as ClassDeclarationNode, ctx, state); + wrapInlineClassExport(node, decl, ctx, state); return; } diff --git a/packages/cloudflare/src/vite/workerEntrypoint.ts b/packages/cloudflare/src/vite/workerEntrypoint.ts index 0baf2720a4fd..35433f46b46d 100644 --- a/packages/cloudflare/src/vite/workerEntrypoint.ts +++ b/packages/cloudflare/src/vite/workerEntrypoint.ts @@ -83,10 +83,10 @@ export function detectWorkerEntrypointClasses(ast: ProgramBody): Set { /** Unwrap `export class Foo {}` to its ClassDeclaration; pass bare classes through. */ function asClassDeclaration(node: BaseNode): ClassDeclarationNode | undefined { - if (node.type === 'ClassDeclaration') return node as ClassDeclarationNode; + if (node.type === 'ClassDeclaration') return node; if (node.type === 'ExportNamedDeclaration') { const decl = (node as ExportNamedDeclNode).declaration; - if (decl?.type === 'ClassDeclaration') return decl as ClassDeclarationNode; + if (decl?.type === 'ClassDeclaration') return decl; } return undefined; } diff --git a/packages/core/package.json b/packages/core/package.json index af00b77c1de4..e67358ef3ed1 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -78,8 +78,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-core-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/core/src/instrument/console.ts b/packages/core/src/instrument/console.ts index 3a797a25908a..bc80dda2639d 100644 --- a/packages/core/src/instrument/console.ts +++ b/packages/core/src/instrument/console.ts @@ -87,7 +87,7 @@ export function instrumentConsole(): void { // Only trigger handlers for non-filtered messages if (!isFiltered) { - triggerHandlers('console', { args, level } as HandlerDataConsole); + triggerHandlers('console', { args, level }); } // Only log filtered messages in debug mode diff --git a/packages/core/src/integrations/dedupe.ts b/packages/core/src/integrations/dedupe.ts index c641d6ff4789..f815cd869515 100644 --- a/packages/core/src/integrations/dedupe.ts +++ b/packages/core/src/integrations/dedupe.ts @@ -3,7 +3,6 @@ import { defineIntegration } from '../integration'; import type { Event } from '../types/event'; import type { Exception } from '../types/exception'; import type { IntegrationFn } from '../types/integration'; -import type { StackFrame } from '../types/stackframe'; import { debug } from '../utils/debug-logger'; import { getFramesFromEvent } from '../utils/stacktrace'; @@ -109,22 +108,14 @@ function _isSameExceptionEvent(currentEvent: Event, previousEvent: Event): boole } function _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean { - let currentFrames = getFramesFromEvent(currentEvent); - let previousFrames = getFramesFromEvent(previousEvent); + const currentFrames = getFramesFromEvent(currentEvent); + const previousFrames = getFramesFromEvent(previousEvent); - // If neither event has a stacktrace, they are assumed to be the same - if (!currentFrames && !previousFrames) { - return true; - } - - // If only one event has a stacktrace, but not the other one, they are not the same - if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) { - return false; + // If either event is missing a stacktrace, they are the same only if neither has one + if (!currentFrames || !previousFrames) { + return !currentFrames && !previousFrames; } - currentFrames = currentFrames as StackFrame[]; - previousFrames = previousFrames as StackFrame[]; - // If number of frames differ, they are not the same if (previousFrames.length !== currentFrames.length) { return false; @@ -151,22 +142,14 @@ function _isSameStacktrace(currentEvent: Event, previousEvent: Event): boolean { } function _isSameFingerprint(currentEvent: Event, previousEvent: Event): boolean { - let currentFingerprint = currentEvent.fingerprint; - let previousFingerprint = previousEvent.fingerprint; + const currentFingerprint = currentEvent.fingerprint; + const previousFingerprint = previousEvent.fingerprint; - // If neither event has a fingerprint, they are assumed to be the same - if (!currentFingerprint && !previousFingerprint) { - return true; + // If either event is missing a fingerprint, they are the same only if neither has one + if (!currentFingerprint || !previousFingerprint) { + return !currentFingerprint && !previousFingerprint; } - // If only one event has a fingerprint, but not the other one, they are not the same - if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) { - return false; - } - - currentFingerprint = currentFingerprint as string[]; - previousFingerprint = previousFingerprint as string[]; - // Otherwise, compare the two try { return !!(currentFingerprint.join('') === previousFingerprint.join('')); diff --git a/packages/core/src/integrations/http/patch-request-to-capture-body.ts b/packages/core/src/integrations/http/patch-request-to-capture-body.ts index 2915fcc12dc3..774d84eba7db 100644 --- a/packages/core/src/integrations/http/patch-request-to-capture-body.ts +++ b/packages/core/src/integrations/http/patch-request-to-capture-body.ts @@ -54,7 +54,7 @@ export function patchRequestToCaptureBody( `Dropping request body chunk because maximum body length of ${maxBodySize}b is exceeded.`, ); } - } catch (_err) { + } catch { DEBUG_BUILD && debug.error(integrationName, 'Encountered error while storing body chunk.'); } diff --git a/packages/core/src/integrations/http/server-subscription.ts b/packages/core/src/integrations/http/server-subscription.ts index 95eb90ae5f92..2f3a2a089e31 100644 --- a/packages/core/src/integrations/http/server-subscription.ts +++ b/packages/core/src/integrations/http/server-subscription.ts @@ -297,7 +297,7 @@ function buildServerSpanWrap( // Old Semantic Conventions attributes for compatibility [URL_FULL]: fullUrl, [URL_PATH]: urlObj?.pathname ?? httpTargetWithoutQueryFragment, - // oxlint-disable-next-line typescript-eslint(no-deprecated) + // oxlint-disable-next-line typescript/no-deprecated [HTTP_URL]: fullUrl, 'http.method': method, 'http.target': urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment, diff --git a/packages/core/src/integrations/mcp-server/handlers.ts b/packages/core/src/integrations/mcp-server/handlers.ts index 1fb7df919b50..0f6bf191aa38 100644 --- a/packages/core/src/integrations/mcp-server/handlers.ts +++ b/packages/core/src/integrations/mcp-server/handlers.ts @@ -122,7 +122,7 @@ function captureHandlerError(error: Error, methodName: keyof MCPServerInstance, extraData.prompt_name = handlerName; captureError(error, 'prompt_execution', extraData); } - } catch (_captureErr) { + } catch { // noop } } diff --git a/packages/core/src/metrics/envelope.ts b/packages/core/src/metrics/envelope.ts index 32d33fc2b509..f760673f8d5d 100644 --- a/packages/core/src/metrics/envelope.ts +++ b/packages/core/src/metrics/envelope.ts @@ -24,7 +24,7 @@ export function createMetricContainerEnvelopeItem( type: 'trace_metric', item_count: items.length, content_type: 'application/vnd.sentry.items.trace-metric+json', - } as MetricContainerItem[0], + }, { version: 2, ...(isBrowser() && { diff --git a/packages/core/src/tracing/anthropic-ai/index.ts b/packages/core/src/tracing/anthropic-ai/index.ts index 38b3313fa0d6..00e638c6e516 100644 --- a/packages/core/src/tracing/anthropic-ai/index.ts +++ b/packages/core/src/tracing/anthropic-ai/index.ts @@ -349,7 +349,7 @@ function instrumentMethod( return wrapPromiseWithMethods(originalResult, instrumentedPromise, 'auto.ai.anthropic'); }, - }) as (...args: T) => R | Promise; + }); } /** diff --git a/packages/core/src/tracing/google-genai/index.ts b/packages/core/src/tracing/google-genai/index.ts index 1049db1980ec..0b6c96d0ac81 100644 --- a/packages/core/src/tracing/google-genai/index.ts +++ b/packages/core/src/tracing/google-genai/index.ts @@ -40,7 +40,7 @@ import { import { GOOGLE_GENAI_METHOD_REGISTRY, GOOGLE_GENAI_SYSTEM_NAME } from './constants'; import { instrumentStream } from './streaming'; import type { Candidate, ContentPart, GoogleGenAIOptions, GoogleGenAIResponse } from './types'; -import type { ContentListUnion, ContentUnion, Message, PartListUnion } from './utils'; +import type { ContentListUnion, Message, PartListUnion } from './utils'; import { contentUnionToMessages } from './utils'; /** @@ -165,7 +165,7 @@ export function addPrivateRequestAttributes( 'systemInstruction' in params.config && params.config.systemInstruction ) { - messages.push(...contentUnionToMessages(params.config.systemInstruction as ContentUnion, 'system')); + messages.push(...contentUnionToMessages(params.config.systemInstruction, 'system')); } // For chats.create: history contains the conversation history @@ -350,7 +350,7 @@ function instrumentMethod( }, ); }, - }) as (...args: T) => R | Promise; + }); } /** diff --git a/packages/core/src/tracing/google-genai/utils.ts b/packages/core/src/tracing/google-genai/utils.ts index 9286822fa60d..007ab9859a35 100644 --- a/packages/core/src/tracing/google-genai/utils.ts +++ b/packages/core/src/tracing/google-genai/utils.ts @@ -38,7 +38,7 @@ export function contentUnionToMessages(content: ContentListUnion, role = 'user') return [content as Message]; } if ('parts' in content) { - return [{ ...content, role } as Message]; + return [{ ...content, role }]; } return [{ role, content }]; } diff --git a/packages/core/src/tracing/langchain/embeddings.ts b/packages/core/src/tracing/langchain/embeddings.ts index c5bbc6dd5f0a..1ace6eaa4de2 100644 --- a/packages/core/src/tracing/langchain/embeddings.ts +++ b/packages/core/src/tracing/langchain/embeddings.ts @@ -104,7 +104,7 @@ export function instrumentEmbeddingMethod( }); }); }, - }) as (...args: unknown[]) => Promise; + }); } /** diff --git a/packages/core/src/tracing/langchain/utils.ts b/packages/core/src/tracing/langchain/utils.ts index c99d5c5ddcbd..7d5b86369df4 100644 --- a/packages/core/src/tracing/langchain/utils.ts +++ b/packages/core/src/tracing/langchain/utils.ts @@ -391,9 +391,7 @@ function addTokenUsageAttributes( ): void { if (!llmOutput) return; - const tokenUsage = llmOutput.tokenUsage as - | { promptTokens?: number; completionTokens?: number; totalTokens?: number } - | undefined; + const tokenUsage = llmOutput.tokenUsage; const anthropicUsage = llmOutput.usage as | { input_tokens?: number; diff --git a/packages/core/src/tracing/langgraph/index.ts b/packages/core/src/tracing/langgraph/index.ts index 95314be0076d..f708e4c40f70 100644 --- a/packages/core/src/tracing/langgraph/index.ts +++ b/packages/core/src/tracing/langgraph/index.ts @@ -117,7 +117,7 @@ export function instrumentStateGraphCompile( options, undefined, sentryHandler, - ) as typeof originalInvoke; + ); } return compiledGraph; @@ -133,7 +133,7 @@ export function instrumentStateGraphCompile( } }); }, - }) as (...args: unknown[]) => CompiledGraph; + }); Object.defineProperty(wrapped, SENTRY_PATCHED, { value: true, enumerable: false }); return wrapped; @@ -257,7 +257,7 @@ export function instrumentCompiledGraphInvoke( }, ); }, - }) as (...args: unknown[]) => Promise; + }); } /** @@ -309,12 +309,12 @@ export function instrumentCreateReactAgent( resolvedOptions, llm, sentryHandler, - ) as typeof originalInvoke; + ); } return compiledGraph; }, - }) as (...args: unknown[]) => CompiledGraph; + }); Object.defineProperty(wrapped, SENTRY_PATCHED, { value: true, enumerable: false }); return wrapped; diff --git a/packages/core/src/tracing/langgraph/utils.ts b/packages/core/src/tracing/langgraph/utils.ts index 5d755f2802c5..eb504e51bde7 100644 --- a/packages/core/src/tracing/langgraph/utils.ts +++ b/packages/core/src/tracing/langgraph/utils.ts @@ -297,7 +297,7 @@ export function setResponseAttributes(span: Span, inputMessages: LangChainMessag // Extract and set tool calls from new messages BEFORE normalization // (normalization strips tool_calls, so we need to extract them first) - const toolCalls = extractToolCalls(newMessages as Array>); + const toolCalls = extractToolCalls(newMessages); if (toolCalls) { span.setAttribute(GEN_AI_RESPONSE_TOOL_CALLS, JSON.stringify(toolCalls)); } diff --git a/packages/core/src/tracing/openai/streaming.ts b/packages/core/src/tracing/openai/streaming.ts index 9fbdacd1e8c9..4ba624481b70 100644 --- a/packages/core/src/tracing/openai/streaming.ts +++ b/packages/core/src/tracing/openai/streaming.ts @@ -223,9 +223,9 @@ export async function* instrumentStream( try { for await (const event of stream) { if (isChatCompletionChunk(event)) { - processChatCompletionChunk(event as ChatCompletionChunk, state, recordOutputs); + processChatCompletionChunk(event, state, recordOutputs); } else if (isResponsesApiStreamEvent(event)) { - processResponsesApiEvent(event as ResponseStreamingEvent, state, recordOutputs, span); + processResponsesApiEvent(event, state, recordOutputs, span); } yield event; } diff --git a/packages/core/src/transports/offline.ts b/packages/core/src/transports/offline.ts index 8c58a1b0e00b..33877b1c70b3 100644 --- a/packages/core/src/transports/offline.ts +++ b/packages/core/src/transports/offline.ts @@ -116,7 +116,7 @@ export function makeOfflineTransport( }); } }, delay), - ) as Timer; + ); } function flushWithBackOff(): void { @@ -171,7 +171,7 @@ export function makeOfflineTransport( await store.push(envelope); } flushWithBackOff(); - log('Error sending. Event queued.', e as Error); + log('Error sending. Event queued.', e); return {}; } else { throw e; diff --git a/packages/core/src/utils/baggage.ts b/packages/core/src/utils/baggage.ts index 1abd89b57ba3..b378b8905c5d 100644 --- a/packages/core/src/utils/baggage.ts +++ b/packages/core/src/utils/baggage.ts @@ -43,7 +43,7 @@ export function baggageHeaderToDynamicSamplingContext( // Only return a dynamic sampling context object if there are keys in it. // A keyless object means there were no sentry values on the header, which means that there is no DSC. if (Object.keys(dynamicSamplingContext).length > 0) { - return dynamicSamplingContext as Partial; + return dynamicSamplingContext; } else { return undefined; } diff --git a/packages/core/src/utils/get-default-export.ts b/packages/core/src/utils/get-default-export.ts index 4e406219562f..73511a1df088 100644 --- a/packages/core/src/utils/get-default-export.ts +++ b/packages/core/src/utils/get-default-export.ts @@ -18,10 +18,7 @@ */ export function getDefaultExport(moduleExport: T | { default: T }): T { return ( - (!!moduleExport && - typeof moduleExport === 'object' && - 'default' in moduleExport && - (moduleExport as { default: T }).default) || + (!!moduleExport && typeof moduleExport === 'object' && 'default' in moduleExport && moduleExport.default) || (moduleExport as T) ); } diff --git a/packages/core/src/utils/spanOnScope.ts b/packages/core/src/utils/spanOnScope.ts index ff1e5983895d..8b5c170bcd63 100644 --- a/packages/core/src/utils/spanOnScope.ts +++ b/packages/core/src/utils/spanOnScope.ts @@ -16,7 +16,7 @@ type ScopeWithMaybeSpan = Scope & { export function _setSpanForScope(scope: Scope, span: Span | undefined): void { if (span) { // Use WeakRef to avoid circular reference with span holding scope - addNonEnumerableProperty(scope as ScopeWithMaybeSpan, SCOPE_SPAN_FIELD, makeWeakRef(span)); + addNonEnumerableProperty(scope, SCOPE_SPAN_FIELD, makeWeakRef(span)); } else { // eslint-disable-next-line @typescript-eslint/no-dynamic-delete delete (scope as ScopeWithMaybeSpan)[SCOPE_SPAN_FIELD]; diff --git a/packages/core/src/utils/spanUtils.ts b/packages/core/src/utils/spanUtils.ts index 170334da27d3..84dc4b57039a 100644 --- a/packages/core/src/utils/spanUtils.ts +++ b/packages/core/src/utils/spanUtils.ts @@ -374,7 +374,7 @@ export function addChildSpanToSpan(span: SpanWithPotentialChildren, childSpan: S // We store the root span reference on the child span // We need this for `getRootSpan()` to work const rootSpan = span[ROOT_SPAN_FIELD] || span; - addNonEnumerableProperty(childSpan as SpanWithPotentialChildren, ROOT_SPAN_FIELD, rootSpan); + addNonEnumerableProperty(childSpan, ROOT_SPAN_FIELD, rootSpan); // We store a list of child spans on the parent span // We need this for `getSpanDescendants()` to work diff --git a/packages/core/src/utils/syncpromise.ts b/packages/core/src/utils/syncpromise.ts index 0b885910fee3..4248b1a7823e 100644 --- a/packages/core/src/utils/syncpromise.ts +++ b/packages/core/src/utils/syncpromise.ts @@ -125,7 +125,7 @@ export class SyncPromise implements PromiseLike { return; } - resolve(val as unknown as any); + resolve(val); }); }); } @@ -145,7 +145,7 @@ export class SyncPromise implements PromiseLike { } if (this._state === STATE_RESOLVED) { - handler[1](this._value as unknown as any); + handler[1](this._value); } if (this._state === STATE_REJECTED) { diff --git a/packages/core/test/lib/transports/base.test.ts b/packages/core/test/lib/transports/base.test.ts index 0b761d5d6708..9a2d53582686 100644 --- a/packages/core/test/lib/transports/base.test.ts +++ b/packages/core/test/lib/transports/base.test.ts @@ -339,7 +339,7 @@ describe('createTransport', () => { try { await transport.send(CLIENT_REPORT_ENVELOPE); - } catch (_e) { + } catch { // Expected to throw } @@ -383,7 +383,7 @@ describe('createTransport', () => { try { await transport.send(ERROR_ENVELOPE); - } catch (_e) { + } catch { // Expected to throw } diff --git a/packages/deno/package.json b/packages/deno/package.json index 6740b465f816..af49fbb46874 100644 --- a/packages/deno/package.json +++ b/packages/deno/package.json @@ -42,8 +42,8 @@ "clean": "rimraf build build-types build-test coverage node_modules/.deno sentry-deno-*.tgz", "prefix": "yarn deno-types", "prelint": "yarn deno-types", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "lint:es-compatibility": "es-check es2022 ./build/esm/*.js --module", "install:deno": "node ./scripts/install-deno.mjs", "test": "run-s install:deno deno-types test:unit", diff --git a/packages/deno/src/integrations/deno-serve.ts b/packages/deno/src/integrations/deno-serve.ts index 18af58b8d60d..05cf1b4cdd62 100644 --- a/packages/deno/src/integrations/deno-serve.ts +++ b/packages/deno/src/integrations/deno-serve.ts @@ -29,11 +29,12 @@ const isServeInitOptions = (p: ServeParams): p is [Deno.ServeOptions 'handler' in p[0] && typeof p[0].handler === 'function'; -const applyHandlerWrap = ( - handler: (request: Request, info: Deno.ServeHandlerInfo) => Response | Promise, - serveOptions?: Deno.ServeOptions, -): Deno.ServeHandler => - ((request, info) => +const applyHandlerWrap = + ( + handler: (request: Request, info: Deno.ServeHandlerInfo) => Response | Promise, + serveOptions?: Deno.ServeOptions, + ): Deno.ServeHandler => + (request, info) => wrapDenoRequestHandler( { request, @@ -41,7 +42,7 @@ const applyHandlerWrap = ( serveOptions, } as RequestHandlerWrapperOptions, () => handler(request, info as Deno.ServeHandlerInfo), - )) as Deno.ServeHandler; + ); const instrumentedDenoServe = (serve: typeof Deno.serve): typeof Deno.serve => new Proxy(serve, { diff --git a/packages/deno/src/integrations/http.ts b/packages/deno/src/integrations/http.ts index 6e11f7abaa99..7d2b90f3f8f5 100644 --- a/packages/deno/src/integrations/http.ts +++ b/packages/deno/src/integrations/http.ts @@ -1,6 +1,6 @@ import { subscribe } from 'node:diagnostics_channel'; import { errorMonitor } from 'node:events'; -import type { ClientRequest, RequestOptions } from 'node:http'; +import type { RequestOptions } from 'node:http'; import type { HttpIncomingMessage, Integration, IntegrationFn, Span } from '@sentry/core'; import { debug, @@ -136,7 +136,7 @@ const _denoHttpIntegration = ((options: DenoHttpIntegrationOptions = {}) => { breadcrumbs, propagateTrace: tracePropagation, ignoreOutgoingRequests: options.ignoreOutgoingRequests - ? (url, request) => options.ignoreOutgoingRequests!(url, getRequestOptions(request as ClientRequest)) + ? (url, request) => options.ignoreOutgoingRequests!(url, getRequestOptions(request)) : undefined, // Deno doesn't run OTel's http instrumentation, so there's no // double-wrap to detect; skip the warning to avoid loading the module. diff --git a/packages/deno/src/utils/streaming.ts b/packages/deno/src/utils/streaming.ts index 35233f9b1a5f..045ad0735fb2 100644 --- a/packages/deno/src/utils/streaming.ts +++ b/packages/deno/src/utils/streaming.ts @@ -66,7 +66,7 @@ export async function streamResponse(span: Span, res: Response): Promise { if (_backburner) { - return _backburner as unknown as Pick; + return _backburner; } if ((run as unknown as { backburner?: Pick }).backburner) { diff --git a/packages/ember/package.json b/packages/ember/package.json index 441b6aa2ef53..b3462b2ec480 100644 --- a/packages/ember/package.json +++ b/packages/ember/package.json @@ -21,9 +21,9 @@ "clean": "yarn rimraf sentry-ember-*.tgz dist tmp build .node_modules.ember-try package.json.ember-try instance-initializers index.d.ts runloop.d.ts types.d.ts", "lint": "run-p lint:js lint:hbs lint:ts", "lint:hbs": "ember-template-lint .", - "lint:js": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:js": "oxlint . --type-aware", "lint:ts": "tsc", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "start": "ember serve", "test": "ember b --prod && ember test", "prepack": "ember ts:precompile", diff --git a/packages/eslint-plugin-sdk/package.json b/packages/eslint-plugin-sdk/package.json index a295fc81fdd2..c10ec3720f85 100644 --- a/packages/eslint-plugin-sdk/package.json +++ b/packages/eslint-plugin-sdk/package.json @@ -23,8 +23,8 @@ }, "scripts": { "clean": "yarn rimraf sentry-eslint-plugin-sdk-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "test": "vitest run", "test:watch": "vitest --watch", "build:tarball": "npm pack", diff --git a/packages/feedback/package.json b/packages/feedback/package.json index 47d203e41721..37dac84d99a5 100644 --- a/packages/feedback/package.json +++ b/packages/feedback/package.json @@ -51,8 +51,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-feedback-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx b/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx index 8995566fa8c2..e0768e802870 100644 --- a/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx +++ b/packages/feedback/src/screenshot/components/ScreenshotEditor.tsx @@ -244,7 +244,7 @@ export function ScreenshotEditorFactory({ y: Math.min(startingPoint.y, y), w: Math.abs(x - startingPoint.x), h: Math.abs(y - startingPoint.y), - } as DrawCommand; + }; }; const handleMouseMove = (e: MouseEvent): void => { diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index 2e502b404072..760571c2f425 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -65,8 +65,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage *.d.ts sentry-gatsby-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index 31e6a3d823b2..e2640fb11633 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -70,8 +70,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-google-cloud-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/google-cloud-serverless/src/sdk.ts b/packages/google-cloud-serverless/src/sdk.ts index c903e2f69238..eb92438c4c6e 100644 --- a/packages/google-cloud-serverless/src/sdk.ts +++ b/packages/google-cloud-serverless/src/sdk.ts @@ -14,6 +14,7 @@ function getCjsOnlyIntegrations(): Integration[] { ]; /*! rollup-include-cjs-only-end */ /*! rollup-include-esm-only */ + // oxlint-disable-next-line no-unreachable -- reachable only in the ESM build; rollup strips the CJS return above return []; /*! rollup-include-esm-only-end */ } diff --git a/packages/hono/package.json b/packages/hono/package.json index 4b0dda41ff32..782a9b3c1178 100644 --- a/packages/hono/package.json +++ b/packages/hono/package.json @@ -122,8 +122,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-hono-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/hono/src/cloudflare/middleware.ts b/packages/hono/src/cloudflare/middleware.ts index 69f1c029ac02..59ca038c4eb4 100644 --- a/packages/hono/src/cloudflare/middleware.ts +++ b/packages/hono/src/cloudflare/middleware.ts @@ -19,7 +19,7 @@ export function sentry( ): MiddlewareHandler { withSentry( env => { - const honoOptions = typeof options === 'function' ? options(env as E['Bindings']) : options; + const honoOptions = typeof options === 'function' ? options(env) : options; applySdkMetadata(honoOptions, 'hono', ['hono', 'cloudflare']); diff --git a/packages/hono/src/shared/applyPatches.ts b/packages/hono/src/shared/applyPatches.ts index 190b2fcd93ce..e3189f2f63f2 100644 --- a/packages/hono/src/shared/applyPatches.ts +++ b/packages/hono/src/shared/applyPatches.ts @@ -3,7 +3,7 @@ import type { Env, Hono } from 'hono'; import { DEBUG_BUILD } from '../debug-build'; import { patchAppRequest } from './patchAppRequest'; import { patchAppUse, patchHttpMethodHandlers } from './patchAppUse'; -import { type HonoRoute, type RouteHookHandle, installRouteHookOnPrototype, wrapSubAppMiddleware } from './patchRoute'; +import { type RouteHookHandle, installRouteHookOnPrototype, wrapSubAppMiddleware } from './patchRoute'; // Lazily set by the first call to earlyPatchHono or applyPatches. let _routeHook: RouteHookHandle | undefined; @@ -48,7 +48,7 @@ export function applyPatches(app: Hono): void { } for (const subApp of pendingSubApps) { - wrapSubAppMiddleware(subApp.routes as HonoRoute[]); + wrapSubAppMiddleware(subApp.routes); patchAppRequest(subApp); } diff --git a/packages/hono/src/shared/patchRoute.ts b/packages/hono/src/shared/patchRoute.ts index 19a8f9fa503f..67e6d83d52f3 100644 --- a/packages/hono/src/shared/patchRoute.ts +++ b/packages/hono/src/shared/patchRoute.ts @@ -46,7 +46,7 @@ function createRouteHook(): { handle: RouteHookHandle; onSubAppMounted: (subApp: onSubAppMounted: (subApp: HonoAny) => { if (activated) { DEBUG_BUILD && debug.log(`[hono] Instrumenting sub-app at mount time (${subApp.routes.length} routes).`); - wrapSubAppMiddleware(subApp.routes as HonoRoute[]); + wrapSubAppMiddleware(subApp.routes); patchAppRequest(subApp); } else { DEBUG_BUILD && diff --git a/packages/integration-shims/package.json b/packages/integration-shims/package.json index 35d0d6f9c89f..70202b509381 100644 --- a/packages/integration-shims/package.json +++ b/packages/integration-shims/package.json @@ -32,8 +32,8 @@ "build:dev:watch": "run-p build:watch", "build:transpile:watch": "yarn build:transpile --watch", "clean": "rimraf build", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run" }, diff --git a/packages/integration-shims/src/logs.ts b/packages/integration-shims/src/logs.ts index 7544a80cd30d..aca7b0775490 100644 --- a/packages/integration-shims/src/logs.ts +++ b/packages/integration-shims/src/logs.ts @@ -1,4 +1,4 @@ -import type { Integration, ParameterizedString } from '@sentry/core/browser'; +import type { ParameterizedString } from '@sentry/core/browser'; import { consoleSandbox, defineIntegration } from '@sentry/core/browser'; import { FAKE_FUNCTION } from './common'; import { DEBUG_BUILD } from './debug-build'; @@ -27,7 +27,7 @@ function fmtShim(_strings: TemplateStringsArray, ..._values: unknown[]): Paramet // eslint-disable-next-line no-console console.warn('You are using Sentry.logger.fmt even though this bundle does not include logs.'); }); - return '' as ParameterizedString; + return ''; } export const loggerShim = { @@ -56,4 +56,4 @@ export const consoleLoggingIntegrationShim = defineIntegration((_options?: unkno name: 'ConsoleLogs', setup: FAKE_FUNCTION, }; -}) as () => Integration; +}); diff --git a/packages/nestjs/package.json b/packages/nestjs/package.json index 1e781fc79eb2..2cfe49b1a28d 100644 --- a/packages/nestjs/package.json +++ b/packages/nestjs/package.json @@ -74,8 +74,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts && madge --circular src/setup.ts", "clean": "rimraf build coverage sentry-nestjs-*.tgz ./*.d.ts ./*.d.ts.map", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/nextjs/.oxlintrc.json b/packages/nextjs/.oxlintrc.json index 09d83fd8261c..2730786490e8 100644 --- a/packages/nextjs/.oxlintrc.json +++ b/packages/nextjs/.oxlintrc.json @@ -15,12 +15,6 @@ "sdk/no-unsafe-random-apis": "error" }, "overrides": [ - { - "files": ["src/config/templates/**/*.ts"], - "rules": { - "import/no-extraneous-dependencies": "off" - } - }, { "files": ["src/config/polyfills/perf_hooks.js"], "globals": { diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index b119abebdb19..e40382d27880 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -103,8 +103,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/edge/index.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-nextjs-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:all": "run-s test:unit", diff --git a/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts b/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts index 43ae1c0fe232..3e9e2d709671 100644 --- a/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts +++ b/packages/nextjs/src/client/routing/pagesRouterRoutingInstrumentation.ts @@ -27,11 +27,7 @@ const Router: typeof RouterImport = RouterImport.events ? RouterImport : (RouterImport as unknown as { default: typeof RouterImport }).default; -const globalObject = WINDOW as typeof WINDOW & { - __BUILD_MANIFEST?: { - sortedPages?: string[]; - }; -}; +const globalObject = WINDOW; /** * Describes data located in the __NEXT_DATA__ script tag. This tag is present on every page of a Next.js app. diff --git a/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts b/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts index e2dc92fdab49..4bfc30367e52 100644 --- a/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts +++ b/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts @@ -20,7 +20,7 @@ interface ClassComponent { function storeCapturedEventIdOnError(error: unknown, eventId: string | undefined): void { if (isObjectLike(error)) { - addNonEnumerableProperty(error as Record, '__sentry_event_id__', eventId); + addNonEnumerableProperty(error, '__sentry_event_id__', eventId); } } diff --git a/packages/nextjs/src/config/templates/pageWrapperTemplate.ts b/packages/nextjs/src/config/templates/pageWrapperTemplate.ts index a2acc25d42b2..de30867f5728 100644 --- a/packages/nextjs/src/config/templates/pageWrapperTemplate.ts +++ b/packages/nextjs/src/config/templates/pageWrapperTemplate.ts @@ -52,7 +52,7 @@ export const getServerSideProps = ? Sentry.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '__ROUTE__') : undefined; -export default pageComponent ? Sentry.wrapPageComponentWithSentry(pageComponent as unknown) : pageComponent; +export default pageComponent ? Sentry.wrapPageComponentWithSentry(pageComponent) : pageComponent; // Re-export anything exported by the page module we're wrapping. When processing this code, Rollup is smart enough to // not include anything whose name matches something we've explicitly exported above. diff --git a/packages/nitro/package.json b/packages/nitro/package.json index ec0e35fcb399..cc17edbd6b86 100644 --- a/packages/nitro/package.json +++ b/packages/nitro/package.json @@ -56,8 +56,8 @@ "build:types:watch": "tsc -p tsconfig.types.json --watch", "build:tarball": "npm pack", "clean": "rimraf build coverage sentry-nitro-*.tgz", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "lint:es-compatibility": "es-check es2022 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/node-native/package.json b/packages/node-native/package.json index fbee84046e43..4b0795b01331 100644 --- a/packages/node-native/package.json +++ b/packages/node-native/package.json @@ -42,9 +42,9 @@ ], "scripts": { "clean": "rm -rf build", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "build": "yarn build:types && yarn build:transpile", "build:transpile": "yarn rollup -c rollup.npm.config.mjs", "build:types": "tsc -p tsconfig.types.json", diff --git a/packages/node/package.json b/packages/node/package.json index 89ad77dbc181..098d43192498 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -123,8 +123,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-node-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/node/src/cron/node-cron.ts b/packages/node/src/cron/node-cron.ts index 71bf2d913313..db3445fe8471 100644 --- a/packages/node/src/cron/node-cron.ts +++ b/packages/node/src/cron/node-cron.ts @@ -58,7 +58,7 @@ export function instrumentNodeCron( // We have to manually catch here and capture the exception because node-cron swallows errors // https://github.com/node-cron/node-cron/issues/399 try { - // oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime + // oxlint-disable-next-line typescript/await-thenable, typescript/return-await -- callback may be async at runtime; awaiting inside the try lets us capture its rejection return await callback(...args); } catch (e) { captureException(e, { diff --git a/packages/node/src/integrations/console.ts b/packages/node/src/integrations/console.ts index c2f4146f4c8a..3deb098d12d7 100644 --- a/packages/node/src/integrations/console.ts +++ b/packages/node/src/integrations/console.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { ConsoleLevel, HandlerDataConsole, WrappedFunction } from '@sentry/core'; +import type { ConsoleLevel, WrappedFunction } from '@sentry/core'; import { CONSOLE_LEVELS, GLOBAL_OBJ, @@ -87,13 +87,13 @@ function patchWithDefineProperty(consoleObj: Console, level: ConsoleLevel): void } isExecuting = true; try { - triggerHandlers('console', { args, level } as HandlerDataConsole); + triggerHandlers('console', { args, level }); delegate.apply(consoleObj, args); } finally { isExecuting = false; } }; - markFunctionWrapped(wrapper as unknown as WrappedFunction, nativeMethod as unknown as WrappedFunction); + markFunctionWrapped(wrapper, nativeMethod); // consoleSandbox reads originalConsoleMethods[level] to temporarily bypass instrumentation. We replace it with a distinct reference (.bind creates a // new function identity) so the setter can tell apart "consoleSandbox bypass" from "external code restoring a native method captured before Sentry init." @@ -135,7 +135,7 @@ function patchWithDefineProperty(consoleObj: Console, level: ConsoleLevel): void originalConsoleMethods[level] = originalConsoleMethod; return function (this: Console, ...args: any[]): void { - triggerHandlers('console', { args, level } as HandlerDataConsole); + triggerHandlers('console', { args, level }); originalConsoleMethods[level]?.apply(this, args); }; }); diff --git a/packages/node/src/integrations/fs/vendored/constants.ts b/packages/node/src/integrations/fs/vendored/constants.ts index 78e8f8f9f98d..529f1a40b5d5 100644 --- a/packages/node/src/integrations/fs/vendored/constants.ts +++ b/packages/node/src/integrations/fs/vendored/constants.ts @@ -15,7 +15,7 @@ export const PROMISE_FUNCTIONS: FPMember[] = [ 'chmod', 'chown', 'copyFile', - 'cp' as FPMember, // added in v16 + 'cp', // added in v16 'lchown', 'link', 'lstat', @@ -46,7 +46,7 @@ export const CALLBACK_FUNCTIONS: FMember[] = [ 'chmod', 'chown', 'copyFile', - 'cp' as FMember, // added in v16 + 'cp', // added in v16 'exists', // deprecated, inconsistent cb signature, handling separately when patching 'lchown', 'link', @@ -91,7 +91,7 @@ export const SYNC_FUNCTIONS: FMember[] = [ 'chmodSync', 'chownSync', 'copyFileSync', - 'cpSync' as FMember, // added in v16 + 'cpSync', // added in v16 'existsSync', 'lchownSync', 'linkSync', diff --git a/packages/node/src/integrations/http/SentryHttpInstrumentation.ts b/packages/node/src/integrations/http/SentryHttpInstrumentation.ts index e909b40bc944..a5ebe7859b86 100644 --- a/packages/node/src/integrations/http/SentryHttpInstrumentation.ts +++ b/packages/node/src/integrations/http/SentryHttpInstrumentation.ts @@ -157,9 +157,7 @@ export function instrumentHttpOutgoingRequests( // oxlint-disable-next-line typescript/no-deprecated spans: options.createSpansForOutgoingRequests !== false && (options.spans ?? true), ignoreOutgoingRequests(url, request) { - return ( - isTracingSuppressed() || !!options.ignoreOutgoingRequests?.(url, getRequestOptions(request as ClientRequest)) - ); + return isTracingSuppressed() || !!options.ignoreOutgoingRequests?.(url, getRequestOptions(request)); }, outgoingRequestHook(span, request) { options.outgoingRequestHook?.(span, request); diff --git a/packages/node/src/integrations/http/index.ts b/packages/node/src/integrations/http/index.ts index 36f0d02c66ec..72ce259d8dce 100644 --- a/packages/node/src/integrations/http/index.ts +++ b/packages/node/src/integrations/http/index.ts @@ -172,6 +172,7 @@ export const httpIntegration = defineIntegration((options: HttpOptions = {}) => ignoreIncomingRequests: options.ignoreIncomingRequests, ignoreStaticAssets: options.ignoreStaticAssets, ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes, + // oxlint-disable-next-line typescript/no-deprecated -- pass through the deprecated option for back-compat instrumentation: options.instrumentation, onSpanCreated: options.incomingRequestSpanHook, }; @@ -195,6 +196,7 @@ export const httpIntegration = defineIntegration((options: HttpOptions = {}) => breadcrumbs: options.breadcrumbs, spans, propagateTraceInOutgoingRequests: options.tracePropagation ?? true, + // oxlint-disable-next-line typescript/no-deprecated -- deprecated alias kept until removal createSpansForOutgoingRequests: spans, ignoreOutgoingRequests: options.ignoreOutgoingRequests, outgoingRequestHook: (span: Span, request: HttpClientRequest) => { diff --git a/packages/node/src/integrations/modules.ts b/packages/node/src/integrations/modules.ts index ba16fd58f877..508bae1beace 100644 --- a/packages/node/src/integrations/modules.ts +++ b/packages/node/src/integrations/modules.ts @@ -56,7 +56,7 @@ export const modulesIntegration = _modulesIntegration; function getRequireCachePaths(): string[] { try { - return require.cache ? Object.keys(require.cache as Record) : []; + return require.cache ? Object.keys(require.cache) : []; } catch { return []; } diff --git a/packages/node/src/integrations/onuncaughtexception.ts b/packages/node/src/integrations/onuncaughtexception.ts index 9430fd63862d..91c3e764c690 100644 --- a/packages/node/src/integrations/onuncaughtexception.ts +++ b/packages/node/src/integrations/onuncaughtexception.ts @@ -71,7 +71,7 @@ export function makeErrorHandler(client: NodeClient, options: OnUncaughtExceptio if (options.onFatalError) { onFatalError = options.onFatalError; } else if (clientOptions.onFatalError) { - onFatalError = clientOptions.onFatalError as OnFatalErrorHandler; + onFatalError = clientOptions.onFatalError; } // Attaching a listener to `uncaughtException` will prevent the node process from exiting. We generally do not diff --git a/packages/node/src/integrations/pino.ts b/packages/node/src/integrations/pino.ts index 89105bdaa0b6..842ea9838f10 100644 --- a/packages/node/src/integrations/pino.ts +++ b/packages/node/src/integrations/pino.ts @@ -1,5 +1,5 @@ import * as diagnosticsChannel from 'node:diagnostics_channel'; -import type { Integration, IntegrationFn, LogSeverityLevel } from '@sentry/core'; +import type { IntegrationFn, LogSeverityLevel } from '@sentry/core'; import { _INTERNAL_captureLog, addExceptionMechanism, @@ -208,22 +208,6 @@ const _pinoIntegration = defineIntegration((userOptions: DeepPartial): Integration; - /** - * Marks a Pino logger to be tracked by the Pino integration. - * - * @param logger A Pino logger instance. - */ - trackLogger(logger: unknown): void; - /** - * Marks a Pino logger to be ignored by the Pino integration. - * - * @param logger A Pino logger instance. - */ - untrackLogger(logger: unknown): void; -} - /** * Integration for Pino logging library. * Captures Pino logs as Sentry logs and optionally captures some log levels as events. @@ -245,4 +229,4 @@ export const pinoIntegration = Object.assign(_pinoIntegration, { (logger as Pino)[SENTRY_TRACK_SYMBOL] = 'ignore'; } }, -}) as PinoIntegrationFunction; +}); diff --git a/packages/node/src/integrations/tracing/graphql/vendored/instrumentation.ts b/packages/node/src/integrations/tracing/graphql/vendored/instrumentation.ts index e7e3a99b8b8e..a78d29178a73 100644 --- a/packages/node/src/integrations/tracing/graphql/vendored/instrumentation.ts +++ b/packages/node/src/integrations/tracing/graphql/vendored/instrumentation.ts @@ -442,8 +442,8 @@ export class GraphQLInstrumentation extends InstrumentationBase this.getConfig(), fieldResolverForExecute, isUsingDefaultResolver); if (schema) { - wrapFields(schema.getQueryType() as any, () => this.getConfig()); - wrapFields(schema.getMutationType() as any, () => this.getConfig()); + wrapFields(schema.getQueryType(), () => this.getConfig()); + wrapFields(schema.getMutationType(), () => this.getConfig()); } return { diff --git a/packages/node/src/integrations/tracing/graphql/vendored/utils.ts b/packages/node/src/integrations/tracing/graphql/vendored/utils.ts index ce3562e67d35..787aad084eff 100644 --- a/packages/node/src/integrations/tracing/graphql/vendored/utils.ts +++ b/packages/node/src/integrations/tracing/graphql/vendored/utils.ts @@ -244,7 +244,7 @@ export function wrapFields( if (field.type) { const unwrappedTypes = unwrapType(field.type); for (const unwrappedType of unwrappedTypes) { - wrapFields(unwrappedType as any, getConfig); + wrapFields(unwrappedType, getConfig); } } }); diff --git a/packages/node/src/integrations/tracing/langchain/instrumentation.ts b/packages/node/src/integrations/tracing/langchain/instrumentation.ts index 4ddbaee00c60..34637c0e161d 100644 --- a/packages/node/src/integrations/tracing/langchain/instrumentation.ts +++ b/packages/node/src/integrations/tracing/langchain/instrumentation.ts @@ -60,7 +60,7 @@ function wrapRunnableMethod( // Call original method with augmented options return Reflect.apply(target, thisArg, args); }, - }) as (...args: unknown[]) => unknown; + }); } /** diff --git a/packages/node/src/integrations/tracing/langgraph/instrumentation.ts b/packages/node/src/integrations/tracing/langgraph/instrumentation.ts index b41bc4f16b65..1021e13ce893 100644 --- a/packages/node/src/integrations/tracing/langgraph/instrumentation.ts +++ b/packages/node/src/integrations/tracing/langgraph/instrumentation.ts @@ -107,7 +107,7 @@ export class SentryLangGraphInstrumentation extends InstrumentationBase CompiledGraph, options), + value: instrumentCreateReactAgent(originalCreateReactAgent, options), writable: true, enumerable: true, configurable: true, diff --git a/packages/node/src/integrations/tracing/mongo/vendored/patches.ts b/packages/node/src/integrations/tracing/mongo/vendored/patches.ts index ea29755c32d5..300f5d8a0597 100644 --- a/packages/node/src/integrations/tracing/mongo/vendored/patches.ts +++ b/packages/node/src/integrations/tracing/mongo/vendored/patches.ts @@ -81,7 +81,7 @@ export function getV3PatchCommand() { } } - const operationName = getV3CommandOperation(cmd as unknown as Record); + const operationName = getV3CommandOperation(cmd); const span = startMongoSpan(getV3SpanAttributes(ns, server, cmd, operationName)); const patchedCallback = patchEnd(span, resultHandler); diff --git a/packages/node/src/integrations/tracing/mongoose/vendored/mongoose.ts b/packages/node/src/integrations/tracing/mongoose/vendored/mongoose.ts index 579408acf6c5..82d0458776bc 100644 --- a/packages/node/src/integrations/tracing/mongoose/vendored/mongoose.ts +++ b/packages/node/src/integrations/tracing/mongoose/vendored/mongoose.ts @@ -170,7 +170,7 @@ export class MongooseInstrumentation extends InstrumentationBase { - this._unwrap(moduleExports.Query.prototype, funcName as any); + this._unwrap(moduleExports.Query.prototype, funcName); }); this._unwrap(moduleExports.Model, 'aggregate'); diff --git a/packages/node/src/integrations/tracing/mysql/vendored/instrumentation.ts b/packages/node/src/integrations/tracing/mysql/vendored/instrumentation.ts index 56ae9c3030de..18359a6a2c3a 100644 --- a/packages/node/src/integrations/tracing/mysql/vendored/instrumentation.ts +++ b/packages/node/src/integrations/tracing/mysql/vendored/instrumentation.ts @@ -202,6 +202,7 @@ export class MySQLInstrumentation extends InstrumentationBase { this.removeListener('databaseChange', setDatabase); }); - return original.apply(this, arguments as unknown as any[]); + return original.apply(this, arguments); }; } @@ -121,7 +121,7 @@ export class TediousInstrumentation extends InstrumentationBase((resolve, reject) => { - req.once('response', resolve).once('error', reject).end() as unknown as ThenableRequest; + req.once('response', resolve).once('error', reject).end(); }); req.then = promise.then.bind(promise); return req; diff --git a/packages/node/src/transports/http.ts b/packages/node/src/transports/http.ts index 25e5d5f51125..f4fae1be057d 100644 --- a/packages/node/src/transports/http.ts +++ b/packages/node/src/transports/http.ts @@ -48,7 +48,7 @@ export function makeNodeTransport(options: NodeTransportOptions): Transport { try { urlSegments = new URL(options.url); - } catch (_e) { + } catch { consoleSandbox(() => { // eslint-disable-next-line no-console console.warn( diff --git a/packages/node/src/utils/detection.ts b/packages/node/src/utils/detection.ts index 98fcf3975609..a442d8c1ea98 100644 --- a/packages/node/src/utils/detection.ts +++ b/packages/node/src/utils/detection.ts @@ -4,6 +4,7 @@ function isCjs(): boolean { /*! rollup-include-cjs-only-end */ /*! rollup-include-esm-only */ + // oxlint-disable-next-line no-unreachable -- reachable only in the ESM build; rollup strips the CJS return above return false; /*! rollup-include-esm-only-end */ } diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index e758e5799bb0..1ef9e69ef68b 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -82,8 +82,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-nuxt-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module && es-check es2020 ./build/module/*.mjs --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/opentelemetry/package.json b/packages/opentelemetry/package.json index 5d7810c30611..9017f2b76ac1 100644 --- a/packages/opentelemetry/package.json +++ b/packages/opentelemetry/package.json @@ -65,8 +65,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-opentelemetry-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/opentelemetry/src/asyncContextStrategy.ts b/packages/opentelemetry/src/asyncContextStrategy.ts index 71c9e41f5f77..6b01874c68f9 100644 --- a/packages/opentelemetry/src/asyncContextStrategy.ts +++ b/packages/opentelemetry/src/asyncContextStrategy.ts @@ -1,5 +1,5 @@ import * as api from '@opentelemetry/api'; -import type { Scope, TracingChannelBinding, withActiveSpan as defaultWithActiveSpan } from '@sentry/core'; +import type { Scope, TracingChannelBinding } from '@sentry/core'; import { getDefaultCurrentScope, getDefaultIsolationScope, setAsyncContextStrategy } from '@sentry/core'; import { SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY, @@ -110,7 +110,7 @@ export function setOpenTelemetryContextAsyncContextStrategy(options?: { startNewTrace, // The types here don't fully align, because our own `Span` type is narrower // than the OTEL one - but this is OK for here, as we now we'll only have OTEL spans passed around - withActiveSpan: withActiveSpan as typeof defaultWithActiveSpan, + withActiveSpan: withActiveSpan, getTracingChannelBinding: options?.getTracingChannelBinding, }); } diff --git a/packages/opentelemetry/src/spanExporter.ts b/packages/opentelemetry/src/spanExporter.ts index 47c8a3d38f5f..4585dfd9d9e0 100644 --- a/packages/opentelemetry/src/spanExporter.ts +++ b/packages/opentelemetry/src/spanExporter.ts @@ -445,7 +445,7 @@ function getData(span: ReadableSpan): Record { // eslint-disable-next-line typescript/no-deprecated const maybeHttpStatusCodeAttribute = attributes[HTTP_STATUS_CODE]; if (maybeHttpStatusCodeAttribute) { - data[HTTP_RESPONSE_STATUS_CODE] = maybeHttpStatusCodeAttribute as string; + data[HTTP_RESPONSE_STATUS_CODE] = maybeHttpStatusCodeAttribute; } const requestData = getRequestSpanData(span); diff --git a/packages/opentelemetry/src/tracer.ts b/packages/opentelemetry/src/tracer.ts index 69dab7b9ef1c..44dc366560d3 100644 --- a/packages/opentelemetry/src/tracer.ts +++ b/packages/opentelemetry/src/tracer.ts @@ -20,7 +20,7 @@ import { startNewTrace, withScope, } from '@sentry/core'; -import type { Span, SpanAttributes, SpanLink } from '@sentry/core'; +import type { Span, SpanAttributes } from '@sentry/core'; import { applyOtelSpanData } from './applyOtelSpanData'; import { SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY, SENTRY_TRACE_STATE_DSC } from './constants'; import { getSamplingDecision } from './utils/getSamplingDecision'; @@ -47,7 +47,7 @@ export class SentryTracer implements Tracer { markSpanForOtelSourceInference(span); } applyOtelSpanData(span); - return span as OpenTelemetrySpan; + return span; } /** @inheritdoc */ @@ -81,7 +81,7 @@ export class SentryTracer implements Tracer { // used or set during the span (tags, breadcrumbs, captured errors) belongs to that span and stays // isolated from other concurrent work. Without this it can land on a different isolation scope. This // holds for ignored spans too, which run the callback without ever becoming the active span. - const capturedIsolationScope = getCapturedScopesOnSpan(span as unknown as Span).isolationScope; + const capturedIsolationScope = getCapturedScopesOnSpan(span).isolationScope; const withCapturedIsolationScope = (contextToFork: Context): Context => capturedIsolationScope ? contextToFork.setValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY, capturedIsolationScope) @@ -92,12 +92,12 @@ export class SentryTracer implements Tracer { // along with it (cascading the drop down the whole subtree). Leaving the parent active lets the // children attach to it and get re-parented instead. An ignored root span has no parent and still // becomes active, so its subtree is dropped as intended. - if (spanIsIgnored(span as unknown as Span) && trace.getSpan(ctx)) { + if (spanIsIgnored(span) && trace.getSpan(ctx)) { return context.with(withCapturedIsolationScope(ctx), () => callback(span)) as ReturnType; } return context.with(withCapturedIsolationScope(trace.setSpan(ctx, span)), () => { - _INTERNAL_setSpanForScope(getCurrentScope(), span as unknown as Span); + _INTERNAL_setSpanForScope(getCurrentScope(), span); return callback(span) as ReturnType; }); } @@ -111,7 +111,7 @@ export class SentryTracer implements Tracer { const sentryOptions = { name, attributes: (options.attributes as SpanAttributes) || {}, - links: options.links as SpanLink[] | undefined, + links: options.links, startTime: options.startTime, }; @@ -129,7 +129,7 @@ export class SentryTracer implements Tracer { } if (parentSpan) { - return _INTERNAL_startInactiveSpan({ ...sentryOptions, parentSpan: parentSpan as unknown as Span }); + return _INTERNAL_startInactiveSpan({ ...sentryOptions, parentSpan: parentSpan }); } // No parent span and no remote parent: this is a fresh root span. Start a new trace instead of @@ -148,7 +148,7 @@ export class SentryTracer implements Tracer { parentSpan: OpenTelemetrySpan, ): Span { const { spanId, traceId, traceState } = parentSpan.spanContext(); - const dsc = getDynamicSamplingContextFromSpan(parentSpan as unknown as Span); + const dsc = getDynamicSamplingContextFromSpan(parentSpan); const sampleRand = typeof dsc.sample_rand === 'string' ? Number(dsc.sample_rand) : undefined; // Only freeze the DSC when the remote parent actually carried one (i.e. there was incoming @@ -176,11 +176,11 @@ export class SentryTracer implements Tracer { // Link to the parent (like core's `createChildOrRootSpan`) so `getRootSpan` and DSC // resolution reach the parent. Non-recording spans no longer carry a `parentSpanId`. if (parentSpan) { - addChildSpanToSpan(parentSpan as unknown as Span, span); + addChildSpanToSpan(parentSpan, span); } // Capture the scopes (mirroring `createChildOrRootSpan`) so `startActiveSpan` can // fork the isolation scope onto the OTel context for work inside a suppressed span. setCapturedScopesOnSpan(span, getCurrentScope(), getIsolationScope()); - return span as OpenTelemetrySpan; + return span; } } diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index 7ece3c425827..e373230b4298 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -38,9 +38,9 @@ ], "scripts": { "clean": "rm -rf build", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2022 ./build/cjs/*.js && es-check es2022 ./build/esm/*.js --module", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "build": "yarn build:types && yarn build:transpile", "build:transpile": "yarn rollup -c rollup.npm.config.mjs", "build:types": "tsc -p tsconfig.types.json", diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 2a1b75f4013b..6dc115ff8def 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -80,8 +80,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-react-router-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/react-router/src/client/tracingIntegration.ts b/packages/react-router/src/client/tracingIntegration.ts index 866c40b99586..fa90a09bf2c7 100644 --- a/packages/react-router/src/client/tracingIntegration.ts +++ b/packages/react-router/src/client/tracingIntegration.ts @@ -57,6 +57,7 @@ export function reactRouterTracingIntegration( browserTracingIntegrationInstance.afterAllSetup(client); instrumentHydratedRouter(); }, + // oxlint-disable-next-line typescript/no-deprecated -- exposes the deprecated getter for back-compat until it is removed get clientInstrumentation(): ClientInstrumentation { return clientInstrumentationInstance; }, diff --git a/packages/react-router/src/server/createSentryHandleRequest.tsx b/packages/react-router/src/server/createSentryHandleRequest.tsx index 75080b827165..ce99a78faac5 100644 --- a/packages/react-router/src/server/createSentryHandleRequest.tsx +++ b/packages/react-router/src/server/createSentryHandleRequest.tsx @@ -145,6 +145,5 @@ export function createSentryHandleRequest( }; // Wrap the handle request function for request parametrization - return wrapSentryHandleRequest(handleRequest as HandleRequestWithoutMiddleware) as HandleRequestWithoutMiddleware & - HandleRequestWithMiddleware; + return wrapSentryHandleRequest(handleRequest) as HandleRequestWithoutMiddleware & HandleRequestWithMiddleware; } diff --git a/packages/react/.oxlintrc.json b/packages/react/.oxlintrc.json index ad747b8e6922..62ffebdb8c69 100644 --- a/packages/react/.oxlintrc.json +++ b/packages/react/.oxlintrc.json @@ -4,13 +4,5 @@ "plugins": ["react"], "env": { "browser": true - }, - "overrides": [ - { - "files": ["test/**"], - "rules": { - "react/prop-types": "off" - } - } - ] + } } diff --git a/packages/react/package.json b/packages/react/package.json index 5f9295db8479..04bf4eff877f 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -75,8 +75,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-react-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/react/src/hoist-non-react-statics.ts b/packages/react/src/hoist-non-react-statics.ts index 1b9fa7f01e75..1d64934f4a08 100644 --- a/packages/react/src/hoist-non-react-statics.ts +++ b/packages/react/src/hoist-non-react-statics.ts @@ -157,7 +157,7 @@ export function hoistNonReactStatics< try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); - } catch (_e) { + } catch { // Silently ignore errors } } diff --git a/packages/react/src/reactrouter-compat-utils/instrumentation.tsx b/packages/react/src/reactrouter-compat-utils/instrumentation.tsx index 12b1efecbb07..61e11e46c7ac 100644 --- a/packages/react/src/reactrouter-compat-utils/instrumentation.tsx +++ b/packages/react/src/reactrouter-compat-utils/instrumentation.tsx @@ -405,11 +405,7 @@ export function updateNavigationSpan( // Only mark as finalized for non-wildcard route names (allows URL→route upgrades). if (!transactionNameHasWildcard(name) && source === 'route') { - addNonEnumerableProperty( - activeRootSpan as { __sentry_navigation_name_set__?: boolean }, - '__sentry_navigation_name_set__', - true, - ); + addNonEnumerableProperty(activeRootSpan, '__sentry_navigation_name_set__', true); } } } @@ -530,11 +526,7 @@ export function createV6CompatibleWrapCreateBrowserRouter< opts && 'patchRoutesOnNavigation' in opts && typeof opts.patchRoutesOnNavigation === 'function'; if (hasPatchRoutesOnNavigation && activeRootSpan) { // Mark the span as potentially having lazy routes - addNonEnumerableProperty( - activeRootSpan as unknown as Record, - '__sentry_may_have_lazy_routes__', - true, - ); + addNonEnumerableProperty(activeRootSpan, '__sentry_may_have_lazy_routes__', true); createDeferredLazyRoutePromise(activeRootSpan); } @@ -606,11 +598,7 @@ export function createV6CompatibleWrapCreateMemoryRouter< const hasPatchRoutesOnNavigation = opts && 'patchRoutesOnNavigation' in opts && typeof opts.patchRoutesOnNavigation === 'function'; if (hasPatchRoutesOnNavigation && memoryActiveRootSpanEarly) { - addNonEnumerableProperty( - memoryActiveRootSpanEarly as unknown as Record, - '__sentry_may_have_lazy_routes__', - true, - ); + addNonEnumerableProperty(memoryActiveRootSpanEarly, '__sentry_may_have_lazy_routes__', true); createDeferredLazyRoutePromise(memoryActiveRootSpanEarly); } @@ -1000,15 +988,11 @@ export function handleNavigation(opts: { } else { // Update existing real span from wildcard to parameterized route name trackedNav.span.updateName(name); - trackedNav.span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source as 'route' | 'url' | 'custom'); + trackedNav.span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, source); if (source === 'route') { trackedNav.span.setAttribute(URL_TEMPLATE, name); } - addNonEnumerableProperty( - trackedNav.span as { __sentry_navigation_name_set__?: boolean }, - '__sentry_navigation_name_set__', - true, - ); + addNonEnumerableProperty(trackedNav.span, '__sentry_navigation_name_set__', true); trackedNav.routeName = name; DEBUG_BUILD && debug.log(`[Tracing] Updated navigation span name from "${oldName}" to "${name}"`); } @@ -1278,7 +1262,7 @@ function patchSpanEnd( const client = getClient(); if (client && spanType === 'navigation') { const trackedNav = activeNavigationSpans.get(client); - if (trackedNav && trackedNav.span === span) { + if (trackedNav?.span === span) { activeNavigationSpans.delete(client); } } @@ -1348,7 +1332,7 @@ function patchSpanEnd( originalEnd(endTimestamp); }; - addNonEnumerableProperty(span as unknown as Record, patchedPropertyName, true); + addNonEnumerableProperty(span, patchedPropertyName, true); } // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/packages/react/src/reactrouterv3.ts b/packages/react/src/reactrouterv3.ts index b08df8632f41..ab9b42c5cd2b 100644 --- a/packages/react/src/reactrouterv3.ts +++ b/packages/react/src/reactrouterv3.ts @@ -60,7 +60,7 @@ export function reactRouterV3BrowserTracingIntegration( if (instrumentPageLoad && WINDOW.location) { normalizeTransactionName( routes, - WINDOW.location as unknown as Location, + WINDOW.location, match, (localName: string, source: ReactRouterV3TransactionSource = 'url') => { startBrowserTracingPageLoadSpan(client, { diff --git a/packages/remix/package.json b/packages/remix/package.json index 92cabfe9a8dc..b912ddb301ac 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -94,8 +94,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.server.ts && madge --circular src/index.client.ts", "clean": "rimraf build coverage sentry-remix-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run --config vitest.config.unit.ts", diff --git a/packages/remix/scripts/createRelease.js b/packages/remix/scripts/createRelease.js index d00005d89520..8f74eed5cd1a 100644 --- a/packages/remix/scripts/createRelease.js +++ b/packages/remix/scripts/createRelease.js @@ -31,6 +31,7 @@ async function createRelease(argv, URL_PREFIX, BUILD_PATH) { await sentry.releases.uploadSourceMaps(release, { urlPrefix: URL_PREFIX, include: [BUILD_PATH], + // oxlint-disable-next-line typescript/no-deprecated -- kept for older Sentry CLI versions that still honor it useArtifactBundle: !argv.disableDebugIds, live: 'rejectOnError', }); diff --git a/packages/remix/src/server/sdk.ts b/packages/remix/src/server/sdk.ts index d20727caa0a8..49a10e2065c8 100644 --- a/packages/remix/src/server/sdk.ts +++ b/packages/remix/src/server/sdk.ts @@ -31,9 +31,9 @@ export function init(options: RemixOptions): NodeClient | undefined { return; } - options.defaultIntegrations = getRemixDefaultIntegrations(options as NodeOptions); + options.defaultIntegrations = getRemixDefaultIntegrations(options); - const client = nodeInit(options as NodeOptions); + const client = nodeInit(options); instrumentServer(); diff --git a/packages/replay-canvas/package.json b/packages/replay-canvas/package.json index 6b57dbe06edd..2db4d01bdf20 100644 --- a/packages/replay-canvas/package.json +++ b/packages/replay-canvas/package.json @@ -36,8 +36,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build sentry-replay-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/replay-internal/package.json b/packages/replay-internal/package.json index b46272836031..08b03041f7b9 100644 --- a/packages/replay-internal/package.json +++ b/packages/replay-internal/package.json @@ -52,8 +52,8 @@ "clean": "rimraf build sentry-replay-*.tgz", "format": "oxfmt \"src/**/*.ts\" \"test/**/*.ts\" --write", "format:check": "oxfmt \"src/**/*.ts\" \"test/**/*.ts\" --check", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/replay-internal/src/coreHandlers/handleDom.ts b/packages/replay-internal/src/coreHandlers/handleDom.ts index bd6ea3f454e6..2f8ef16c5671 100644 --- a/packages/replay-internal/src/coreHandlers/handleDom.ts +++ b/packages/replay-internal/src/coreHandlers/handleDom.ts @@ -36,11 +36,7 @@ export const handleDomListener: (replay: ReplayContainer) => (handlerData: Handl !event.ctrlKey && !event.shiftKey ) { - handleClick( - replay.clickDetector, - result as Breadcrumb & { timestamp: number; data: { nodeId: number } }, - getClickTargetNode(handlerData.event as Event) as HTMLElement, - ); + handleClick(replay.clickDetector, result, getClickTargetNode(handlerData.event as Event) as HTMLElement); } addBreadcrumbEvent(replay, result); diff --git a/packages/replay-internal/src/coreHandlers/util/addFeedbackBreadcrumb.ts b/packages/replay-internal/src/coreHandlers/util/addFeedbackBreadcrumb.ts index 58e3028f4ab1..a45ffb84ab9b 100644 --- a/packages/replay-internal/src/coreHandlers/util/addFeedbackBreadcrumb.ts +++ b/packages/replay-internal/src/coreHandlers/util/addFeedbackBreadcrumb.ts @@ -1,6 +1,6 @@ import type { FeedbackEvent } from '@sentry/core'; import { EventType } from '@sentry/rrweb'; -import type { ReplayBreadcrumbFrameEvent, ReplayContainer } from '../../types'; +import type { ReplayContainer } from '../../types'; /** * Add a feedback breadcrumb event to replay. @@ -16,7 +16,7 @@ export function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEv // This should never reject // eslint-disable-next-line @typescript-eslint/no-floating-promises - replay.throttledAddEvent({ + void replay.throttledAddEvent({ type: EventType.Custom, timestamp: event.timestamp * 1000, data: { @@ -30,7 +30,7 @@ export function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEv }, }, }, - } as ReplayBreadcrumbFrameEvent); + }); return false; }); diff --git a/packages/replay-internal/src/coreHandlers/util/fetchUtils.ts b/packages/replay-internal/src/coreHandlers/util/fetchUtils.ts index 5ba6d26ea7dd..3852cf441a7a 100644 --- a/packages/replay-internal/src/coreHandlers/util/fetchUtils.ts +++ b/packages/replay-internal/src/coreHandlers/util/fetchUtils.ts @@ -294,7 +294,5 @@ function _tryGetResponseText(response: Response): Promise { } async function _getResponseText(response: Response): Promise { - // Force this to be a promise, just to be safe - // eslint-disable-next-line no-return-await - return await response.text(); + return response.text(); } diff --git a/packages/replay-internal/src/util/addMemoryEntry.ts b/packages/replay-internal/src/util/addMemoryEntry.ts index b87f19521cbc..ac63c9fa2511 100644 --- a/packages/replay-internal/src/util/addMemoryEntry.ts +++ b/packages/replay-internal/src/util/addMemoryEntry.ts @@ -17,7 +17,7 @@ interface MemoryInfo { export async function addMemoryEntry(replay: ReplayContainer): Promise> { // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this try { - return Promise.all( + return await Promise.all( createPerformanceSpans(replay, [ // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above) createMemoryEntry(WINDOW.performance.memory), diff --git a/packages/replay-internal/src/util/createPerformanceEntries.ts b/packages/replay-internal/src/util/createPerformanceEntries.ts index 8c012f5ed742..5d3435b7efbc 100644 --- a/packages/replay-internal/src/util/createPerformanceEntries.ts +++ b/packages/replay-internal/src/util/createPerformanceEntries.ts @@ -188,6 +188,7 @@ function createResourceEntry( * Add a LCP event to the replay based on a LCP metric. */ export function getLargestContentfulPaint(metric: Metric): ReplayPerformanceEntry { + // oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- rule false positive: the cast exposes LCP's `element` field; tsc errors without it const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { element?: Node }) | undefined; const node = lastEntry?.element ? [lastEntry.element] : undefined; return getWebVital(metric, 'largest-contentful-paint', node); @@ -226,6 +227,7 @@ export function getCumulativeLayoutShift(metric: Metric): ReplayPerformanceEntry * Add an INP event to the replay based on an INP metric. */ export function getInteractionToNextPaint(metric: Metric): ReplayPerformanceEntry { + // oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- rule false positive: the cast exposes the entry's `target` field; tsc errors without it const lastEntry = metric.entries[metric.entries.length - 1] as (PerformanceEntry & { target?: Node }) | undefined; const node = lastEntry?.target ? [lastEntry.target] : undefined; return getWebVital(metric, 'interaction-to-next-paint', node); diff --git a/packages/replay-internal/test/unit/coreHandlers/handleNetworkBreadcrumbs.test.ts b/packages/replay-internal/test/unit/coreHandlers/handleNetworkBreadcrumbs.test.ts index 19bd88c435b3..0179724f2a2c 100644 --- a/packages/replay-internal/test/unit/coreHandlers/handleNetworkBreadcrumbs.test.ts +++ b/packages/replay-internal/test/unit/coreHandlers/handleNetworkBreadcrumbs.test.ts @@ -21,12 +21,12 @@ import { BASE_TIMESTAMP } from '../..'; import { setupReplayContainer } from '../../utils/setupReplayContainer'; async function waitForReplayEventBuffer() { - // Need one Promise.resolve() per await in the util functions - await Promise.resolve(); - await Promise.resolve(); - await Promise.resolve(); - await Promise.resolve(); - await Promise.resolve(); + // Flush pending microtasks so the async network-breadcrumb enrichment settles into the buffer. + // Looping a fixed number of times (rather than one `Promise.resolve()` per await in the impl) + // keeps this robust to the enrichment chain's exact await depth. + for (let i = 0; i < 10; i++) { + await Promise.resolve(); + } } const LARGE_BODY = 'a'.repeat(NETWORK_BODY_MAX_SIZE + 1); diff --git a/packages/replay-worker/package.json b/packages/replay-worker/package.json index fbfcb04a11c9..29d1ce0027bf 100644 --- a/packages/replay-worker/package.json +++ b/packages/replay-worker/package.json @@ -37,8 +37,8 @@ "build:dev:watch": "yarn build:watch", "build:transpile:watch": "yarn build:transpile --watch", "clean": "rimraf build", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch" diff --git a/packages/server-utils/package.json b/packages/server-utils/package.json index 2d73ba0d25c2..fea3466dbe5d 100644 --- a/packages/server-utils/package.json +++ b/packages/server-utils/package.json @@ -117,8 +117,8 @@ "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "clean": "rimraf build coverage sentry-server-utils-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test:unit": "vitest run", "test": "vitest run", diff --git a/packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/MessageAttributes.ts b/packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/MessageAttributes.ts index 80258914f788..f2410046b23a 100644 --- a/packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/MessageAttributes.ts +++ b/packages/server-utils/src/integrations/tracing-channel/aws-sdk/services/MessageAttributes.ts @@ -37,7 +37,7 @@ export function injectPropagationContext( if (value) { // Index-assigning into the SQS/SNS map union needs one concrete map type; the written value // shape is valid for both. - (attributes as SQS.MessageBodyAttributeMap)[key] = { DataType: 'String', StringValue: value }; + attributes[key] = { DataType: 'String', StringValue: value }; } } } else { diff --git a/packages/server-utils/src/integrations/tracing-channel/firebase/instrumentation.ts b/packages/server-utils/src/integrations/tracing-channel/firebase/instrumentation.ts index 6a122bca4ff2..f3de71209492 100644 --- a/packages/server-utils/src/integrations/tracing-channel/firebase/instrumentation.ts +++ b/packages/server-utils/src/integrations/tracing-channel/firebase/instrumentation.ts @@ -61,7 +61,7 @@ export function instrumentFirebase() { // span inside that wrapper. The other lifecycle events are irrelevant, so no-op them. diagnosticsChannel.tracingChannel(channel).subscribe({ start: data => - void safeChannelCallback(() => wrapFunctionsRegistration(data as { arguments: unknown[] }, triggerType)), + safeChannelCallback(() => wrapFunctionsRegistration(data as { arguments: unknown[] }, triggerType)), end: NOOP, asyncStart: NOOP, asyncEnd: NOOP, diff --git a/packages/server-utils/src/integrations/tracing-channel/graphql/index.ts b/packages/server-utils/src/integrations/tracing-channel/graphql/index.ts index ecfd91c2785b..6b0158239e10 100644 --- a/packages/server-utils/src/integrations/tracing-channel/graphql/index.ts +++ b/packages/server-utils/src/integrations/tracing-channel/graphql/index.ts @@ -53,13 +53,13 @@ const _graphqlChannelIntegration = ((options: GraphqlDiagnosticChannelsOptions = bindTracingChannelToSpan( diagnosticsChannel.tracingChannel(CHANNELS.GRAPHQL_VALIDATE), data => safeChannelCallback(() => startValidateSpan(data.arguments[1])), - { beforeSpanEnd: (span, data) => void safeChannelCallback(() => finalizeValidateSpan(span, data.result)) }, + { beforeSpanEnd: (span, data) => safeChannelCallback(() => finalizeValidateSpan(span, data.result)) }, ); bindTracingChannelToSpan( diagnosticsChannel.tracingChannel(CHANNELS.GRAPHQL_EXECUTE), data => safeChannelCallback(() => startExecuteSpan(data.arguments, data.self, config, getConfig)), - { beforeSpanEnd: (span, data) => void safeChannelCallback(() => finalizeExecuteSpan(span, data.result)) }, + { beforeSpanEnd: (span, data) => safeChannelCallback(() => finalizeExecuteSpan(span, data.result)) }, ); }); }, diff --git a/packages/server-utils/src/integrations/tracing-channel/graphql/spans.ts b/packages/server-utils/src/integrations/tracing-channel/graphql/spans.ts index e308c546cfc1..b864f18f4596 100644 --- a/packages/server-utils/src/integrations/tracing-channel/graphql/spans.ts +++ b/packages/server-utils/src/integrations/tracing-channel/graphql/spans.ts @@ -85,7 +85,7 @@ function normalizeExecuteArgs(argsArray: unknown[]): NormalizedExecuteArgs { return { schema: argsArray[ExecuteArg.SCHEMA] as GraphQLSchema | undefined, document: argsArray[ExecuteArg.DOCUMENT] as DocumentNode | undefined, - contextValue: (argsArray[ExecuteArg.CONTEXT_VALUE] ?? {}) as ObjectWithGraphQLData, + contextValue: argsArray[ExecuteArg.CONTEXT_VALUE] ?? {}, operationName: argsArray[ExecuteArg.OPERATION_NAME] as Maybe, fieldResolver: argsArray[ExecuteArg.FIELD_RESOLVER] as Maybe, writeBack: (contextValue, fieldResolver) => { @@ -105,7 +105,7 @@ function normalizeExecuteArgs(argsArray: unknown[]): NormalizedExecuteArgs { return { schema: obj.schema, document: obj.document, - contextValue: (obj.contextValue ?? {}) as ObjectWithGraphQLData, + contextValue: obj.contextValue ?? {}, operationName: obj.operationName, fieldResolver: obj.fieldResolver, writeBack: (contextValue, fieldResolver) => { @@ -161,7 +161,7 @@ export function startExecuteSpan( ...BASE_ATTRIBUTES, [GRAPHQL_OPERATION_TYPE]: operationType, [GRAPHQL_OPERATION_NAME]: operationName || undefined, - [GRAPHQL_DOCUMENT]: collectGraphqlDocument(document as GraphqlDocumentNode | undefined), + [GRAPHQL_DOCUMENT]: collectGraphqlDocument(document), }, }); diff --git a/packages/server-utils/src/integrations/tracing-channel/knex.ts b/packages/server-utils/src/integrations/tracing-channel/knex.ts index 81eda8f9eea8..1306ca29bd34 100644 --- a/packages/server-utils/src/integrations/tracing-channel/knex.ts +++ b/packages/server-utils/src/integrations/tracing-channel/knex.ts @@ -264,7 +264,7 @@ function getName(db: string | undefined, operation?: string, table?: string): st function extractTableName(builder: KnexBuilder | undefined): string | undefined { const table = builder?._single?.table; if (table && typeof table === 'object') { - return extractTableName(table as KnexBuilder); + return extractTableName(table); } return typeof table === 'string' ? table : undefined; } diff --git a/packages/server-utils/src/integrations/tracing-channel/mongoose.ts b/packages/server-utils/src/integrations/tracing-channel/mongoose.ts index 4dc77d0224d0..db00d7dab3ce 100644 --- a/packages/server-utils/src/integrations/tracing-channel/mongoose.ts +++ b/packages/server-utils/src/integrations/tracing-channel/mongoose.ts @@ -162,9 +162,7 @@ function startSpan( // `start`-only (or `end`-only) subscriber for the context-capture channels // is accepted. function channel(channelName: string): SentryTracingChannel { - return diagnosticsChannel.tracingChannel( - channelName, - ) as unknown as SentryTracingChannel; + return diagnosticsChannel.tracingChannel(channelName); } function bindExecSpan(channelName: string, getSpan: (self: object) => Span): void { diff --git a/packages/server-utils/src/integrations/tracing-channel/postgres-js.ts b/packages/server-utils/src/integrations/tracing-channel/postgres-js.ts index c00b36efb73a..bfd01a6a5a71 100644 --- a/packages/server-utils/src/integrations/tracing-channel/postgres-js.ts +++ b/packages/server-utils/src/integrations/tracing-channel/postgres-js.ts @@ -128,7 +128,7 @@ function setConnectionAttributes(span: Span, query: PostgresQuery, context: Post * the `connectionContexts` WeakMap. Idempotent (guarded inside `setConnectionAttributes`). */ function attachConnectionAttributesFromChannel(message: PostgresJsQueryContext): void { - const connection = message.self as object | undefined; + const connection = message.self; const query = message.arguments?.[0] as PostgresQuery | undefined; if (!connection || !query) { return; diff --git a/packages/server-utils/src/mongoose/mongoose-dc-subscriber.ts b/packages/server-utils/src/mongoose/mongoose-dc-subscriber.ts index 0bbc7ca63df0..fa11fe8e87d3 100644 --- a/packages/server-utils/src/mongoose/mongoose-dc-subscriber.ts +++ b/packages/server-utils/src/mongoose/mongoose-dc-subscriber.ts @@ -185,7 +185,7 @@ function redactValue(value: unknown, depth: number): unknown { if (isObjectLike(value)) { const out: Record = {}; - for (const key of Object.keys(value as Record)) { + for (const key of Object.keys(value)) { out[key] = redactValue((value as Record)[key], depth + 1); } diff --git a/packages/server-utils/src/orchestrion/config/nestjs.ts b/packages/server-utils/src/orchestrion/config/nestjs.ts index 727eb6070a55..d0bd54fdc3d9 100644 --- a/packages/server-utils/src/orchestrion/config/nestjs.ts +++ b/packages/server-utils/src/orchestrion/config/nestjs.ts @@ -15,7 +15,7 @@ function astQueryInstrumentation(config: { astQuery: string; functionQuery: { kind: 'Sync' | 'Async' | 'Callback' | 'Auto' }; }): InstrumentationConfig { - return config as unknown as InstrumentationConfig; + return config; } /** diff --git a/packages/server-utils/src/prisma/tracing-helper.ts b/packages/server-utils/src/prisma/tracing-helper.ts index c653658cc0ee..760762545d68 100644 --- a/packages/server-utils/src/prisma/tracing-helper.ts +++ b/packages/server-utils/src/prisma/tracing-helper.ts @@ -236,7 +236,7 @@ export class ActiveTracingHelper implements TracingHelper { const parentSpan = getActiveSpan(); - const attributes = buildSpanAttributes(name, options.attributes as Record | undefined); + const attributes = buildSpanAttributes(name, options.attributes); const spanOptions = { name: buildSpanName(name, attributes), attributes, diff --git a/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts b/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts index b41290b281e9..ad67f26f442c 100644 --- a/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts +++ b/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts @@ -400,14 +400,14 @@ function subscribeResolveLanguageModel( ): void { tracingChannel(channelName).subscribe({ end(rawCtx) { - const ctx = rawCtx as OrchestrionContext; + const ctx = rawCtx; if (!isObjectLike(ctx.result)) { return; } // Patch the model's `doGenerate`/`doStream` once. The model call recovers its parent from the // active async context at call time (the operation span `bindTracingChannelToSpan` bound), which // propagates into the model call for `streamText` too, so there is nothing to capture on the model here. - patchModelMethods(ctx.result as PatchableModel, options); + patchModelMethods(ctx.result, options); }, start() { /* no-op */ @@ -574,7 +574,7 @@ function patchOperationTools(tools: Record, options: VercelAiCh try { for (const [toolName, tool] of Object.entries(tools)) { if (isObjectLike(tool)) { - patchToolExecute(toolName, tool as PatchableTool, tools, options); + patchToolExecute(toolName, tool, tools, options); } } } catch { diff --git a/packages/solid/package.json b/packages/solid/package.json index 64add39d2488..dc08c81e6493 100644 --- a/packages/solid/package.json +++ b/packages/solid/package.json @@ -95,8 +95,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts && madge --circular src/solidrouter.ts && madge --circular src/tanstackrouter.ts", "clean": "rimraf build coverage sentry-solid-*.tgz ./*.d.ts ./*.d.ts.map", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/solidstart/package.json b/packages/solidstart/package.json index d2a4196fc90c..49e189b29f88 100644 --- a/packages/solidstart/package.json +++ b/packages/solidstart/package.json @@ -95,8 +95,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts && madge --circular src/solidrouter.client.ts && madge --circular src/solidrouter.server.ts && madge --circular src/solidrouter.ts", "clean": "rimraf build coverage sentry-solidstart-*.tgz ./*.d.ts ./*.d.ts.map ./client ./server", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/svelte/package.json b/packages/svelte/package.json index 4151002b92ac..91c3e3f56249 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -56,8 +56,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-svelte-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/sveltekit/package.json b/packages/sveltekit/package.json index dfb79075f0fb..a5ead3979092 100644 --- a/packages/sveltekit/package.json +++ b/packages/sveltekit/package.json @@ -84,8 +84,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-sveltekit-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/sveltekit/src/client/load.ts b/packages/sveltekit/src/client/load.ts index 80d67124c5a1..79b4b54ba01d 100644 --- a/packages/sveltekit/src/client/load.ts +++ b/packages/sveltekit/src/client/load.ts @@ -70,7 +70,7 @@ export function wrapLoadWithSentry any>(origLoad: T) ...event, }; - addNonEnumerableProperty(patchedEvent as unknown as Record, '__sentry_wrapped__', true); + addNonEnumerableProperty(patchedEvent, '__sentry_wrapped__', true); const routeId = getRouteId(event); diff --git a/packages/sveltekit/src/server-common/handle.ts b/packages/sveltekit/src/server-common/handle.ts index 20965b8e6ddb..16342f9edeaa 100644 --- a/packages/sveltekit/src/server-common/handle.ts +++ b/packages/sveltekit/src/server-common/handle.ts @@ -180,7 +180,7 @@ async function instrumentHandle( [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.sveltekit', [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: routeName ? 'route' : 'url', 'sveltekit.tracing.original_name': originalName, - // oxlint-disable-next-line typescript-eslint(no-deprecated) + // oxlint-disable-next-line typescript/no-deprecated [URL_FULL]: kitRootSpanAttributes[URL_FULL] ?? kitRootSpanAttributes[HTTP_URL] ?? event.url.href, [URL_PATH]: kitRootSpanAttributes[URL_PATH] ?? event.url.pathname, ...(routeName && { diff --git a/packages/sveltekit/src/server-common/load.ts b/packages/sveltekit/src/server-common/load.ts index 9cad4d4e98ae..5e74e23b08aa 100644 --- a/packages/sveltekit/src/server-common/load.ts +++ b/packages/sveltekit/src/server-common/load.ts @@ -32,7 +32,7 @@ export function wrapLoadWithSentry any>(origLoad: T) return wrappingTarget.apply(thisArg, args); } - addNonEnumerableProperty(event as unknown as Record, '__sentry_wrapped__', true); + addNonEnumerableProperty(event, '__sentry_wrapped__', true); const routeId = getRouteId(event); @@ -92,7 +92,7 @@ export function wrapServerLoadWithSentry any>(origSe return wrappingTarget.apply(thisArg, args); } - addNonEnumerableProperty(event as unknown as Record, '__sentry_wrapped__', true); + addNonEnumerableProperty(event, '__sentry_wrapped__', true); // Accessing any member of `event.route` causes SvelteKit to invalidate the // server `load` function's data on every route change. We use `getRouteId` which uses diff --git a/packages/sveltekit/src/server-common/serverRoute.ts b/packages/sveltekit/src/server-common/serverRoute.ts index 3b98ce270f2d..dea2029fe144 100644 --- a/packages/sveltekit/src/server-common/serverRoute.ts +++ b/packages/sveltekit/src/server-common/serverRoute.ts @@ -46,7 +46,7 @@ export function wrapServerRouteWithSentry( const routeId = event.route?.id; const httpMethod = event.request.method; - addNonEnumerableProperty(event as unknown as Record, '__sentry_wrapped__', true); + addNonEnumerableProperty(event, '__sentry_wrapped__', true); try { return await startSpan( diff --git a/packages/sveltekit/test/server-common/handle.test.ts b/packages/sveltekit/test/server-common/handle.test.ts index 025e8fd09f1e..bdfc39703da7 100644 --- a/packages/sveltekit/test/server-common/handle.test.ts +++ b/packages/sveltekit/test/server-common/handle.test.ts @@ -329,7 +329,7 @@ describe('sentryHandle', () => { it('send errors to Sentry', async () => { try { await sentryHandle()({ event: mockEvent(), resolve: resolve(type, isError) }); - } catch (_e) { + } catch { expect(mockCaptureException).toBeCalledTimes(1); expect(mockCaptureException).toBeCalledWith(expect.any(Error), { mechanism: { handled: false, type: 'auto.function.sveltekit.handle' }, diff --git a/packages/tanstackstart-react/package.json b/packages/tanstackstart-react/package.json index e48b14426041..789f10e39165 100644 --- a/packages/tanstackstart-react/package.json +++ b/packages/tanstackstart-react/package.json @@ -78,8 +78,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts", "clean": "rimraf build coverage sentry-tanstackstart-react-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "yarn test:unit", "test:unit": "vitest run", diff --git a/packages/tanstackstart-react/src/server/middleware.ts b/packages/tanstackstart-react/src/server/middleware.ts index a7d860c497f6..47d39f9b72a5 100644 --- a/packages/tanstackstart-react/src/server/middleware.ts +++ b/packages/tanstackstart-react/src/server/middleware.ts @@ -82,7 +82,7 @@ function wrapMiddlewareWithSentry( }); // mark as instrumented - addNonEnumerableProperty(middleware as unknown as Record, SENTRY_WRAPPED, true); + addNonEnumerableProperty(middleware, SENTRY_WRAPPED, true); } return middleware; diff --git a/packages/types/package.json b/packages/types/package.json index 6c5e85858c31..0c724ce82f1d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -41,9 +41,9 @@ "build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch", "build:tarball": "npm pack", "clean": "rimraf build sentry-types-*.tgz", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", + "lint:fix": "oxlint . --fix --type-aware", "yalc:publish": "yalc publish --push --sig" }, "dependencies": { diff --git a/packages/vercel-edge/package.json b/packages/vercel-edge/package.json index eafcdfdd4704..9f5398641cf0 100644 --- a/packages/vercel-edge/package.json +++ b/packages/vercel-edge/package.json @@ -51,8 +51,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-vercel-edge-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/vue/package.json b/packages/vue/package.json index fa22b3bcd6b0..4d0b1178715e 100644 --- a/packages/vue/package.json +++ b/packages/vue/package.json @@ -78,8 +78,8 @@ "build:tarball": "npm pack", "circularDepCheck": "madge --circular src/index.ts && madge --circular src/tanstackrouter.ts", "clean": "rimraf build coverage sentry-vue-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/cjs/*.js && es-check es2020 ./build/esm/*.js --module", "test": "vitest run", "test:watch": "vitest --watch", diff --git a/packages/vue/src/normalizeStringifyValue.ts b/packages/vue/src/normalizeStringifyValue.ts index d82233ddcdc0..d37cdf740c3d 100644 --- a/packages/vue/src/normalizeStringifyValue.ts +++ b/packages/vue/src/normalizeStringifyValue.ts @@ -33,6 +33,7 @@ function isVueViewModel(wat: unknown): wat is VueViewModel { * probe that works on either Vue version. */ function isVNode(wat: unknown): wat is VNode { + // oxlint-disable-next-line typescript/no-unnecessary-type-assertion -- rule false positive: the cast reaches VNode's `__v_isVNode`; tsc errors without it return !!(typeof wat === 'object' && (wat as VNode | null)?.__v_isVNode); } diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 367890d8b073..07e4cdd573bc 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -50,8 +50,8 @@ "test:watch": "vitest --watch", "circularDepCheck": "madge --circular src/index.ts", "clean": "rimraf build coverage sentry-wasm-*.tgz", - "lint:fix": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --fix --type-aware", - "lint": "OXLINT_TSGOLINT_DANGEROUSLY_SUPPRESS_PROGRAM_DIAGNOSTICS=true oxlint . --type-aware", + "lint:fix": "oxlint . --fix --type-aware", + "lint": "oxlint . --type-aware", "lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module", "yalc:publish": "yalc publish --push --sig" }, diff --git a/yarn.lock b/yarn.lock index f7085cf317ab..12d526f8b231 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6386,130 +6386,130 @@ resolved "https://registry.yarnpkg.com/@oxfmt/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.38.0.tgz#f53ae28dbcca1133dcdea8d6fe93526b1dcfd76f" integrity sha512-wud1Hz0D2hYrhk6exxQQndn1htcA28wAcFb1vtP3ZXSzPFtMvc7ag/VNPv6nz6mDzM8X660jUwGEac99QcrVsA== -"@oxlint-tsgolint/darwin-arm64@0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-0.16.0.tgz#d03363cdf89bf50faac558a7768e05cd2ab2d507" - integrity sha512-WQt5lGwRPJBw7q2KNR0mSPDAaMmZmVvDlEEti96xLO7ONhyomQc6fBZxxwZ4qTFedjJnrHX94sFelZ4OKzS7UQ== - -"@oxlint-tsgolint/darwin-x64@0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-x64/-/darwin-x64-0.16.0.tgz#c921618ae28905316c2cc59c3e829ae1a0950655" - integrity sha512-VJo29XOzdkalvCTiE2v6FU3qZlgHaM8x8hUEVJGPU2i5W+FlocPpmn00+Ld2n7Q0pqIjyD5EyvZ5UmoIEJMfqg== - -"@oxlint-tsgolint/linux-arm64@0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-arm64/-/linux-arm64-0.16.0.tgz#9fc38d94e27380a515aa24e1119d696318a8b6aa" - integrity sha512-MPfqRt1+XRHv9oHomcBMQ3KpTE+CSkZz14wUxDQoqTNdUlV0HWdzwIE9q65I3D9YyxEnqpM7j4qtDQ3apqVvbQ== - -"@oxlint-tsgolint/linux-x64@0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-x64/-/linux-x64-0.16.0.tgz#366088e3a85b6c295fc5b95d2098ee51a2b67b7f" - integrity sha512-XQSwVUsnwLokMhe1TD6IjgvW5WMTPzOGGkdFDtXWQmlN2YeTw94s/NN0KgDrn2agM1WIgAenEkvnm0u7NgwEyw== - -"@oxlint-tsgolint/win32-arm64@0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-arm64/-/win32-arm64-0.16.0.tgz#9ec46fa4ae6a6b90bdd708af64740812172b8ec8" - integrity sha512-EWdlspQiiFGsP2AiCYdhg5dTYyAlj6y1nRyNI2dQWq4Q/LITFHiSRVPe+7m7K7lcsZCEz2icN/bCeSkZaORqIg== - -"@oxlint-tsgolint/win32-x64@0.16.0": - version "0.16.0" - resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-x64/-/win32-x64-0.16.0.tgz#861e5c7df0108212e4b61ef6ae38df22104028a1" - integrity sha512-1ufk8cgktXJuJZHKF63zCHAkaLMwZrEXnZ89H2y6NO85PtOXqu4zbdNl0VBpPP3fCUuUBu9RvNqMFiv0VsbXWA== - -"@oxlint/binding-android-arm-eabi@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.53.0.tgz#c42286b0a96d31fedc7b37183518c9e4054f6330" - integrity sha512-JC89/jAx4d2zhDIbK8MC4L659FN1WiMXMBkNg7b33KXSkYpUgcbf+0nz7+EPRg+VwWiZVfaoFkNHJ7RXYb5Neg== - -"@oxlint/binding-android-arm64@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm64/-/binding-android-arm64-1.53.0.tgz#b3b0906247450cd8a3840ee330e5b7cc97626db2" - integrity sha512-CY+pZfi+uyeU7AwFrEnjsNT+VfxYmKLMuk7bVxArd8f+09hQbJb8f7C7EpvTfNqrCK1J8zZlaYI4LltmEctgbQ== - -"@oxlint/binding-darwin-arm64@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.53.0.tgz#b261b5f5a452dc477c1c576b9c0bc23a305da17d" - integrity sha512-0aqsC4HDQ94oI6kMz64iaOJ1f3bCVArxvaHJGOScBvFz6CcQedXi5b70Xg09CYjKNaHA56dW0QJfoZ/111kz1A== - -"@oxlint/binding-darwin-x64@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.53.0.tgz#3daf9e22dd2e35a24c982ff42fcb701d513075be" - integrity sha512-e+KvuaWtnisyWojO/t5qKDbp2dvVpg+1dl4MGnTb21QpY4+4+9Y1XmZPaztcA2XNvy4BIaXFW+9JH9tMpSBqUg== - -"@oxlint/binding-freebsd-x64@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.53.0.tgz#eee6be65be588fc91a785a099b53275f52f7fd7e" - integrity sha512-hpU0ZHVeblFjmZDfgi9BxhhCpURh0KjoFy5V+Tvp9sg/fRcnMUEfaJrgz+jQfOX4jctlVWrAs1ANs91+5iV+zA== - -"@oxlint/binding-linux-arm-gnueabihf@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.53.0.tgz#0751ed24c4a370a9cbdbfcd5583293f13e79d008" - integrity sha512-ccKxOpw+X4xa2pO+qbTOpxQ2x1+Ag3ViRQMnWt3gHp1LcpNgS1xd6GYc3OvehmHtrXqEV3YGczZ0I1qpBB4/2A== - -"@oxlint/binding-linux-arm-musleabihf@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.53.0.tgz#a795b821695d7af090b9ce036d99d0ce7b43e645" - integrity sha512-UBkBvmzSmlyH2ZObQMDKW/TuyTmUtP/XClPUyU2YLwj0qLopZTZxnDz4VG5d3wz1HQuZXO0o1QqsnQUW1v4a6Q== - -"@oxlint/binding-linux-arm64-gnu@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.53.0.tgz#805fb2ae2d480687a12c942f78069d6ccf9399bc" - integrity sha512-PQJJ1izoH9p61las6rZ0BWOznAhTDMmdUPL2IEBLuXFwhy2mSloYHvRkk39PSYJ1DyG+trqU5Z9ZbtHSGH6plg== - -"@oxlint/binding-linux-arm64-musl@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.53.0.tgz#3664aad7e24841a68525a6220e64a43de1d441c3" - integrity sha512-GXI1o4Thn/rtnRIL38BwrDMwVcUbIHKCsOixIWf/CkU3fCG3MXFzFTtDMt+34ik0Qk452d8kcpksL0w/hUkMZA== - -"@oxlint/binding-linux-ppc64-gnu@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.53.0.tgz#7ffa2e40aae448ee3728f158612f02428489e98c" - integrity sha512-Uahk7IVs2yBamCgeJ3XKpKT9Vh+de0pDKISFKnjEcI3c/w2CFHk1+W6Q6G3KI56HGwE9PWCp6ayhA9whXWkNIQ== - -"@oxlint/binding-linux-riscv64-gnu@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.53.0.tgz#016b145e0abd4a24149558873525b43609edb080" - integrity sha512-sWtcU9UkrKMWsGKdFy8R6jkm9Q0VVG1VCpxVuh0HzRQQi3ENI1Nh5CkpsdfUs2MKRcOoHKbXqTscunuXjhxoxQ== - -"@oxlint/binding-linux-riscv64-musl@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.53.0.tgz#16d7a1cc60f6d85aab3eea1efff84ea1450789f6" - integrity sha512-aXew1+HDvCdExijX/8NBVC854zJwxhKP3l9AHFSHQNo4EanlHtzDMIlIvP3raUkL0vXtFCkTFYezzU5HjstB8A== - -"@oxlint/binding-linux-s390x-gnu@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.53.0.tgz#edbf548da82d4c9ae023a031839425912ac99e81" - integrity sha512-rVpyBSqPGou9sITcsoXqUoGBUH74bxYLYOAGUqN599Zu6BQBlBU9hh3bJQ/20D1xrhhrsbiCpVPvXpLPM5nL1w== - -"@oxlint/binding-linux-x64-gnu@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.53.0.tgz#fa239fe242fd76b45d9a771096215abb82ebd325" - integrity sha512-eOyeQ8qFQ2geXmlWJuXAOaek0hFhbMLlYsU457NMLKDRoC43Xf+eDPZ9Yk0n9jDaGJ5zBl/3Dy8wo41cnIXuLA== - -"@oxlint/binding-linux-x64-musl@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.53.0.tgz#c9f88972e043463ec7fa8f855d6c92a66bc263c0" - integrity sha512-S6rBArW/zD1tob8M9PwKYrRmz+j1ss1+wjbRAJCWKd7TC3JB6noDiA95pIj9zOZVVp04MIzy5qymnYusrEyXzg== - -"@oxlint/binding-openharmony-arm64@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.53.0.tgz#d0df48d35bba716145dbed7529a34ce1829be49e" - integrity sha512-sd/A0Ny5sN0D/MJtlk7w2jGY4bJQou7gToa9WZF7Sj6HTyVzvlzKJWiOHfr4SulVk4ndiFQ8rKmF9rXP0EcF3A== - -"@oxlint/binding-win32-arm64-msvc@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.53.0.tgz#f0a5f856e911112820adbb16240add6adbe28bff" - integrity sha512-QC3q7b51Er/ZurEFcFzc7RpQ/YEoEBLJuCp3WoOzhSHHH/nkUKFy+igOxlj1z3LayhEZPDQQ7sXvv2PM2cdG3Q== - -"@oxlint/binding-win32-ia32-msvc@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.53.0.tgz#f43b0fc12f68620defb373684de91dbca7fbff49" - integrity sha512-3OvLgOqwd705hWHV2i8ni80pilvg6BUgpC2+xtVu++e/q28LKVohGh5J5QYJOrRMfWmxK0M/AUu43vUw62LAKQ== - -"@oxlint/binding-win32-x64-msvc@1.53.0": - version "1.53.0" - resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.53.0.tgz#0e0cc062024a7a58cdaa17a3fa0cefb4a3963a25" - integrity sha512-xTiOkntexCdJytZ7ArIIgl3vGW5ujMM3sJNM7/+iqGAVJagCqjFFWn68HRWRLeyT66c95uR+CeFmQFI6mLQqDw== +"@oxlint-tsgolint/darwin-arm64@7.0.2001": + version "7.0.2001" + resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-arm64/-/darwin-arm64-7.0.2001.tgz#a270683cda2f012d0d5011370bd06384c6bee900" + integrity sha512-CUJEdbSZ54+Xy9OXqOhWLTKZKV0BBiV7C2i/ygyVmXtkUNXx5YCzN8DpSSshTAKktoL7S+tnQ/ftFG/i7X896w== + +"@oxlint-tsgolint/darwin-x64@7.0.2001": + version "7.0.2001" + resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/darwin-x64/-/darwin-x64-7.0.2001.tgz#3e93bdf6c8b6668d45c098983f71e269f171cd75" + integrity sha512-pXfBb5BqONCcgrXQNUZWXgiYmRSWJzd97S8i41VVOh6ut0tyo+cJ5FKFpczDHxiVNfj/3e7c9B4MtztNdpIVCw== + +"@oxlint-tsgolint/linux-arm64@7.0.2001": + version "7.0.2001" + resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-arm64/-/linux-arm64-7.0.2001.tgz#7f335b178f011ba30da27f44e743613d5fd6cc20" + integrity sha512-roP7zujb/QDPzDwEKsFFpzNHHy91/Y7oX9vQXk78ekyZtcQj1QXDIMH33gjDdHBfRl4K9pZ36xhRgrP4Zr+R8A== + +"@oxlint-tsgolint/linux-x64@7.0.2001": + version "7.0.2001" + resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/linux-x64/-/linux-x64-7.0.2001.tgz#2805be8c183283994436a156c7961c4f5d490990" + integrity sha512-UDezNqdECVmngu2TPnjaS1YoAmcTaBoI5lV9vk3VahBxoi+I5r9k3iJTT7qZoYWOXTD/7T7bNcwRgrocR6BscQ== + +"@oxlint-tsgolint/win32-arm64@7.0.2001": + version "7.0.2001" + resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-arm64/-/win32-arm64-7.0.2001.tgz#226c7779b0e1bfe970746e8d479a18fabc2f915e" + integrity sha512-uJZhqB6pdXLuN+AD1F5082byyQti/NPmJA77GtcFlmT2HzRelqbNls3SaIqxpjdFgvSBF9g0yOKGBkGFg7kX8Q== + +"@oxlint-tsgolint/win32-x64@7.0.2001": + version "7.0.2001" + resolved "https://registry.yarnpkg.com/@oxlint-tsgolint/win32-x64/-/win32-x64-7.0.2001.tgz#814bcdd2707fa8ab1ae0f0b51a7243b034d2833a" + integrity sha512-FkDRm8hx9OwzGQqyWG1tO5QrTLRApff9DzSgpz9QZau37BR8d1VYKOxMLGf6shPZntJFoTwIIJYT68VndYDCog== + +"@oxlint/binding-android-arm-eabi@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.75.0.tgz#369fe4292ce3848e2fb908dac15b5f271e07501d" + integrity sha512-lutovtFzJqlRaqpZrCqSSGaHZzl9nIxxpjLzhSRLunN6dCLylj0uzlCyQGaQDIys7rrv8kVXiFO+R4Zpn0bX7g== + +"@oxlint/binding-android-arm64@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-android-arm64/-/binding-android-arm64-1.75.0.tgz#2a4021de653e46819d286b13cca82f740ae66b3d" + integrity sha512-hXI0hDgHkw4w5nfru72aG7y+2iQJmC4waH/KV6H/hbgA6yAP5jYNx0P9yug15Hs0tWl/+mda3Jjn/2gmDT48tw== + +"@oxlint/binding-darwin-arm64@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.75.0.tgz#8aa2606ae60f6bc54bff1666e5246a80032d54ec" + integrity sha512-D91BWbK/dMYfCcrghspPIuKs2D9LF4Z/OabVSQjw1AO6PWxArD7teDA48bm0ySFqWDaPVqmQRl5GMWNglTXyrQ== + +"@oxlint/binding-darwin-x64@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.75.0.tgz#5650fc88539ee36f8373d4dd15e452270d3aa751" + integrity sha512-02mpwzf12BonZ6PT0TuQoomvEh2kVl2WGBIKWezCyToIS+rYkQZ6GXnARBAl9A4Ovm2V+Xe7M4KretyqmmcnJQ== + +"@oxlint/binding-freebsd-x64@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.75.0.tgz#4895059488ee87af3fae1a85df6c453ed853d2d2" + integrity sha512-qZJgLnDaBsiL5YESx2t/TZ8eXkL9fEkKoXEdzegROhlz9A0lgyGnZ0dAzJrh7LJAHQl2K9RdRueN2s/9N7+odg== + +"@oxlint/binding-linux-arm-gnueabihf@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.75.0.tgz#4fe2d79958294ac2e06e3e0690305cf88b3b9e0f" + integrity sha512-7XlaWA5BJD3XpCfrEqjEe6Zseeb14S7QGa304XfwKignRaKQ+eIj775BQ7nIslggWickl4IsPUFqJ+/gAyNHVg== + +"@oxlint/binding-linux-arm-musleabihf@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.75.0.tgz#fb56b53498b41e229d59fb4e2c7ffc3ae3dcb63d" + integrity sha512-av6Tpv8yrcMMMOadOqENBhlsLRcGFXXwoQ0hzHhsmS9FJ4Wioy8we427GbcMe2XTxmL2e60T67H1Dyr3up+tAA== + +"@oxlint/binding-linux-arm64-gnu@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.75.0.tgz#32626915317a366f51070eea72f07a6140e58f71" + integrity sha512-WcUhd8fHT5plrA14lANevl+hOl815mVI5t2hU21oFWrZKFXIVV/Sr4rWQV0NzSvzBupbMLNc5ErEA6Ehxh5jMg== + +"@oxlint/binding-linux-arm64-musl@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.75.0.tgz#dd288dd1e5986b5f87fb62b7d3b1b5e3d0e002e1" + integrity sha512-UWzp5wRHFe/ESO3+eEaxXsTkYTGLYjnTsi/I5neEacXSItQ6WNleapfOAeA4x2b8nyhJ4uQxqvtv9pHv8kWJtQ== + +"@oxlint/binding-linux-ppc64-gnu@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.75.0.tgz#bcb9d4fbf9154a537f703d5a52a51598b05a1006" + integrity sha512-XEVRwGMLKCUKrvhLAz4F6AIh8MJrQVdSZtAmPpRZt9tGPsUnamPOcl3dS/ZQzJnar/Ymgc//+xho0L60Emzuxg== + +"@oxlint/binding-linux-riscv64-gnu@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.75.0.tgz#957a95eeaa597c20b9ffd25610a793c860a7c0c4" + integrity sha512-mAG4DUXqfLC8cTjMD2kt3jDmVzFREYtDyeLNdLdsCcBc4Zbl2EMuiFektGBilQwkNjYnMvCqJs55U+Hyb+b+jw== + +"@oxlint/binding-linux-riscv64-musl@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.75.0.tgz#c321f88f1b426758acbe58aebe7599fc52af2e74" + integrity sha512-95hrAvriAlI+pekSomTFIn0+bawMDlDwTNVmdjsFusTHyL2JWh7TWvRNG/Lkim72uN8OiCcO9wcaC6omLP5E3w== + +"@oxlint/binding-linux-s390x-gnu@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.75.0.tgz#79a9ddd2a64a70d79e83e68973f1c889d9406942" + integrity sha512-4b6f2+FrtruAESrCqIKcrarzfrSx+wk2QNcp+RT91/Prc+pMQMAfyZ1rG1c3tFQNl8Bc616tx40uNXyxNBRPbQ== + +"@oxlint/binding-linux-x64-gnu@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.75.0.tgz#65056ef2383e7b6f2f0802901d774fb4647c3edc" + integrity sha512-nshAhrUvXFUWOvqQ2soIw7HFNWvpvEV4o0cYSqPtzLiPF5gKyYTDOOTJ6Rn8g8K/iGvPIrbDA4v8+5MvnjJrrg== + +"@oxlint/binding-linux-x64-musl@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.75.0.tgz#2c3aaa2f0d214bce8b14057a404344a836dcdfca" + integrity sha512-e4jNxLKnxLC6sYBQRxrI2pgIIxnmMtF8U/VwNYcjTT/CLS+spH624cYVnj07bTKwaEWT37/e025isOs6j/0xqA== + +"@oxlint/binding-openharmony-arm64@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.75.0.tgz#1732d1d4c99f13bec20187cc059ceea2665bf73e" + integrity sha512-hZ2lH+1qLf/DiEP9UWuQTK2JWj/BgvMB4jhIV4SmNU1wfEiYYX4TynQyAZXx0j9X4qRYizAL042SKaV+8ynh4w== + +"@oxlint/binding-win32-arm64-msvc@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.75.0.tgz#ab0d01d6ae90718b09c94ca3ec23875fcab10674" + integrity sha512-Ilj6PNzGDS3bCU0MSJH7Msh0NhH+T/mRp2shwg+q+GHeVlPwP5LEboW96aW+3kVKFk6zYZy1Xi5pZkqZh6X8KQ== + +"@oxlint/binding-win32-ia32-msvc@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.75.0.tgz#fcc5495b3c1fcd2d36eb5c07c7cb3ba2107a116f" + integrity sha512-QVit2nOEOiPhkmsrksPSkoGCdnZRNkspt8fwoYyP09te1VEbnSj4LAxua4rc8FKTmWkySVe05j8iz9GXYfF1AQ== + +"@oxlint/binding-win32-x64-msvc@1.75.0": + version "1.75.0" + resolved "https://registry.yarnpkg.com/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.75.0.tgz#a0f83dfffadd17647304eda4d5c65dd5ff6859cd" + integrity sha512-DSxnNkBUAYARPwJtR12Ig3deWr8w0H997xP6jy33i+e0SyYJw8FKuz4+cZtpmPEhQmvlPJE3X/2vNxDmLkd/rA== "@parcel/watcher-android-arm64@2.5.6": version "2.5.6" @@ -23664,42 +23664,42 @@ oxfmt@^0.38.0: "@oxfmt/binding-win32-ia32-msvc" "0.38.0" "@oxfmt/binding-win32-x64-msvc" "0.38.0" -oxlint-tsgolint@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/oxlint-tsgolint/-/oxlint-tsgolint-0.16.0.tgz#f17cb4cdf792daff212ece3b9a0ba5cf4a74f532" - integrity sha512-4RuJK2jP08XwqtUu+5yhCbxEauCm6tv2MFHKEMsjbosK2+vy5us82oI3VLuHwbNyZG7ekZA26U2LLHnGR4frIA== +oxlint-tsgolint@7: + version "7.0.2001" + resolved "https://registry.yarnpkg.com/oxlint-tsgolint/-/oxlint-tsgolint-7.0.2001.tgz#19e17beda6c9d25d5ac6a1681bfece0502039311" + integrity sha512-KjK/XLcXr1DSyonKhsuFqJRiuKqcyG9j3LJ8nkOsrLzGvodBPqzHOKauy10asLMDI0sUpvb+1sxlzff3udZvfg== optionalDependencies: - "@oxlint-tsgolint/darwin-arm64" "0.16.0" - "@oxlint-tsgolint/darwin-x64" "0.16.0" - "@oxlint-tsgolint/linux-arm64" "0.16.0" - "@oxlint-tsgolint/linux-x64" "0.16.0" - "@oxlint-tsgolint/win32-arm64" "0.16.0" - "@oxlint-tsgolint/win32-x64" "0.16.0" - -oxlint@^1.53.0: - version "1.53.0" - resolved "https://registry.yarnpkg.com/oxlint/-/oxlint-1.53.0.tgz#74b2241c639501b68574550578869055a28f9ee6" - integrity sha512-TLW0PzGbpO1JxUnuy1pIqVPjQUGh4fNfxu5XJbdFIRFVaJ0UFzTjjk/hSFTMRxN6lZub53xL/IwJNEkrh7VtDg== + "@oxlint-tsgolint/darwin-arm64" "7.0.2001" + "@oxlint-tsgolint/darwin-x64" "7.0.2001" + "@oxlint-tsgolint/linux-arm64" "7.0.2001" + "@oxlint-tsgolint/linux-x64" "7.0.2001" + "@oxlint-tsgolint/win32-arm64" "7.0.2001" + "@oxlint-tsgolint/win32-x64" "7.0.2001" + +oxlint@^1.75.0: + version "1.75.0" + resolved "https://registry.yarnpkg.com/oxlint/-/oxlint-1.75.0.tgz#04d554e061141c4bc9f568d330170720dbd7add3" + integrity sha512-m9WzjRcRYA/uqIZDa9tclrieoPJ/ln1QYTKdFx6NUOs8uY5DiHlIwRQoCrHT6OM6O3ww3l2skY5gO7G7ZphE7g== optionalDependencies: - "@oxlint/binding-android-arm-eabi" "1.53.0" - "@oxlint/binding-android-arm64" "1.53.0" - "@oxlint/binding-darwin-arm64" "1.53.0" - "@oxlint/binding-darwin-x64" "1.53.0" - "@oxlint/binding-freebsd-x64" "1.53.0" - "@oxlint/binding-linux-arm-gnueabihf" "1.53.0" - "@oxlint/binding-linux-arm-musleabihf" "1.53.0" - "@oxlint/binding-linux-arm64-gnu" "1.53.0" - "@oxlint/binding-linux-arm64-musl" "1.53.0" - "@oxlint/binding-linux-ppc64-gnu" "1.53.0" - "@oxlint/binding-linux-riscv64-gnu" "1.53.0" - "@oxlint/binding-linux-riscv64-musl" "1.53.0" - "@oxlint/binding-linux-s390x-gnu" "1.53.0" - "@oxlint/binding-linux-x64-gnu" "1.53.0" - "@oxlint/binding-linux-x64-musl" "1.53.0" - "@oxlint/binding-openharmony-arm64" "1.53.0" - "@oxlint/binding-win32-arm64-msvc" "1.53.0" - "@oxlint/binding-win32-ia32-msvc" "1.53.0" - "@oxlint/binding-win32-x64-msvc" "1.53.0" + "@oxlint/binding-android-arm-eabi" "1.75.0" + "@oxlint/binding-android-arm64" "1.75.0" + "@oxlint/binding-darwin-arm64" "1.75.0" + "@oxlint/binding-darwin-x64" "1.75.0" + "@oxlint/binding-freebsd-x64" "1.75.0" + "@oxlint/binding-linux-arm-gnueabihf" "1.75.0" + "@oxlint/binding-linux-arm-musleabihf" "1.75.0" + "@oxlint/binding-linux-arm64-gnu" "1.75.0" + "@oxlint/binding-linux-arm64-musl" "1.75.0" + "@oxlint/binding-linux-ppc64-gnu" "1.75.0" + "@oxlint/binding-linux-riscv64-gnu" "1.75.0" + "@oxlint/binding-linux-riscv64-musl" "1.75.0" + "@oxlint/binding-linux-s390x-gnu" "1.75.0" + "@oxlint/binding-linux-x64-gnu" "1.75.0" + "@oxlint/binding-linux-x64-musl" "1.75.0" + "@oxlint/binding-openharmony-arm64" "1.75.0" + "@oxlint/binding-win32-arm64-msvc" "1.75.0" + "@oxlint/binding-win32-ia32-msvc" "1.75.0" + "@oxlint/binding-win32-x64-msvc" "1.75.0" p-defer@^1.0.0: version "1.0.0"