Skip to content

Commit

Permalink
Bump prettier to 1.19.1 (#3762)
Browse files Browse the repository at this point in the history
* Bump prettier to 1.19.1

* Update package.json

* Update CHANGELOG

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
  • Loading branch information
sulemanof and chandlerprall authored Jul 28, 2020
1 parent a4f1d74 commit 43ccf53
Show file tree
Hide file tree
Showing 135 changed files with 532 additions and 516 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
"postcss-inline-svg": "^3.0.0",
"postcss-loader": "^2.0.8",
"pre-commit": "^1.2.2",
"prettier": "^1.17.0",
"prettier": "^1.19.1",
"prompt": "^1.0.0",
"prop-types": "^15.6.0",
"puppeteer": "^2.0.0",
Expand Down
4 changes: 1 addition & 3 deletions src-docs/src/components/guide_section/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export {
GuideSectionContainer as GuideSection,
} from './guide_section_container';
export { GuideSectionContainer as GuideSection } from './guide_section_container';

export { GuideSectionTypes } from './guide_section_types';
6 changes: 3 additions & 3 deletions src-docs/src/views/accessibility/props.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FunctionComponent } from 'react';
import { EuiScreenReaderOnlyProps } from '../../../../src/components/accessibility/screen_reader';

export const ScreenReaderOnlyDocsComponent: FunctionComponent<
EuiScreenReaderOnlyProps
> = () => <div />;
export const ScreenReaderOnlyDocsComponent: FunctionComponent<EuiScreenReaderOnlyProps> = () => (
<div />
);
9 changes: 3 additions & 6 deletions src-docs/src/views/app_container.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ function mapStateToProps(state, ownProps) {
}

export const AppContainer = withRouter(
connect(
mapStateToProps,
{
toggleLocale,
}
)(AppView)
connect(mapStateToProps, {
toggleLocale,
})(AppView)
);
6 changes: 3 additions & 3 deletions src-docs/src/views/breadcrumbs/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
EuiBreadcrumbResponsiveMaxCount,
} from '../../../../src/components/breadcrumbs';

export const BreadcrumbResponsiveMaxCount: FunctionComponent<
EuiBreadcrumbResponsiveMaxCount
> = () => <div />;
export const BreadcrumbResponsiveMaxCount: FunctionComponent<EuiBreadcrumbResponsiveMaxCount> = () => (
<div />
);

export const BreadcrumbProps: FunctionComponent<EuiBreadcrumb> = () => <div />;
18 changes: 9 additions & 9 deletions src-docs/src/views/color_picker/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import {
EuiColorPalettePickerPaletteGradientProps,
} from '../../../../src/components/color_picker/color_palette_picker';

export const EuiColorPalettePickerPaletteText: FunctionComponent<
EuiColorPalettePickerPaletteTextProps
> = () => <div />;
export const EuiColorPalettePickerPaletteText: FunctionComponent<EuiColorPalettePickerPaletteTextProps> = () => (
<div />
);

export const EuiColorPalettePickerPaletteFixed: FunctionComponent<
EuiColorPalettePickerPaletteFixedProps
> = () => <div />;
export const EuiColorPalettePickerPaletteFixed: FunctionComponent<EuiColorPalettePickerPaletteFixedProps> = () => (
<div />
);

export const EuiColorPalettePickerPaletteGradient: FunctionComponent<
EuiColorPalettePickerPaletteGradientProps
> = () => <div />;
export const EuiColorPalettePickerPaletteGradient: FunctionComponent<EuiColorPalettePickerPaletteGradientProps> = () => (
<div />
);
12 changes: 6 additions & 6 deletions src-docs/src/views/control_bar/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
TextControl,
} from '../../../../src/components/control_bar/control_bar';

export const BreadcrumbControlProps: FunctionComponent<
BreadcrumbControl
> = () => <div />;
export const BreadcrumbControlProps: FunctionComponent<BreadcrumbControl> = () => (
<div />
);

