Browse Source

ref(ts): Consistent relative imports in `sentry/types` (#76155)

Evan Purkhiser 7 months ago
parent
commit
ff7a14b330

+ 2 - 1
static/app/types/auth.tsx

@@ -1,7 +1,8 @@
 import type u2f from 'u2f-api';
 
 import type {Field} from 'sentry/components/forms/types';
-import type {ControlSiloOrganization} from 'sentry/types/controlSiloOrganization';
+
+import type {ControlSiloOrganization} from './controlSiloOrganization';
 
 export type AuthenticatorDevice = {
   authId: string;

+ 2 - 2
static/app/types/event.tsx

@@ -5,11 +5,11 @@ import type {
   TraceContextType,
 } from 'sentry/components/events/interfaces/spans/types';
 import type {SymbolicatorStatus} from 'sentry/components/events/interfaces/types';
-import type {IssueAttachment, IssueCategory, IssueType} from 'sentry/types/group';
-import type {PlatformKey} from 'sentry/types/project';
 
 import type {RawCrumb} from './breadcrumbs';
 import type {Image} from './debugImage';
+import type {IssueAttachment, IssueCategory, IssueType} from './group';
+import type {PlatformKey} from './project';
 import type {Release} from './release';
 import type {RawStacktrace, StackTraceMechanism, StacktraceType} from './stacktrace';
 

+ 1 - 1
static/app/types/hooks.tsx

@@ -11,7 +11,6 @@ import type SidebarItem from 'sentry/components/sidebar/sidebarItem';
 import type DateRange from 'sentry/components/timeRangeSelector/dateRange';
 import type SelectorItems from 'sentry/components/timeRangeSelector/selectorItems';
 import type {SVGIconProps} from 'sentry/icons/svgIcon';
-import type {Group} from 'sentry/types/group';
 import type {UseExperiment} from 'sentry/utils/useExperiment';
 import type {TitleableModuleNames} from 'sentry/views/insights/common/components/modulePageProviders';
 import type {StatusToggleButtonProps} from 'sentry/views/monitors/components/statusToggleButton';
@@ -20,6 +19,7 @@ import type {RouteAnalyticsContext} from 'sentry/views/routeAnalyticsContextProv
 import type {NavigationItem, NavigationSection} from 'sentry/views/settings/types';
 
 import type {ExperimentKey} from './experiments';
+import type {Group} from './group';
 import type {Integration, IntegrationProvider} from './integrations';
 import type {Member, Organization} from './organization';
 import type {Project} from './project';

+ 1 - 1
static/app/types/integrations.tsx

@@ -1,6 +1,5 @@
 import type {AlertProps} from 'sentry/components/alert';
 import type {Field} from 'sentry/components/forms/types';
-import type {PlatformKey} from 'sentry/types/project';
 import type {
   DISABLED as DISABLED_STATUS,
   INSTALLED,
@@ -11,6 +10,7 @@ import type {
 
 import type {Avatar, Choice, Choices, ObjectStatus, Scope} from './core';
 import type {ParsedOwnershipRule} from './group';
+import type {PlatformKey} from './project';
 import type {BaseRelease} from './release';
 import type {User} from './user';
 

+ 1 - 1
static/app/types/metrics.tsx

@@ -1,4 +1,4 @@
-import type {DateString} from 'sentry/types/core';
+import type {DateString} from './core';
 
 export type MetricAggregation =
   | 'sum'

+ 3 - 3
static/app/types/onboarding.tsx

@@ -2,10 +2,10 @@ import type {InjectedRouter} from 'react-router';
 
 import type {OnboardingContextProps} from 'sentry/components/onboarding/onboardingContext';
 import type {Category} from 'sentry/components/platformPicker';
-import type {Group} from 'sentry/types/group';
-import type {Organization} from 'sentry/types/organization';
-import type {PlatformIntegration, PlatformKey, Project} from 'sentry/types/project';
 
+import type {Group} from './group';
+import type {Organization} from './organization';
+import type {PlatformIntegration, PlatformKey, Project} from './project';
 import type {AvatarUser} from './user';
 
 export enum OnboardingTaskKey {

+ 1 - 1
static/app/types/organization.tsx

@@ -1,4 +1,3 @@
-import type {Project} from 'sentry/types/project';
 import type {AggregationOutputType} from 'sentry/utils/discover/fields';
 import type {
   DatasetSource,
@@ -11,6 +10,7 @@ import type {Actor, Avatar, ObjectStatus, Scope} from './core';
 import type {OrgExperiments} from './experiments';
 import type {ExternalTeam} from './integrations';
 import type {OnboardingTaskStatus} from './onboarding';
+import type {Project} from './project';
 import type {Relay} from './relay';
 import type {User} from './user';
 

+ 1 - 2
static/app/types/release.tsx

@@ -1,7 +1,6 @@
-import type {PlatformKey} from 'sentry/types/project';
-
 import type {TimeseriesValue} from './core';
 import type {Commit} from './integrations';
+import type {PlatformKey} from './project';
 import type {User} from './user';
 
 export enum ReleaseStatus {

+ 1 - 1
static/app/types/system.tsx

@@ -2,8 +2,8 @@ import type {Theme} from '@emotion/react';
 import type {FocusTrap} from 'focus-trap';
 
 import type {exportedGlobals} from 'sentry/bootstrap/exportGlobals';
-import type {ParntershipAgreementType} from 'sentry/types/hooks';
 
+import type {ParntershipAgreementType} from './hooks';
 import type {User} from './user';
 
 export enum SentryInitRenderReactComponent {