Skip to content

Commit

Permalink
Autofix typescript-eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
noahtallen committed Jul 14, 2023
1 parent 28984ca commit ca34e2a
Show file tree
Hide file tree
Showing 91 changed files with 191 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { __ } from '@wordpress/i18n';
import Button from '../../button';
import Tooltip from '../../tooltip';
import { View } from '../../view';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderBoxControlLinkedButton } from './hook';

import type { LinkedButtonProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element';
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils/hooks/use-cx';

import type { LinkedButtonProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { useMergeRefs } from '@wordpress/compose';
import BorderBoxControlVisualizer from '../border-box-control-visualizer';
import { BorderControl } from '../../border-control';
import { Grid } from '../../grid';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderBoxControlSplitControls } from './hook';

import type { BorderControlProps } from '../../border-control/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element';
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils/';

import type { SplitControlsProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { __ } from '@wordpress/i18n';
* Internal dependencies
*/
import { View } from '../../view';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderBoxControlVisualizer } from './hook';

import type { VisualizerProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element';
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils';

import type { VisualizerProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import { BorderControl } from '../../border-control';
import { StyledLabel } from '../../base-control/styles/base-control-styles';
import { View } from '../../view';
import { VisuallyHidden } from '../../visually-hidden';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderBoxControl } from './hook';

import type { BorderBoxControlProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {
isCompleteBorder,
isEmptyBorder,
} from '../utils';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils/hooks/use-cx';

import type { Border } from '../../border-control/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import ColorPalette from '../../color-palette';
import Dropdown from '../../dropdown';
import { HStack } from '../../h-stack';
import { VStack } from '../../v-stack';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderControlDropdown } from './hook';
import { StyledLabel } from '../../base-control/styles/base-control-styles';
import DropdownContentWrapper from '../../dropdown/dropdown-content-wrapper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { useMemo } from '@wordpress/element';
*/
import * as styles from '../styles';
import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils/hooks/use-cx';

import type { DropdownProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { StyledLabel } from '../../base-control/styles/base-control-styles';
import { View } from '../../view';
import { Flex } from '../../flex';
import { VisuallyHidden } from '../../visually-hidden';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderControlStylePicker } from './hook';

import type { LabelProps, StylePickerProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element';
* Internal dependencies
*/
import * as styles from '../styles';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils/hooks/use-cx';

import type { StylePickerProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { HStack } from '../../h-stack';
import { StyledLabel } from '../../base-control/styles/base-control-styles';
import { View } from '../../view';
import { VisuallyHidden } from '../../visually-hidden';
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { useBorderControl } from './hook';

import type { BorderControlProps, LabelProps } from '../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { useCallback, useMemo, useState } from '@wordpress/element';
*/
import * as styles from '../styles';
import { parseQuantityAndUnitFromRawValue } from '../../unit-control/utils';
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useCx } from '../../utils/hooks/use-cx';

import type { Border, BorderControlProps } from '../types';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-body/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { Scrollable } from '../../scrollable';
import { View } from '../../view';
import { useCardBody } from './hook';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-body/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import * as styles from '../styles';
import { useCx } from '../../utils/hooks/use-cx';
import type { BodyProps } from '../types';
Expand Down
6 changes: 4 additions & 2 deletions packages/components/src/card/card-divider/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import { Divider, DividerProps } from '../../divider';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import type { DividerProps } from '../../divider';
import { Divider } from '../../divider';
import { useCardDivider } from './hook';

function UnconnectedCardDivider(
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-divider/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import * as styles from '../styles';
import { useCx } from '../../utils/hooks/use-cx';
import type { DividerProps } from '../../divider';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-footer/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { Flex } from '../../flex';
import { useCardFooter } from './hook';
import type { FooterProps } from '../types';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-footer/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import * as styles from '../styles';
import { useCx } from '../../utils/hooks/use-cx';
import type { FooterProps } from '../types';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-header/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { Flex } from '../../flex';
import { useCardHeader } from './hook';
import type { HeaderProps } from '../types';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-header/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import * as styles from '../styles';
import { useCx } from '../../utils/hooks/use-cx';
import type { HeaderProps } from '../types';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-media/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { View } from '../../view';
import { useCardMedia } from './hook';
import type { MediaProps } from '../types';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card-media/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import * as styles from '../styles';
import { useCx } from '../../utils/hooks/use-cx';
import type { MediaProps } from '../types';
Expand Down
7 changes: 2 additions & 5 deletions packages/components/src/card/card/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import {
contextConnect,
ContextSystemProvider,
WordPressComponentProps,
} from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect, ContextSystemProvider } from '../../ui/context';
import { Elevation } from '../../elevation';
import { View } from '../../view';
import * as styles from '../styles';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/card/card/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useSurface } from '../../surface';
import * as styles from '../styles';
import { useCx } from '../../utils/hooks/use-cx';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/color-picker/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* External dependencies
*/
import type { ForwardedRef } from 'react';
import { colord, extend, Colord } from 'colord';
import type { Colord } from 'colord';
import { colord, extend } from 'colord';
import namesPlugin from 'colord/plugins/names';

/**
Expand Down
7 changes: 2 additions & 5 deletions packages/components/src/confirm-dialog/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ import { useCallback, useEffect, useRef, useState } from '@wordpress/element';
*/
import Modal from '../modal';
import type { OwnProps, DialogInputEvent } from './types';
import {
useContextSystem,
contextConnect,
WordPressComponentProps,
} from '../ui/context';
import type { WordPressComponentProps } from '../ui/context';
import { useContextSystem, contextConnect } from '../ui/context';
import { Flex } from '../flex';
import Button from '../button';
import { Text } from '../text';
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/date-time/time/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import { HStack } from '../../h-stack';
import { Spacer } from '../../spacer';
import type { InputChangeCallback } from '../../input-control/types';
import type { InputState } from '../../input-control/reducer/state';
import type { InputAction } from '../../input-control/reducer/actions';
import {
COMMIT,
InputAction,
PRESS_DOWN,
PRESS_UP,
} from '../../input-control/reducer/actions';
Expand Down
7 changes: 2 additions & 5 deletions packages/components/src/divider/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import {
contextConnect,
useContextSystem,
WordPressComponentProps,
} from '../ui/context';
import type { WordPressComponentProps } from '../ui/context';
import { contextConnect, useContextSystem } from '../ui/context';
import { DividerView } from './styles';
import type { DividerProps } from './types';

Expand Down
7 changes: 2 additions & 5 deletions packages/components/src/dropdown/dropdown-content-wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import {
WordPressComponentProps,
contextConnect,
useContextSystem,
} from '../ui/context';
import type { WordPressComponentProps } from '../ui/context';
import { contextConnect, useContextSystem } from '../ui/context';
import { DropdownContentWrapperDiv } from './styles';
import type { DropdownContentWrapperProps } from './types';

Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/elevation/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../ui/context';
import type { WordPressComponentProps } from '../ui/context';
import { contextConnect } from '../ui/context';
import { View } from '../view';
import { useElevation } from './hook';
import type { ElevationProps } from './types';
Expand Down
6 changes: 4 additions & 2 deletions packages/components/src/elevation/hook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* External dependencies
*/
import { css, SerializedStyles } from '@emotion/react';
import type { SerializedStyles } from '@emotion/react';
import { css } from '@emotion/react';

/**
* WordPress dependencies
Expand All @@ -11,7 +12,8 @@ import { useMemo } from '@wordpress/element';
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../ui/context';
import type { WordPressComponentProps } from '../ui/context';
import { useContextSystem } from '../ui/context';
import * as styles from './styles';
import { CONFIG, reduceMotion } from '../utils';
import { useCx } from '../utils/hooks/use-cx';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/flex/flex-block/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { View } from '../../view';
import type { FlexBlockProps } from '../types';
import { useFlexBlock } from './hook';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/flex/flex-block/hook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Internal dependencies
*/
import { useContextSystem, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { useContextSystem } from '../../ui/context';
import { useFlexItem } from '../flex-item';
import type { FlexBlockProps } from '../types';

Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/flex/flex-item/component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import type { ForwardedRef } from 'react';
/**
* Internal dependencies
*/
import { contextConnect, WordPressComponentProps } from '../../ui/context';
import type { WordPressComponentProps } from '../../ui/context';
import { contextConnect } from '../../ui/context';
import { View } from '../../view';
import { useFlexItem } from './hook';
import type { FlexItemProps } from '../types';
Expand Down
Loading

0 comments on commit ca34e2a

Please sign in to comment.