Skip to content

Commit

Permalink
Upgrade eslint and fix no-duplicate-imports errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jzempel committed Jul 19, 2023
1 parent 981ffed commit 048e55f
Show file tree
Hide file tree
Showing 11 changed files with 219 additions and 169 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"@types/react": "17.0.60",
"@types/react-dom": "17.0.20",
"@types/styled-components": "5.1.26",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"@typescript-eslint/eslint-plugin": "6.1.0",
"@typescript-eslint/parser": "6.1.0",
"@zendeskgarden/css-bedrock": "9.0.0",
"@zendeskgarden/eslint-config": "34.0.0",
"@zendeskgarden/scripts": "1.4.1",
Expand All @@ -77,10 +77,10 @@
"core-js": "3.30.2",
"coveralls": "3.1.1",
"envalid": "7.3.1",
"eslint": "8.42.0",
"eslint": "8.45.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-garden-local": "file:./utils/eslint",
"eslint-plugin-jest": "27.2.1",
"eslint-plugin-jest": "27.2.3",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-notice": "0.9.10",
Expand Down
3 changes: 1 addition & 2 deletions packages/buttons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

export { Button } from './elements/Button';
export type { IIconProps } from './elements/Button';
export { Button, type IIconProps } from './elements/Button';
export { Anchor } from './elements/Anchor';
export { ButtonGroup } from './elements/ButtonGroup';
export { ChevronButton } from './elements/ChevronButton';
Expand Down
35 changes: 17 additions & 18 deletions packages/chrome/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,22 @@ export { SubNavItemText } from './elements/subnav/SubNavItemText';
export { CollapsibleSubNavItem } from './elements/subnav/CollapsibleSubNavItem';
export { Sheet } from './elements/sheet/Sheet';

export { PRODUCT as PRODUCTS } from './types';

export type {
IChromeProps,
ISkipNavProps,
IBodyProps,
IHeaderProps,
IHeaderItemProps,
IHeaderItemTextProps,
IHeaderItemWrapperProps,
INavProps,
INavItemProps,
INavItemTextProps,
ISubNavItemProps,
ICollapsibleSubNavItemProps,
ISheetProps,
ISheetFooterProps,
export {
PRODUCT as PRODUCTS,
type IChromeProps,
type ISkipNavProps,
type IBodyProps,
type IHeaderProps,
type IHeaderItemProps,
type IHeaderItemTextProps,
type IHeaderItemWrapperProps,
type INavProps,
type INavItemProps,
type INavItemTextProps,
type ISubNavItemProps,
type ICollapsibleSubNavItemProps,
type ISheetProps,
type ISheetFooterProps,
/** @deprecated can be accessed via IHeaderItemProps['product'] */
Product as PRODUCT
type Product as PRODUCT
} from './types';
1 change: 1 addition & 0 deletions packages/forms/demo/stories/FieldStory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Story } from '@storybook/react';
import { Field } from '@zendeskgarden/react-forms';
import { ICommonArgs, renderHint, renderLabel, renderMessage } from './common';

/* eslint-disable-next-line no-duplicate-imports */
export type { ICommonArgs as IFieldArgs } from './common';

interface IArgs extends HTMLAttributes<HTMLDivElement>, ICommonArgs {}
Expand Down
51 changes: 24 additions & 27 deletions packages/forms/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
*/

/** Common */
export { Field } from './elements/common/Field';
export type { IFieldProps } from './elements/common/Field';
export { Field, type IFieldProps } from './elements/common/Field';
export { Fieldset } from './elements/common/Fieldset';
export { Hint } from './elements/common/Hint';
export { Label } from './elements/common/Label';
Expand Down Expand Up @@ -37,32 +36,30 @@ export { FileList } from './elements/file-list/FileList';
export { File } from './elements/file-list/components/File';

/** Other */
export { FauxInput } from './elements/faux-input/FauxInput';
export type { IIconProps } from './elements/faux-input/FauxInput';
export { FauxInput, type IIconProps } from './elements/faux-input/FauxInput';
export { MediaInput } from './elements/MediaInput';

/** types */
export { VALIDATION } from './types';

