Skip to content
Draft
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
30 changes: 30 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "./packages/core/node_modules/oxfmt/configuration_schema.json",
"arrowParens": "avoid",
"printWidth": 120,
"proseWrap": "always",
"singleQuote": true,
"trailingComma": "all",
"sortImports": {
"groups": [
"type-import",
["value-builtin", "value-external"],
["type-internal", "value-internal"],
["type-parent", "type-sibling", "type-index"],
["value-parent", "value-sibling", "value-index"],
"unknown"
]
},
"ignorePatterns": [
"test/react-native/versions/**",
".github/workflows/*.yml"
],
"overrides": [
{
"files": ["*.md"],
"options": {
"proseWrap": "preserve"
}
}
]
}
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["esbenp.prettier-vscode", "nickelpack.oxlint"]
"recommendations": ["nickelpack.oxlint"]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"google-java-format": "^1.4.0",
"lerna": "^8.1.8",
"npm-run-all2": "^6.2.2",
"oxfmt": "^0.42.0",
"oxlint": "^1.56.0",
"pmd-bin": "^2.5.0",
"prettier": "^2.0.5",
"react-native-version": "^4.0.0",
"replace-in-file": "^7.0.1"
},
Expand Down
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"test:tools": "npx jest --config jest.config.tools.js",
"test:watch": "npx jest --watch",
"yalc:add:sentry-javascript": "yalc add @sentry/browser @sentry/core @sentry/react @sentry/types",
"fix": "npx run-s fix:oxlint fix:prettier",
"fix": "npx run-s fix:oxlint fix:fmt",
"fix:oxlint": "oxlint --fix",
"fix:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --write \"{src,test,scripts,plugin/src}/**/**.ts\"",
"lint": "npx run-s lint:oxlint lint:prettier",
"fix:fmt": "oxfmt \"{src,test,scripts,plugin/src}/**/**.ts\" \"{src,test}/**/**.tsx\"",
"lint": "npx run-s lint:oxlint lint:fmt",
"lint:oxlint": "oxlint",
"lint:prettier": "prettier --config ../../.prettierrc.json --ignore-path ../../.prettierignore --check \"{src,test,scripts,plugin/src}/**/**.ts\""
"lint:fmt": "oxfmt --check \"{src,test,scripts,plugin/src}/**/**.ts\" \"{src,test}/**/**.tsx\""
},
"bin": {
"sentry-eas-build-on-complete": "scripts/eas-build-hook.js",
Expand Down Expand Up @@ -105,8 +105,8 @@
"jest-extended": "^4.0.2",
"madge": "^6.1.0",
"metro": "0.83.1",
"oxfmt": "^0.42.0",
"oxlint": "^1.56.0",
"prettier": "^2.0.5",
"react": "19.1.0",
"react-native": "0.80.1",
"react-test-renderer": "19.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/core/plugin/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as fs from 'fs';
import * as path from 'path';

import { warnOnce } from './logger';

export function writeSentryPropertiesTo(filepath: string, sentryProperties: string): void {
Expand Down
5 changes: 4 additions & 1 deletion packages/core/plugin/src/withSentry.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import type { ExpoConfig } from '@expo/config-types';
import type { ConfigPlugin } from 'expo/config-plugins';

import { createRunOncePlugin, withDangerousMod } from 'expo/config-plugins';

import type { SentryAndroidGradlePluginOptions } from './withSentryAndroidGradlePlugin';

import { bold, warnOnce } from './logger';
import { writeSentryOptions } from './utils';
import { PLUGIN_NAME, PLUGIN_VERSION } from './version';
import { withSentryAndroid } from './withSentryAndroid';
import type { SentryAndroidGradlePluginOptions } from './withSentryAndroidGradlePlugin';
import { withSentryAndroidGradlePlugin } from './withSentryAndroidGradlePlugin';
import { withSentryIOS } from './withSentryIOS';

Expand Down
2 changes: 2 additions & 0 deletions packages/core/plugin/src/withSentryAndroid.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { ExpoConfig } from '@expo/config-types';
import type { ConfigPlugin } from 'expo/config-plugins';

import { withAppBuildGradle, withDangerousMod, withMainApplication } from 'expo/config-plugins';
import * as path from 'path';

import { warnOnce } from './logger';
import { writeSentryPropertiesTo } from './utils';

Expand Down
4 changes: 3 additions & 1 deletion packages/core/plugin/src/withSentryAndroidGradlePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { withAppBuildGradle, withProjectBuildGradle } from '@expo/config-plugins';
import type { ExpoConfig } from '@expo/config-types';

import { withAppBuildGradle, withProjectBuildGradle } from '@expo/config-plugins';

import { warnOnce } from './logger';

export interface SentryAndroidGradlePluginOptions {
Expand Down
2 changes: 2 additions & 0 deletions packages/core/plugin/src/withSentryIOS.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import type { ExpoConfig } from '@expo/config-types';
import type { ConfigPlugin, XcodeProject } from 'expo/config-plugins';

import { withAppDelegate, withDangerousMod, withXcodeProject } from 'expo/config-plugins';
import * as path from 'path';

import { warnOnce } from './logger';
import { writeSentryPropertiesTo } from './utils';

Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/js/NativeLogListener.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { debug } from '@sentry/core';
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';

import type { NativeLogEntry } from './options';

import { isExpoGo } from './utils/environment';

const NATIVE_LOG_EVENT_NAME = 'SentryNativeLog';
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/js/NativeRNSentry.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { Package } from '@sentry/core';
import type { TurboModule } from 'react-native';

import { TurboModuleRegistry } from 'react-native';

import type { UnsafeObject } from './utils/rnlibrariesinterface';

// There has to be only one interface and it has to be named `Spec`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { HostComponent, ViewProps } from 'react-native';

// The default export exists in the file but the linter doesn't see it
import { codegenNativeComponent } from 'react-native';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { HostComponent, ViewProps } from 'react-native';

// The default export exists in the file but the linter doesn't see it
import { codegenNativeComponent } from 'react-native';

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/js/breadcrumb.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Breadcrumb, SeverityLevel } from '@sentry/core';

import { severityLevelFromString } from '@sentry/core';

export const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel = 'info';
Expand Down
9 changes: 6 additions & 3 deletions packages/core/src/js/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { eventFromException, eventFromMessage } from '@sentry/browser';
import type {
ClientReportEnvelope,
ClientReportItem,
Expand All @@ -10,6 +9,8 @@ import type {
TransportMakeRequestResponse,
UserFeedback,
} from '@sentry/core';

import { eventFromException, eventFromMessage } from '@sentry/browser';
import {
_INTERNAL_flushLogsBuffer,
addAutoIpAddressToSession,
Expand All @@ -19,12 +20,14 @@ import {
SentryError,
} from '@sentry/core';
import { Alert } from 'react-native';

import type { ReactNativeClientOptions } from './options';
import type { mobileReplayIntegration } from './replay/mobilereplay';

import { getDevServer } from './integrations/debugsymbolicatorutils';
import { defaultSdkInfo } from './integrations/sdkinfo';
import { getDefaultSidecarUrl } from './integrations/spotlight';
import { defaultNativeLogHandler, setupNativeLogListener } from './NativeLogListener';
import type { ReactNativeClientOptions } from './options';
import type { mobileReplayIntegration } from './replay/mobilereplay';
import { MOBILE_REPLAY_INTEGRATION_NAME } from './replay/mobilereplay';
import { createUserFeedbackEnvelope, items } from './utils/envelope';
import { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';
Expand Down
11 changes: 9 additions & 2 deletions packages/core/src/js/feedback/FeedbackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import type { NativeEventSubscription } from 'react-native';

import * as React from 'react';
import type { NativeEventSubscription} from 'react-native';
import { Appearance, Image, Text, TouchableOpacity } from 'react-native';

import type {
FeedbackButtonProps,
FeedbackButtonStyles,
FeedbackButtonTextConfiguration,
} from './FeedbackWidget.types';

import { defaultButtonConfiguration } from './defaults';
import { defaultButtonStyles } from './FeedbackWidget.styles';
import { getTheme } from './FeedbackWidget.theme';
import type { FeedbackButtonProps, FeedbackButtonStyles, FeedbackButtonTextConfiguration } from './FeedbackWidget.types';
import { showFeedbackWidget } from './FeedbackWidgetManager';
import { feedbackIcon } from './icons';
import { lazyLoadFeedbackIntegration } from './lazy';
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/js/feedback/FeedbackWidget.styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ViewStyle } from 'react-native';

import type { FeedbackWidgetTheme } from './FeedbackWidget.theme';
import type { FeedbackButtonStyles, FeedbackWidgetStyles } from './FeedbackWidget.types';

Expand Down
1 change: 1 addition & 0 deletions packages/core/src/js/feedback/FeedbackWidget.theme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Appearance } from 'react-native';

import { getColorScheme, getFeedbackDarkTheme, getFeedbackLightTheme } from './integration';

/**
Expand Down
Loading
Loading