Skip to content

Commit

Permalink
chore: enforce @typescript-eslint/no-restricted-imports everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-sanderson committed Nov 6, 2024
1 parent 2e997ec commit 5d1104b
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ module.exports = {
'no-console': 'off',
'react/jsx-no-undef': 'off',
'no-catch-shadow': 'off',
'@typescript-eslint/no-restricted-imports': 'off',
'no-restricted-syntax': 'off',
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain-link/src/workers/electrum/devrun.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// @ts-nocheck
/// <reference path="../../../../suite/global.d.ts" />

import ElectrumWorker from '.';
import ElectrumWorker from './index';
import { createSocket } from './sockets';
import type { Message, Response } from '../../types';

Expand Down
6 changes: 4 additions & 2 deletions packages/components/src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import styled, { css, DefaultTheme, useTheme } from 'styled-components';

import { variables } from '../../config';
import { Elevation, borders, spacingsPx, typography, spacings } from '@trezor/theme';
import { Row, Column, TransientProps, useElevation, useMediaQuery } from '../..';
import {
FrameProps,
FramePropsKeys,
Expand All @@ -23,6 +22,10 @@ import {
} from './utils';
import { Icon, IconName } from '../Icon/Icon';
import { SCREEN_SIZE } from '../../config/variables';
import { TransientProps } from '../../utils/transientProps';
import { useMediaQuery } from '../../utils/useMediaQuery';
import { useElevation } from '../ElevationContext/ElevationContext';
import { Column, Row } from '../Flex/Flex';

export const allowedBannerFrameProps = ['margin'] as const satisfies FramePropsKeys[];
type AllowedFrameProps = Pick<FrameProps, (typeof allowedBannerFrameProps)[number]>;
Expand Down Expand Up @@ -72,7 +75,6 @@ const Wrapper = styled.div<WrapperParams>`
padding: ${spacingsPx.sm} ${({ $spacingX }) => spacingsPx[$spacingX]};
${withFrameProps}
${variables.SCREEN_QUERY.MOBILE} {
align-items: stretch;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Placement, ShiftOptions } from '@floating-ui/react';
import { TooltipBox, TooltipBoxProps } from './TooltipBox';
import { TooltipArrow } from './TooltipArrow';
import { TOOLTIP_DELAY_SHORT, TooltipDelay } from './TooltipDelay';
import { intermediaryTheme } from '../..';
import { intermediaryTheme } from '../../config/colors';

export type Cursor = 'inherit' | 'pointer' | 'help' | 'default' | 'not-allowed';

Expand Down
2 changes: 1 addition & 1 deletion packages/connect-common/src/test/storage.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storage } from '..';
import { storage } from '../storage';

const origin = 'foo.bar';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import suiteReducer, { SuiteState } from 'src/reducers/suite/suiteReducer';
import { configureMockStore } from '@suite-common/test-utils';
import { ThemeProvider } from 'src/support/suite/ThemeProvider';
import { Locale } from 'src/config/suite/languages';
import { NumberInput } from '..';
import { NumberInput } from '../NumberInput';

const onChangeMock = jest.fn();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { desktopReducer } from '..';
import { desktopReducer } from '../index';
import * as SUITE from 'src/actions/suite/constants/suiteConstants';
import type { HandshakeElectron } from '@trezor/suite-desktop-api';

Expand Down
2 changes: 1 addition & 1 deletion packages/suite/src/storage/__tests__/storage.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '@suite-common/test-utils/src/mocks';

import { db } from '..';
import { db } from '../index';

describe('storage', () => {
test('2 calls to uninitiated db', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TrezorDevice } from 'src/types/suite';
import { getFormattedFingerprint, validateFirmware } from '..';
import { getFormattedFingerprint, validateFirmware } from '../index';
import { DeviceModelInternal } from '@trezor/connect';

describe('getFormattedFingerprint', () => {
Expand Down

0 comments on commit 5d1104b

Please sign in to comment.