export type {
IFieldsetProps,
ILabelProps,
IMessageProps,
ICheckboxProps,
IRadioProps,
IToggleProps,
IInputProps,
ITextareaProps,
ISelectProps,
IFileUploadProps,
IFileProps,
IRangeProps,
IMultiThumbRangeProps,
IInputGroupProps,
ITilesProps,
ITilesTileProps,
IFauxInputProps,
IFauxInputIconProps as IFauxInputStartIconProps,
IFauxInputIconProps as IFauxInputEndIconProps,
IMediaInputProps
export {
VALIDATION,
type IFieldsetProps,
type ILabelProps,
type IMessageProps,
type ICheckboxProps,
type IRadioProps,
type IToggleProps,
type IInputProps,
type ITextareaProps,
type ISelectProps,
type IFileUploadProps,
type IFileProps,
type IRangeProps,
type IMultiThumbRangeProps,
type IInputGroupProps,
type ITilesProps,
type ITilesTileProps,
type IFauxInputProps,
type IFauxInputIconProps as IFauxInputStartIconProps,
type IFauxInputIconProps as IFauxInputEndIconProps,
type IMediaInputProps
} from './types';
35 changes: 16 additions & 19 deletions packages/grid/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,21 @@ export {
JUSTIFY_CONTENT as ARRAY_JUSTIFY_CONTENT,
TEXT_ALIGN as ARRAY_TEXT_ALIGN,
SPACE as ARRAY_SPACE,
WRAP as ARRAY_WRAP
} from './types';

export type {
IPaneProviderProps,
ISplitterProps,
ISplitterButtonProps,
IColProps,
IGridProps,
IRowProps,
WRAP as ARRAY_WRAP,
type IPaneProviderProps,
type ISplitterProps,
type ISplitterButtonProps,
type IColProps,
type IGridProps,
type IRowProps,
/* @deprecated these types can be dereferenced on the exported interfaces */
AlignItems as ALIGN_ITEMS,
AlignSelf as ALIGN_SELF,
Direction as DIRECTION,
JustifyContent as JUSTIFY_CONTENT,
TextAlign as TEXT_ALIGN,
GridNumber as GRID_NUMBER,
Breakpoint as BREAKPOINT,
Space as SPACE,
Wrap as WRAP
type AlignItems as ALIGN_ITEMS,
type AlignSelf as ALIGN_SELF,
type Direction as DIRECTION,
type JustifyContent as JUSTIFY_CONTENT,
type TextAlign as TEXT_ALIGN,
type GridNumber as GRID_NUMBER,
type Breakpoint as BREAKPOINT,
type Space as SPACE,
type Wrap as WRAP
} from './types';
13 changes: 6 additions & 7 deletions packages/modals/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ export { TooltipModal } from './elements/TooltipModal/TooltipModal';

export { DrawerModal } from './elements/DrawerModal/DrawerModal';

export { PLACEMENT } from './types';

export type {
IModalProps,
IDrawerModalProps,
ITooltipModalProps,
export {
PLACEMENT,
type IModalProps,
type IDrawerModalProps,
type ITooltipModalProps,
/* @deprecated type can be dereferenced from the exported interfaces */
Placement as GARDEN_PLACEMENT
type Placement as GARDEN_PLACEMENT
} from './types';
15 changes: 7 additions & 8 deletions packages/notifications/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ export { Close } from './elements/content/Close';
export { Paragraph } from './elements/content/Paragraph';
export { Title } from './elements/content/Title';
export { ToastProvider } from './elements/toaster/ToastProvider';
export { useToast } from './elements/toaster/useToast';
export {
useToast,
type IToastOptions,
type IToast,
/** @deprecated can be dereferenced via IToast['content'] */
type Content as ToastContent
} from './elements/toaster/useToast';
export { GlobalAlert } from './elements/global-alert/GlobalAlert';

export type {
Expand All @@ -27,10 +33,3 @@ export type {
/** @deprecated can be dereferenced via IToastOptions['placement'] */
Placement as ToastPlacement
} from './types';

export type {
IToastOptions,
IToast,
/** @deprecated can be dereferenced via IToast['content'] */
Content as ToastContent
} from './elements/toaster/useToast';
3 changes: 1 addition & 2 deletions packages/pagination/src/styled/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export { StyledPagination } from './Pagination/StyledPagination';
export { StyledPage } from './Pagination/StyledPage';
export { StyledCursorPagination } from './CursorPagination/StyledCursorPagination';
export { StyledCursor } from './CursorPagination/StyledCursor';
export { StyledIcon } from './CursorPagination/StyledIcon';
export type { IStyledIcon } from './CursorPagination/StyledIcon';
export { StyledIcon, type IStyledIcon } from './CursorPagination/StyledIcon';
export { StyledGap } from './Pagination/StyledGap';
export { StyledNavigation } from './Pagination/StyledNavigation';
13 changes: 5 additions & 8 deletions packages/theming/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ export { focusStyles, SELECTOR_FOCUS_VISIBLE } from './utils/focusStyles';

export {
ARROW_POSITION as ARRAY_ARROW_POSITION,
MENU_POSITION as ARRAY_MENU_POSITION
} from './types';

export type {
IGardenTheme,
IThemeProviderProps,
ArrowPosition as ARROW_POSITION,
MenuPosition as MENU_POSITION
MENU_POSITION as ARRAY_MENU_POSITION,
type IGardenTheme,
type IThemeProviderProps,
type ArrowPosition as ARROW_POSITION,
type MenuPosition as MENU_POSITION
} from './types';
Loading

0 comments on commit 048e55f

Please sign in to comment.