Skip to content

Commit d73cb41

Browse files
committed
fix more autofixable errors
1 parent ac942e1 commit d73cb41

File tree

34 files changed

+348
-347
lines changed

34 files changed

+348
-347
lines changed

packages/patternfly-3/patternfly-react/src/components/DateTimePicker/TimeComponents/PickTimeTable.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ class PickTimeTable extends React.Component {
88
const { time, setSelected, toggleTimeTable } = this.props;
99
const hours = time.getHours();
1010
newTime = parseInt(newTime, 10);
11-
if (type === MINUTE) { time.setMinutes(newTime); }
12-
else if (type === HOUR) {
11+
if (type === MINUTE) {
12+
time.setMinutes(newTime);
13+
} else if (type === HOUR) {
1314
time.setHours(hours < 12 ? newTime % 12 : (newTime % 12) + 12);
1415
}
1516
setSelected(time);

packages/patternfly-3/patternfly-react/src/components/DateTimePicker/TimePicker.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ class TimePicker extends React.Component {
1212

1313
setSelected = time => {
1414
const newTime = getDateFromTime(time);
15-
if (newTime) { this.setState({ value: newTime, tmpValue: formatTime(newTime, this.props.locale) }); }
16-
else { this.setState({ tmpValue: formatTime(newTime, this.props.locale) }); }
15+
if (newTime) {
16+
this.setState({ value: newTime, tmpValue: formatTime(newTime, this.props.locale) });
17+
} else {
18+
this.setState({ tmpValue: formatTime(newTime, this.props.locale) });
19+
}
1720
}
1821
render() {
1922
const { value } = this.state;

packages/patternfly-3/patternfly-react/src/components/Form/Stories/FormExample.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ export class FormExample extends React.Component {
1515

1616
getValidationState() {
1717
const { length } = this.state.value;
18-
if (length > 10) { return 'success'; }
19-
else if (length > 5) { return 'warning'; }
20-
else if (length > 0) { return 'error'; }
18+
if (length > 10) {
19+
return 'success';
20+
} else if (length > 5) {
21+
return 'warning';
22+
} else if (length > 0) {
23+
return 'error';
24+
}
2125
return null;
2226
}
2327

packages/patternfly-3/patternfly-react/src/components/Notification/Wrappers/StatefulNotificationDrawerWrapper.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ class StatefulNotificationDrawerWrapper extends React.Component {
7474
}
7575

7676
togglePanel = key => {
77-
if (this.state.expandedPanel === key) { this.setState({ expandedPanel: '-1' }); }
78-
else { this.setState({ expandedPanel: key }); }
77+
if (this.state.expandedPanel === key) {
78+
this.setState({ expandedPanel: '-1' });
79+
} else {
80+
this.setState({ expandedPanel: key });
81+
}
7982
}
8083

8184
toggleDrawerExpand = () => {

packages/patternfly-3/patternfly-react/src/components/Notification/Wrappers/StatefulToggleNotificationDrawerWrapper.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ class StatefulToggleNotificationDrawerWrapper extends React.Component {
2121
}
2222

2323
updateUnreadCount = bool => {
24-
if (bool) { this.setState({ hasUnreadMessages: true }); }
25-
else { this.setState({ hasUnreadMessages: false }); }
24+
if (bool) {
25+
this.setState({ hasUnreadMessages: true });
26+
} else {
27+
this.setState({ hasUnreadMessages: false });
28+
}
2629
}
2730

2831
render() {

packages/patternfly-4/react-charts/src/components/ChartUtils/chart-domain.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ interface SourcesInterface {
1919
}[];
2020
}
2121

22-
export interface ChartDomain {x: [number, number], y: [number, number]}
22+
export interface ChartDomain {x: [number, number]; y: [number, number]; }
2323

2424
// Returns the min and max domain for given data
2525
export const getDomain = ({

packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ export interface ApplicationLauncherProps extends React.HTMLProps<HTMLDivElement
3838

3939
export class ApplicationLauncher extends React.Component<ApplicationLauncherProps> {
4040
static defaultProps = {
41-
"className": '',
42-
"isDisabled": false,
43-
"direction": DropdownDirection.down,
44-
"dropdownItems": [] as React.ReactNode[],
45-
"items": [] as React.ReactNode[],
46-
"isOpen": false,
47-
"position": DropdownPosition.left,
48-
"onSelect": (_event: any): any => undefined,
49-
"onToggle": (_value: boolean): any => undefined,
41+
'className': '',
42+
'isDisabled': false,
43+
'direction': DropdownDirection.down,
44+
'dropdownItems': [] as React.ReactNode[],
45+
'items': [] as React.ReactNode[],
46+
'isOpen': false,
47+
'position': DropdownPosition.left,
48+
'onSelect': (_event: any): any => undefined,
49+
'onToggle': (_value: boolean): any => undefined,
5050
'aria-label': 'Application launcher',
51-
"isGrouped": false,
52-
"toggleIcon": <ThIcon />
51+
'isGrouped': false,
52+
'toggleIcon': <ThIcon />
5353
};
5454
render() {
5555
const {

packages/patternfly-4/react-core/src/components/Card/Card.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export const Card: React.FunctionComponent<CardProps> = ({
2525
}: CardProps) => {
2626
const Component = component as any;
2727
return (
28-
<Component className={css(styles.card, isHoverable && styles.modifiers.hoverable, isCompact && styles.modifiers.compact, className)} {...props}>
29-
{children}
30-
</Component>
31-
);};
28+
<Component className={css(styles.card, isHoverable && styles.modifiers.hoverable, isCompact && styles.modifiers.compact, className)} {...props}>
29+
{children}
30+
</Component>
31+
);
32+
};

packages/patternfly-4/react-core/src/components/Card/CardFooter.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export const CardFooter: React.FunctionComponent<CardFooterProps> = ({
1919
}: CardFooterProps) => {
2020
const Component = component as any;
2121
return (
22-
<Component className={css(styles.cardFooter, className)} {...props}>
23-
{children}
24-
</Component>
25-
);};
22+
<Component className={css(styles.cardFooter, className)} {...props}>
23+
{children}
24+
</Component>
25+
);
26+
};

packages/patternfly-4/react-core/src/components/ClipboardCopy/ClipboardCopyButton.test.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { shallow } from 'enzyme';
33
import { ClipboardCopyButton } from './ClipboardCopyButton';
44

55
const props = {
6-
"id": 'my-id',
7-
"textId": 'my-text-id',
8-
"className": 'fancy-copy-button',
9-
"onClick": jest.fn(),
10-
"exitDelay": 1000,
11-
"entryDelay": 2000,
12-
"maxWidth": '500px',
13-
"position": 'right' as 'right',
6+
'id': 'my-id',
7+
'textId': 'my-text-id',
8+
'className': 'fancy-copy-button',
9+
'onClick': jest.fn(),
10+
'exitDelay': 1000,
11+
'entryDelay': 2000,
12+
'maxWidth': '500px',
13+
'position': 'right' as 'right',
1414
'aria-label': 'click this button to copy text'
1515
};
1616

0 commit comments

Comments
 (0)