export const ButtonControlProps: FunctionComponent<ButtonControl> = () => (
<div />
Expand All @@ -26,9 +26,9 @@ export const DividerControlProps: FunctionComponent<DividerControl> = () => (
export const IconControlTypeProps: FunctionComponent<IconControlType> = () => (
<div />
);
export const IconButtonControlTypeProps: FunctionComponent<
IconButtonControlType
> = () => <div />;
export const IconButtonControlTypeProps: FunctionComponent<IconButtonControlType> = () => (
<div />
);

export const SpacerControlProps: FunctionComponent<SpacerControl> = () => (
<div />
Expand Down
48 changes: 24 additions & 24 deletions src-docs/src/views/datagrid/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ export const DataGridColumn: FunctionComponent<EuiDataGridColumn> = () => (
<div />
);

export const DataGridPagination: FunctionComponent<
EuiDataGridPaginationProps
> = () => <div />;
export const DataGridPagination: FunctionComponent<EuiDataGridPaginationProps> = () => (
<div />
);

export const DataGridSorting: FunctionComponent<EuiDataGridSorting> = () => (
<div />
Expand All @@ -32,30 +32,30 @@ export const DataGridInMemory: FunctionComponent<EuiDataGridInMemory> = () => (

export const DataGridStyle: FunctionComponent<EuiDataGridStyle> = () => <div />;

export const DataGridToolbarVisibilityOptions: FunctionComponent<
EuiDataGridToolBarVisibilityOptions
> = () => <div />;
export const DataGridToolbarVisibilityOptions: FunctionComponent<EuiDataGridToolBarVisibilityOptions> = () => (
<div />
);

export const DataGridCellValueElement: FunctionComponent<
EuiDataGridCellValueElementProps
> = () => <div />;
export const DataGridCellValueElement: FunctionComponent<EuiDataGridCellValueElementProps> = () => (
<div />
);

export const DataGridSchemaDetector: FunctionComponent<
EuiDataGridSchemaDetector
> = () => <div />;
export const DataGridSchemaDetector: FunctionComponent<EuiDataGridSchemaDetector> = () => (
<div />
);

export const DataGridColumnVisibility: FunctionComponent<
EuiDataGridColumnVisibility
> = () => <div />;
export const DataGridColumnVisibility: FunctionComponent<EuiDataGridColumnVisibility> = () => (
<div />
);

export const DataGridPopoverContent: FunctionComponent<
EuiDataGridPopoverContentProps
> = () => <div />;
export const DataGridPopoverContent: FunctionComponent<EuiDataGridPopoverContentProps> = () => (
<div />
);

export const DataGridControlColumn: FunctionComponent<
EuiDataGridControlColumn
> = () => <div />;
export const DataGridControlColumn: FunctionComponent<EuiDataGridControlColumn> = () => (
<div />
);

export const DataGridToolBarVisibilityColumnSelectorOptions: FunctionComponent<
EuiDataGridToolBarVisibilityColumnSelectorOptions
> = () => <div />;
export const DataGridToolBarVisibilityColumnSelectorOptions: FunctionComponent<EuiDataGridToolBarVisibilityColumnSelectorOptions> = () => (
<div />
);
4 changes: 1 addition & 3 deletions src-docs/src/views/elastic_charts/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,7 @@ export const ChartTypeCard = props => {
return (
<ChartCard
title="Chart types"
description={`${
props.type
} charts can be displayed as any x/y series type.`}>
description={`${props.type} charts can be displayed as any x/y series type.`}>
<EuiRadioGroup
compressed
options={toggleButtonsIcons}
Expand Down
6 changes: 3 additions & 3 deletions src-docs/src/views/header/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import React, { FunctionComponent } from 'react';

import { EuiHeaderSections } from '../../../../src/components/header';

export const EuiHeaderSectionsProp: FunctionComponent<
EuiHeaderSections
> = () => <div />;
export const EuiHeaderSectionsProp: FunctionComponent<EuiHeaderSections> = () => (
<div />
);
6 changes: 3 additions & 3 deletions src-docs/src/views/list_group/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import React, { FunctionComponent } from 'react';

import { EuiPinnableListGroupItemProps } from '../../../../src/components/list_group';

export const EuiPinnableListGroupItem: FunctionComponent<
EuiPinnableListGroupItemProps
> = () => <div />;
export const EuiPinnableListGroupItem: FunctionComponent<EuiPinnableListGroupItemProps> = () => (
<div />
);
4 changes: 1 addition & 3 deletions src-docs/src/views/package/i18n_tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ const columns = [
<EuiLink
target="_blank"
color="subdued"
href={`https://github.com/elastic/eui/blob/master/${filepath}#L${
loc.start.line
}`}>
href={`https://github.com/elastic/eui/blob/master/${filepath}#L${loc.start.line}`}>
{filepath}:{loc.start.line}:{loc.start.column}
</EuiLink>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/range/levels.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ export default () => {
value={dualValue}
onChange={value => onDualChange(value)}
showTicks
ticks={[{ label: '20kb', value: 20 }, { label: '100kb', value: 100 }]}
ticks={[
{ label: '20kb', value: 20 },
{ label: '100kb', value: 100 },
]}
showInput
levels={levels}
aria-label="An example of EuiDualRange with levels prop"
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/range/states.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export default () => {
showLabels
showInput
showTicks
ticks={[{ label: '20kb', value: 20 }, { label: '100kb', value: 100 }]}
ticks={[
{ label: '20kb', value: 20 },
{ label: '100kb', value: 100 },
]}
levels={levels}
aria-label="An example of EuiRange"
/>
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/range/ticks.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ export default () => {
value={dualValue}
onChange={onDualChange}
showTicks
ticks={[{ label: '20kb', value: 20 }, { label: '100kb', value: 100 }]}
ticks={[
{ label: '20kb', value: 20 },
{ label: '100kb', value: 100 },
]}
showInput
aria-label="An example of EuiDualRange with ticks"
/>
Expand Down
4 changes: 1 addition & 3 deletions src-docs/src/views/resize_observer/resize_observer_hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ export const ResizeObserverHookExample = () => {
</p>
)}
<p>
<EuiCode>{`height: ${dimensions.height}; width: ${
dimensions.width
}`}</EuiCode>
<EuiCode>{`height: ${dimensions.height}; width: ${dimensions.width}`}</EuiCode>
</p>
</EuiText>

Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/search_bar/controlled_search_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ const items = times(10, id => {
id,
status: random.oneOf(['open', 'closed']),
type: random.oneOf(types),
tag: random.setOf(tags.map(tag => tag.name), { min: 0, max: 3 }),
tag: random.setOf(
tags.map(tag => tag.name),
{ min: 0, max: 3 }
),
active: random.boolean(),
owner: random.oneOf(users),
followers: random.integer({ min: 0, max: 20 }),
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/search_bar/search_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const items = times(10, id => {
id,
status: random.oneOf(['open', 'closed']),
type: random.oneOf(types),
tag: random.setOf(tags.map(tag => tag.name), { min: 0, max: 3 }),
tag: random.setOf(
tags.map(tag => tag.name),
{ min: 0, max: 3 }
),
active: random.boolean(),
owner: random.oneOf(users),
followers: random.integer({ min: 0, max: 20 }),
Expand Down
5 changes: 4 additions & 1 deletion src-docs/src/views/search_bar/search_bar_filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ const items = times(10, id => {
id,
status: random.oneOf(['open', 'closed']),
type: random.oneOf(types),
tag: random.setOf(tags.map(tag => tag.name), { min: 0, max: 3 }),
tag: random.setOf(
tags.map(tag => tag.name),
{ min: 0, max: 3 }
),
active: random.boolean(),
owner: random.oneOf(users),
followers: random.integer({ min: 0, max: 20 }),
Expand Down
12 changes: 6 additions & 6 deletions src-docs/src/views/selectable/props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {
EuiSelectableOptionsListProps,
} from '../../../../src/components/selectable';

export const EuiSelectableOptionProps: FunctionComponent<
EuiSelectableOption
> = () => <div />;
export const EuiSelectableOptionProps: FunctionComponent<EuiSelectableOption> = () => (
<div />
);

export const EuiSelectableOptionsList: FunctionComponent<
EuiSelectableOptionsListProps
> = () => <div />;
export const EuiSelectableOptionsList: FunctionComponent<EuiSelectableOptionsListProps> = () => (
<div />
);
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ export const Table = () => {

requestTimeoutId = setTimeout(() => {
const items = store.users.filter(user => {
const normalizedName = `${user.firstName} ${
user.lastName
}`.toLowerCase();
const normalizedName = `${user.firstName} ${user.lastName}`.toLowerCase();
const normalizedQuery = query.text.toLowerCase();
return normalizedName.indexOf(normalizedQuery) !== -1;
});
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default () => {
const renderTabs = () => {
return tabs.map((tab, index) => (
<EuiTab
{...tab.href && { href: tab.href, target: '_blank' }}
{...(tab.href && { href: tab.href, target: '_blank' })}
onClick={() => onSelectedTabChanged(tab.id)}
isSelected={tab.id === selectedTabId}
disabled={tab.disabled}
Expand Down
7 changes: 4 additions & 3 deletions src/components/accessibility/screen_reader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ export interface EuiScreenReaderOnlyProps {
showOnFocus?: boolean;
}

export const EuiScreenReaderOnly: FunctionComponent<
EuiScreenReaderOnlyProps
> = ({ children, showOnFocus }) => {
export const EuiScreenReaderOnly: FunctionComponent<EuiScreenReaderOnlyProps> = ({
children,
showOnFocus,
}) => {
const classes = classNames(
{
euiScreenReaderOnly: !showOnFocus,
Expand Down
8 changes: 4 additions & 4 deletions src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ export const EuiBadge: FunctionComponent<EuiBadgeProps> = ({
aria-label={onClickAriaLabel}
ref={ref}
title={innerText}
{...relObj as HTMLAttributes<HTMLElement>}
{...rest as HTMLAttributes<HTMLElement>}>
{...(relObj as HTMLAttributes<HTMLElement>)}
{...(rest as HTMLAttributes<HTMLElement>)}>
{children}
</Element>
)}
Expand Down Expand Up @@ -318,8 +318,8 @@ export const EuiBadge: FunctionComponent<EuiBadgeProps> = ({
style={optionalCustomStyles}
ref={ref as Ref<HTMLButtonElement & HTMLAnchorElement>}
title={innerText}
{...relObj as HTMLAttributes<HTMLElement>}
{...rest as HTMLAttributes<HTMLElement>}>
{...(relObj as HTMLAttributes<HTMLElement>)}
{...(rest as HTMLAttributes<HTMLElement>)}>
<span className="euiBadge__content">
<span className="euiBadge__text">{children}</span>
{optionalIcon}
Expand Down
3 changes: 2 additions & 1 deletion src/components/badge/beta_badge/beta_badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ type LabelAsNode = (
| {
tooltipContent: ReactNode;
title?: string;
}) & {
}
) & {
label: ReactNode;
};

Expand Down
10 changes: 7 additions & 3 deletions src/components/badge/notification_badge/badge_notification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ export interface EuiNotificationBadgeProps
color?: BadgeNotificationColor;
}

export const EuiNotificationBadge: FunctionComponent<
EuiNotificationBadgeProps
> = ({ children, className, size = 's', color = 'accent', ...rest }) => {
export const EuiNotificationBadge: FunctionComponent<EuiNotificationBadgeProps> = ({
children,
className,
size = 's',
color = 'accent',
...rest
}) => {
const classes = classNames(
'euiNotificationBadge',
sizeToClassNameMap[size],
Expand Down
Loading

0 comments on commit 43ccf53

Please sign in to comment.