Skip to content

Commit f9fd5bc

Browse files
authored
chore(lint): Auto-fix all the js ../ relative imports (#89334)
This was automatically dont with the config from #89333 In here you'll see plenty of examples where the config worked in `static/app`, `static/gsAdmin`, and `static/gsApp` The rule is still set to `warn` in the repo, to help prevent CI failures for others
1 parent 6aa7721 commit f9fd5bc

File tree

528 files changed

+1643
-1761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

528 files changed

+1643
-1761
lines changed

static/app/components/charts/components/legend.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import type {LegendComponentOption} from 'echarts';
66
import merge from 'lodash/merge';
77

88
import type BaseChart from 'sentry/components/charts/baseChart';
9-
10-
import {truncationFormatter} from '../utils';
9+
import {truncationFormatter} from 'sentry/components/charts/utils';
1110

1211
type ChartProps = React.ComponentProps<typeof BaseChart>;
1312

static/app/components/charts/components/tooltip.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import type {TooltipComponentFormatterCallback, TooltipComponentOption} from 'ec
66
import moment from 'moment-timezone';
77

88
import type BaseChart from 'sentry/components/charts/baseChart';
9+
import {truncationFormatter} from 'sentry/components/charts/utils';
910
import {t} from 'sentry/locale';
1011
import type {DataPoint} from 'sentry/types/echarts';
1112
import toArray from 'sentry/utils/array/toArray';
1213
import {getFormattedDate, getTimeFormat} from 'sentry/utils/dates';
1314

14-
import {truncationFormatter} from '../utils';
15-
1615
export const CHART_TOOLTIP_VIEWPORT_OFFSET = 20;
1716

1817
type ChartProps = React.ComponentProps<typeof BaseChart>;

static/app/components/checkInTimeline/hooks/useTimeWindowConfig.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useMemo} from 'react';
22

3-
import {getConfigFromTimeRange} from '../utils/getConfigFromTimeRange';
3+
import {getConfigFromTimeRange} from 'sentry/components/checkInTimeline/utils/getConfigFromTimeRange';
44

55
import {usePageFilterDates} from './useMonitorDates';
66

static/app/components/checkInTimeline/utils/getAggregateStatus.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {StatsBucket} from '../types';
1+
import type {StatsBucket} from 'sentry/components/checkInTimeline/types';
22

