Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/core/.oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@
"no-restricted-globals": ["error", "window", "document", "location", "navigator"],
// Bundle size isn't a concern for React Native
"sdk/no-class-field-initializers": "off",
// TODO: Re-enable once oxlint supports inline disable for jsPlugin rules
// Only 2 intentional uses exist (debugsymbolicator.ts, sentryMetroSerializer.ts)
"sdk/no-regexp-constructor": "off"
"sdk/no-regexp-constructor": "error"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/integrations/debugsymbolicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { fetchSourceContext, parseErrorStack, symbolicateStackTrace } from './de

const INTEGRATION_NAME = 'DebugSymbolicator';

const INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\.js$', 'MessageQueue\\.js$'].join('|'));
const INTERNAL_CALLSITES_REGEX = /ReactNativeRenderer-dev\.js$|MessageQueue\.js$/;

/**
* React Native Error
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/js/tools/sentryMetroSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,7 @@ function calculateDebugId(bundleCode: string, modules?: Array<[id: number, code:
}

function injectDebugId(code: string, debugId: string): string {
// Built from the shared DEBUG_ID_PLACE_HOLDER constant (so it can't drift), not user input.
// oxlint-disable-next-line sdk/no-regexp-constructor
return code.replace(new RegExp(DEBUG_ID_PLACE_HOLDER, 'g'), debugId);
}
Loading