33
export function getAggregateStatus<Status extends string>(
44
statusPrecedent: Status[],

static/app/components/checkInTimeline/utils/getConfigFromTimeRange.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import moment from 'moment-timezone';
22

3+
import type {
4+
RollupConfig,
5+
TimeWindowConfig,
6+
} from 'sentry/components/checkInTimeline/types';
37
import {getFormat} from 'sentry/utils/dates';
48

5-
import type {RollupConfig, TimeWindowConfig} from '../types';
6-
79
/**
810
* The minimum pixels to allocate to the reference start time label which
911
* always includes date, time, and timezone.

static/app/components/checkInTimeline/utils/getTickStyle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {css, type Theme} from '@emotion/react';
22

3-
import type {TickStyle} from '../types';
3+
import type {TickStyle} from 'sentry/components/checkInTimeline/types';
44

55
export function getTickStyle<Status extends string>(
66
statusStyles: Record<Status, TickStyle>,

static/app/components/checkInTimeline/utils/getTimeRangeFromEvent.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import moment from 'moment-timezone';
22

3+
import type {TimeWindow} from 'sentry/components/checkInTimeline/types';
34
import type {Event} from 'sentry/types/event';
45

5-
import type {TimeWindow} from '../types';
6-
76
// Stores the elapsed minutes for each selectable resolution
87
export const resolutionElapsedMinutes: Record<TimeWindow, number> = {
98
'1h': 60,

static/app/components/checkInTimeline/utils/isStatsBucketEmpty.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {StatsBucket} from '../types';
1+
import type {StatsBucket} from 'sentry/components/checkInTimeline/types';
22

33
export function isStatsBucketEmpty<Status extends string>(
44
stats: StatsBucket<Status>

static/app/components/checkInTimeline/utils/mergeBuckets.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {CheckInBucket, RollupConfig} from '../types';
1+
import type {CheckInBucket, RollupConfig} from 'sentry/components/checkInTimeline/types';
22

33
import {mergeBuckets} from './mergeBuckets';
44
import {generateTestStats, type TestStatusCounts, testStatusPrecedent} from './testUtils';

static/app/components/checkInTimeline/utils/mergeBuckets.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import chunk from 'lodash/chunk';
22

3-
import type {CheckInBucket as CheckInStats, JobTickData, RollupConfig} from '../types';
3+
import type {
4+
CheckInBucket as CheckInStats,
5+
JobTickData,
6+
RollupConfig,
7+
} from 'sentry/components/checkInTimeline/types';
48

59
import {getAggregateStatus} from './getAggregateStatus';
610
import {isStatsBucketEmpty} from './isStatsBucketEmpty';

static/app/components/checkInTimeline/utils/mergeStats.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {StatsBucket} from '../types';
1+
import type {StatsBucket} from 'sentry/components/checkInTimeline/types';
22

33
/**
44
* Combines job status counts

static/app/components/checkInTimeline/utils/testUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type {StatsBucket, TickStyle} from '../types';
1+
import type {StatsBucket, TickStyle} from 'sentry/components/checkInTimeline/types';
22

33
export type TestStatusCounts = [
44
in_progress: number,

static/app/components/core/badge/alertBadge.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ import {
1313
import type {SVGIconProps} from 'sentry/icons/svgIcon';
1414
import {t} from 'sentry/locale';
1515
import {space} from 'sentry/styles/space';
16+
import {withChonk} from 'sentry/utils/theme/withChonk';
1617
import {IncidentStatus} from 'sentry/views/alerts/types';
1718

18-
import {withChonk} from '../../../utils/theme/withChonk';
19-
2019
import {ChonkAlertBadgeDiamondBackground} from './alertBadge.chonk';
2120

2221
export interface AlertBadgeProps {

static/app/components/core/compactSelect/gridList/index.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@ import {mergeProps} from '@react-aria/utils';
55
import type {ListState} from '@react-stately/list';
66
import type {CollectionChildren} from '@react-types/shared';
77

8+
import {SelectContext} from 'sentry/components/core/compactSelect/control';
9+
import {SelectFilterContext} from 'sentry/components/core/compactSelect/list';
10+
import {
11+
ListLabel,
12+
ListSeparator,
13+
ListWrap,
14+
SizeLimitMessage,
15+
} from 'sentry/components/core/compactSelect/styles';
16+
import type {SelectKey, SelectSection} from 'sentry/components/core/compactSelect/types';
817
import {t} from 'sentry/locale';
918
import type {FormSize} from 'sentry/utils/theme';
1019

11-
import {SelectContext} from '../control';
12-
import {SelectFilterContext} from '../list';
13-
import {ListLabel, ListSeparator, ListWrap, SizeLimitMessage} from '../styles';
14-
import type {SelectKey, SelectSection} from '../types';
15-
1620
import {GridListOption} from './option';
1721
import {GridListSection} from './section';
1822

static/app/components/core/compactSelect/gridList/option.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ import type {ListState} from '@react-stately/list';
88
import type {Node} from '@react-types/shared';
99

1010
import {Checkbox} from 'sentry/components/core/checkbox';
11+
import {CheckWrap} from 'sentry/components/core/compactSelect/styles';
1112
import {InnerWrap, MenuListItem} from 'sentry/components/core/menuListItem';
1213
import {IconCheckmark} from 'sentry/icons';
1314
import {space} from 'sentry/styles/space';
1415
import type {FormSize} from 'sentry/utils/theme';
1516

16-
import {CheckWrap} from '../styles';
17-
1817
interface GridListOptionProps extends AriaGridListItemOptions {
1918
listState: ListState<any>;
2019
node: Node<any>;

static/app/components/core/compactSelect/gridList/section.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@ import {useSeparator} from '@react-aria/separator';
33
import type {ListState} from '@react-stately/list';
44
import type {Node} from '@react-types/shared';
55

6-
import type {FormSize} from 'sentry/utils/theme';
7-
8-
import {SelectFilterContext} from '../list';
6+
import {SelectFilterContext} from 'sentry/components/core/compactSelect/list';
97
import {
108
SectionGroup,
119
SectionHeader,
1210
SectionSeparator,
1311
SectionTitle,
1412
SectionWrap,
15-
} from '../styles';
16-
import type {SelectKey, SelectSection} from '../types';
17-
import {SectionToggle} from '../utils';
13+
} from 'sentry/components/core/compactSelect/styles';
14+
import type {SelectKey, SelectSection} from 'sentry/components/core/compactSelect/types';
15+
import {SectionToggle} from 'sentry/components/core/compactSelect/utils';
16+
import type {FormSize} from 'sentry/utils/theme';
1817

1918
import {GridListOption} from './option';
2019

static/app/components/core/compactSelect/listBox/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ import {mergeProps, mergeRefs} from '@react-aria/utils';
55
import type {ListState} from '@react-stately/list';
66
import type {CollectionChildren} from '@react-types/shared';
77

8+
import {
9+
ListLabel,
10+
ListSeparator,
11+
ListWrap,
12+
SizeLimitMessage,
13+
} from 'sentry/components/core/compactSelect/styles';
14+
import type {SelectKey, SelectSection} from 'sentry/components/core/compactSelect/types';
815
import {t} from 'sentry/locale';
916
import type {FormSize} from 'sentry/utils/theme';
1017

11-
import {ListLabel, ListSeparator, ListWrap, SizeLimitMessage} from '../styles';
12-
import type {SelectKey, SelectSection} from '../types';
13-
1418
import {ListBoxOption} from './option';
1519
import {ListBoxSection} from './section';
1620

static/app/components/core/compactSelect/listBox/option.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import type {ListState} from '@react-stately/list';
66
import type {Node} from '@react-types/shared';
77

88
import {Checkbox} from 'sentry/components/core/checkbox';
9+
import {CheckWrap} from 'sentry/components/core/compactSelect/styles';
910
import {InnerWrap, MenuListItem} from 'sentry/components/core/menuListItem';
1011
import {IconCheckmark} from 'sentry/icons';
1112
import {space} from 'sentry/styles/space';
1213
import type {FormSize} from 'sentry/utils/theme';
1314

14-
import {CheckWrap} from '../styles';
15-
1615
interface ListBoxOptionProps extends AriaOptionProps {
1716
item: Node<any>;
1817
listState: ListState<any>;

static/app/components/core/compactSelect/listBox/section.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ import {useSeparator} from '@react-aria/separator';
55
import type {ListState} from '@react-stately/list';
66
import type {Node} from '@react-types/shared';
77

8-
import type {FormSize} from 'sentry/utils/theme';
9-
108
import {
119
SectionGroup,
1210
SectionHeader,
1311
SectionSeparator,
1412
SectionTitle,
1513
SectionWrap,
16-
} from '../styles';
17-
import type {SelectKey, SelectSection} from '../types';
18-
import {SectionToggle} from '../utils';
14+
} from 'sentry/components/core/compactSelect/styles';
15+
import type {SelectKey, SelectSection} from 'sentry/components/core/compactSelect/types';
16+
import {SectionToggle} from 'sentry/components/core/compactSelect/utils';
17+
import type {FormSize} from 'sentry/utils/theme';
1918

2019
import {ListBoxOption} from './option';
2120

static/app/components/deprecatedSmartSearchBar/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import {fetchRecentSearches, saveRecentSearch} from 'sentry/actionCreators/saved
99
import type {Client} from 'sentry/api';
1010
import {Button} from 'sentry/components/core/button';
1111
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
12+
import type {MenuItemProps} from 'sentry/components/dropdownMenu';
13+
import {DropdownMenu} from 'sentry/components/dropdownMenu';
1214
import {normalizeDateTimeParams} from 'sentry/components/organizations/pageFilters/parse';
1315
import type {
1416
BooleanOperator,
@@ -54,9 +56,6 @@ import withOrganization from 'sentry/utils/withOrganization';
5456
// eslint-disable-next-line no-restricted-imports
5557
import withSentryRouter from 'sentry/utils/withSentryRouter';
5658

57-
import type {MenuItemProps} from '../dropdownMenu';
58-
import {DropdownMenu} from '../dropdownMenu';
59-
6059
import SearchBarDatePicker from './searchBarDatePicker';
6160
import SearchDropdown from './searchDropdown';
6261
import SearchHotkeysListener from './searchHotkeysListener';

static/app/components/deprecatedSmartSearchBar/types.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1+
import type {Token, TokenResult} from 'sentry/components/searchSyntax/parser';
12
import type {FieldKind} from 'sentry/utils/fields';
23

3-
import type {Token, TokenResult} from '../searchSyntax/parser';
4-
54
export enum ItemType {
65
DEFAULT = 'default',
76
TAG_KEY = 'tag-key',

static/app/components/dynamicSampling/investigationRule.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import type {Organization} from 'sentry/types/organization';
1515
import {trackAnalytics} from 'sentry/utils/analytics';
1616
import type EventView from 'sentry/utils/discover/eventView';
1717
import {DiscoverDatasets} from 'sentry/utils/discover/types';
18+
import {handleXhrErrorResponse} from 'sentry/utils/handleXhrErrorResponse';
1819
import type {ApiQueryKey} from 'sentry/utils/queryClient';
1920
import {useApiQuery, useMutation, useQueryClient} from 'sentry/utils/queryClient';
2021
import type RequestError from 'sentry/utils/requestError/requestError';
@@ -24,8 +25,6 @@ import {Datasource} from 'sentry/views/alerts/rules/metric/types';
2425
import {getQueryDatasource} from 'sentry/views/alerts/utils';
2526
import {hasDatasetSelector} from 'sentry/views/dashboards/utils';
2627

27-
import {handleXhrErrorResponse} from '../../utils/handleXhrErrorResponse';
28-
2928
// Number of samples under which we can trigger an investigation rule
3029
const INVESTIGATION_MAX_SAMPLES_TRIGGER = 5;
3130

static/app/components/events/eventCustomPerformanceMetrics.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type {Location} from 'history';
55
import {SectionHeading} from 'sentry/components/charts/styles';
66
import {DropdownMenu} from 'sentry/components/dropdownMenu';
77
import Panel from 'sentry/components/panels/panel';
8+
import {Tooltip} from 'sentry/components/tooltip';
89
import {IconEllipsis} from 'sentry/icons';
910
import {t} from 'sentry/locale';
1011
import {space} from 'sentry/styles/space';
@@ -20,8 +21,6 @@ import {
2021
import {isCustomMeasurement} from 'sentry/views/dashboards/utils';
2122
import {transactionSummaryRouteWithQuery} from 'sentry/views/performance/transactionSummary/utils';
2223

23-
import {Tooltip} from '../tooltip';
24-
2524
export enum EventDetailPageSource {
2625
PERFORMANCE = 'performance',
2726
DISCOVER = 'discover',

static/app/components/events/eventExtraData/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import {useState} from 'react';
22

33
import ContextBlock from 'sentry/components/events/contexts/contextBlock';
4+
import {
5+
getKnownData,
6+
getKnownStructuredData,
7+
} from 'sentry/components/events/contexts/utils';
48
import {SegmentedControl} from 'sentry/components/segmentedControl';
59
import {t} from 'sentry/locale';
610
import type {Event} from 'sentry/types/event';
@@ -9,8 +13,6 @@ import {isEmptyObject} from 'sentry/utils/object/isEmptyObject';
913
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
1014
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection';
1115

12-
import {getKnownData, getKnownStructuredData} from '../contexts/utils';
13-
1416
import {getEventExtraDataKnownDataDetails} from './getEventExtraDataKnownDataDetails';
1517
import type {EventExtraData as TEventExtraData, EventExtraDataType} from './types';
1618

static/app/components/events/eventTags/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ import * as Sentry from '@sentry/react';
44
import EventTagCustomBanner from 'sentry/components/events/eventTags/eventTagCustomBanner';
55
import EventTagsTree from 'sentry/components/events/eventTags/eventTagsTree';
66
import {TagFilter} from 'sentry/components/events/eventTags/util';
7+
import {AnnotatedText} from 'sentry/components/events/meta/annotatedText';
78
import type {Event, EventTag} from 'sentry/types/event';
89
import type {Project} from 'sentry/types/project';
910
import {defined} from 'sentry/utils';
1011
import {trackAnalytics} from 'sentry/utils/analytics';
1112
import {isMobilePlatform} from 'sentry/utils/platform';
1213
import useOrganization from 'sentry/utils/useOrganization';
1314

14-
import {AnnotatedText} from '../meta/annotatedText';
15-
1615
type Props = {
1716
event: Event;
1817
projectSlug: Project['slug'];

static/app/components/events/eventTagsAndScreenshot/tags.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
33

44
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
55
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
6+
import {EventTags} from 'sentry/components/events/eventTags';
67
import {
78
getSentryDefaultTags,
89
TagFilter,
@@ -18,8 +19,6 @@ import type {Project} from 'sentry/types/project';
1819
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
1920
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection';
2021

21-
import {EventTags} from '../eventTags';
22-
2322
type Props = {
2423
event: Event;
2524
projectSlug: Project['slug'];

static/app/components/events/interfaces/breadcrumbs/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {CompactSelect} from 'sentry/components/core/compactSelect';
99
import ErrorBoundary from 'sentry/components/errorBoundary';
1010
import type {EnhancedCrumb} from 'sentry/components/events/breadcrumbs/utils';
1111
import type {BreadcrumbWithMeta} from 'sentry/components/events/interfaces/breadcrumbs/types';
12+
import SearchBarAction from 'sentry/components/events/interfaces/searchBarAction';
1213
import {IconSort} from 'sentry/icons';
1314
import {t} from 'sentry/locale';
1415
import {space} from 'sentry/styles/space';
@@ -21,8 +22,6 @@ import {useLocalStorageState} from 'sentry/utils/useLocalStorageState';
2122
import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
2223
import {InterimSection} from 'sentry/views/issueDetails/streamline/interimSection';
2324

24-
import SearchBarAction from '../searchBarAction';
25-
2625
import {Level} from './breadcrumb/level';
2726
import Type from './breadcrumb/type';
2827
import Breadcrumbs from './breadcrumbs';

static/app/components/events/interfaces/crashContent/exception/stackTrace.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import EmptyMessage from 'sentry/components/emptyMessage';
2+
import StackTraceContent from 'sentry/components/events/interfaces/crashContent/stackTrace/content';
3+
import {NativeContent} from 'sentry/components/events/interfaces/crashContent/stackTrace/nativeContent';
24
import type {FrameSourceMapDebuggerData} from 'sentry/components/events/interfaces/sourceMapsDebuggerModal';
35
import Panel from 'sentry/components/panels/panel';
46
import {IconWarning} from 'sentry/icons';
@@ -11,9 +13,6 @@ import {defined} from 'sentry/utils';
1113
import {isNativePlatform} from 'sentry/utils/platform';
1214
import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';
1315

14-
import StackTraceContent from '../stackTrace/content';
15-
import {NativeContent} from '../stackTrace/nativeContent';
16-
1716
type Props = {
1817
chainedException: boolean;
1918
data: ExceptionValue['stacktrace'];

0 commit comments

Comments
 (0)