diff --git a/packages/patternfly-3/patternfly-react/src/components/Table/TableConfirmButtonsRow.js b/packages/patternfly-3/patternfly-react/src/components/Table/TableConfirmButtonsRow.js
index fe1f008abd6..590bde30cc7 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Table/TableConfirmButtonsRow.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Table/TableConfirmButtonsRow.js
@@ -34,16 +34,16 @@ class TableConfirmButtonsRow extends React.Component {
rowDimensions: this.element.getBoundingClientRect()
});
}
- };
+ }
handleScroll = event => {
this.saveRowDimensions();
- };
+ }
handleResize = event => {
this.fetchClientDimensions();
this.saveRowDimensions();
- };
+ }
fetchClientDimensions() {
this.setState({
diff --git a/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockClientPaginationTable.js b/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockClientPaginationTable.js
index ad836bea4ab..f617b3fc87d 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockClientPaginationTable.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockClientPaginationTable.js
@@ -251,34 +251,34 @@ export class MockClientPaginationTable extends React.Component {
}
onFirstPage = () => {
this.setPage(1);
- };
+ }
onLastPage = () => {
const { page } = this.state.pagination;
const totalPages = this.totalPages();
if (page < totalPages) {
this.setPage(totalPages);
}
- };
+ }
onNextPage = () => {
const { page } = this.state.pagination;
if (page < this.totalPages()) {
this.setPage(this.state.pagination.page + 1);
}
- };
+ }
onPageInput = e => {
this.setState({ pageChangeValue: e.target.value });
- };
+ }
onPerPageSelect = (eventKey, e) => {
const newPaginationState = Object.assign({}, this.state.pagination);
newPaginationState.perPage = eventKey;
newPaginationState.page = 1;
this.setState({ pagination: newPaginationState });
- };
+ }
onPreviousPage = () => {
if (this.state.pagination.page > 1) {
this.setPage(this.state.pagination.page - 1);
}
- };
+ }
onRow = (row, { rowIndex }) => {
const { selectedRows } = this.state;
const selected = selectedRows.indexOf(row.id) > -1;
@@ -286,7 +286,7 @@ export class MockClientPaginationTable extends React.Component {
className: classNames({ selected }),
role: 'row'
};
- };
+ }
onSelectAllRows = event => {
const { onRowsLogger } = this.props;
const { rows, selectedRows } = this.state;
@@ -316,7 +316,7 @@ export class MockClientPaginationTable extends React.Component {
});
onRowsLogger(updatedRows.filter(r => r.selected));
}
- };
+ }
onSelectRow = (event, row) => {
const { onRowsLogger } = this.props;
const { rows, selectedRows } = this.state;
@@ -339,10 +339,10 @@ export class MockClientPaginationTable extends React.Component {
});
onRowsLogger(rows.filter(r => r.selected));
}
- };
+ }
onSubmit = () => {
this.setPage(this.state.pageChangeValue);
- };
+ }
setPage = value => {
const page = Number(value);
if (!Number.isNaN(value) && value !== '' && page > 0 && page <= this.totalPages()) {
@@ -350,7 +350,7 @@ export class MockClientPaginationTable extends React.Component {
newPaginationState.page = page;
this.setState({ pagination: newPaginationState, pageChangeValue: page });
}
- };
+ }
currentRows() {
const { rows, sortingColumns, columns, pagination } = this.state;
return compose(
@@ -366,7 +366,7 @@ export class MockClientPaginationTable extends React.Component {
totalPages = () => {
const { perPage } = this.state.pagination;
return Math.ceil(mockRows.length / perPage);
- };
+ }
render() {
const { columns, pagination, sortingColumns, pageChangeValue } = this.state;
const sortedPaginatedRows = this.currentRows();
diff --git a/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockServerPaginationTable.js b/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockServerPaginationTable.js
index 8a75a0af592..7189dd5ea8a 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockServerPaginationTable.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Table/__mocks__/mockServerPaginationTable.js
@@ -211,14 +211,14 @@ export class MockServerPaginationTable extends React.Component {
const newPaginationState = Object.assign({}, this.state.pagination);
newPaginationState.page = page;
this.getPage(this.state.sortingColumns, newPaginationState);
- };
+ }
onPerPageSelect = (eventKey, e) => {
const newPaginationState = Object.assign({}, this.state.pagination);
newPaginationState.perPage = eventKey;
newPaginationState.page = 1;
this.getPage(this.state.sortingColumns, newPaginationState);
- };
+ }
onSelectAllRows = event => {
const { sortingColumns, pagination, rows } = this.state;
@@ -227,7 +227,7 @@ export class MockServerPaginationTable extends React.Component {
// refresh rows after all rows selected
this.getPage(sortingColumns, pagination);
});
- };
+ }
onSelectRow = (event, row) => {
const { sortingColumns, pagination } = this.state;
@@ -235,7 +235,7 @@ export class MockServerPaginationTable extends React.Component {
// refresh rows after row is selected
this.getPage(sortingColumns, pagination);
});
- };
+ }
onSort = (e, column, sortDirection) => {
// Clearing existing sortingColumns does simple single column sort. To do multisort,
// set each column based on existing sorts specified and set sort position.
@@ -249,7 +249,7 @@ export class MockServerPaginationTable extends React.Component {
alert(`Server API called with: sort by ${column.property} ${updatedSortingColumns[column.property].direction}`);
this.getPage(updatedSortingColumns, this.state.pagination);
- };
+ }
getPage(sortingColumns, pagination) {
const { onServerPageLogger } = this.props;
@@ -343,7 +343,7 @@ export class MockServerPaginationTable extends React.Component {
role: 'row'
};
}
-
+
constructor(props) {
super(props);
diff --git a/packages/patternfly-3/patternfly-react/src/components/ToastNotification/TimedToastNotification.js b/packages/patternfly-3/patternfly-react/src/components/ToastNotification/TimedToastNotification.js
index c6fce04bd4d..d664e68238b 100644
--- a/packages/patternfly-3/patternfly-react/src/components/ToastNotification/TimedToastNotification.js
+++ b/packages/patternfly-3/patternfly-react/src/components/ToastNotification/TimedToastNotification.js
@@ -43,12 +43,12 @@ class TimedToastNotification extends React.Component {
onMouseEnter = () => {
const { onMouseEnter } = this.props;
onMouseEnter && onMouseEnter();
- };
+ }
onMouseLeave = () => {
const { onMouseLeave } = this.props;
onMouseLeave && onMouseLeave();
- };
+ }
render() {
const { children, className, type, onDismiss } = this.props;
const { onMouseEnter, onMouseLeave } = this;
diff --git a/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotification.stories.js b/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotification.stories.js
index d4eda44f90c..818c17254d8 100644
--- a/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotification.stories.js
+++ b/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotification.stories.js
@@ -19,7 +19,7 @@ stories.addDecorator(withKnobs);
stories.add(
'Toast Notification',
- withInfo(`Toast Notifications pop onto the screen to notify the user of a system occurrence`)(() => {
+ withInfo('Toast Notifications pop onto the screen to notify the user of a system occurrence')(() => {
const header = text('Header', 'Great job!');
const message = text('Message', 'This is really working out.');
const type = select('Type', ToastNotification.TOAST_NOTIFICATION_TYPES, 'success');
@@ -70,13 +70,13 @@ class ToastNotificationStoryWrapper extends React.Component {
type: 'info',
persistent: false,
timerdelay: 8000,
- message: `By default, a toast notification's timer expires after eight seconds.`
+ message: 'By default, a toast notification\'s timer expires after eight seconds.'
},
{
key: 2,
type: 'warning',
persistent: false,
- message: `Additionally, if the user hovers any toast notification each timer is reset.`
+ message: 'Additionally, if the user hovers any toast notification each timer is reset.'
}
];
@@ -150,7 +150,7 @@ class ToastNotificationStoryWrapper extends React.Component {
stories.add(
'Toast Notification List',
- withInfo(`This is the Toast Notification List with a custom timer delay supplied.`)(() => {
+ withInfo('This is the Toast Notification List with a custom timer delay supplied.')(() => {
const story =
;
return inlineTemplate({
title: 'Toast Notification List',
diff --git a/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotificationList.js b/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotificationList.js
index fe5bbadf510..d9a615781d5 100644
--- a/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotificationList.js
+++ b/packages/patternfly-3/patternfly-react/src/components/ToastNotification/ToastNotificationList.js
@@ -18,19 +18,19 @@ class ToastNotificationList extends React.Component {
this.setState({ paused: true });
const { onMouseEnter } = this.props;
onMouseEnter();
- };
+ }
onMouseLeave = () => {
this.setState({ paused: false });
const { onMouseLeave } = this.props;
onMouseLeave();
- };
+ }
onMouseOver = () => {
this.setState({ paused: true });
const { onMouseOver } = this.props;
onMouseOver();
- };
+ }
renderChildren() {
const { paused } = this.state;
diff --git a/packages/patternfly-3/patternfly-react/src/components/Toolbar/ToolbarFind.js b/packages/patternfly-3/patternfly-react/src/components/Toolbar/ToolbarFind.js
index 72f9e606cf5..7a81ea1b44e 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Toolbar/ToolbarFind.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Toolbar/ToolbarFind.js
@@ -19,7 +19,7 @@ class ToolbarFind extends React.Component {
if (keyEvent.key === 'Enter' && onEnter) {
onEnter(currentValue);
}
- };
+ }
handleFindNext = () => {
const { currentValue } = this.state;
@@ -28,7 +28,7 @@ class ToolbarFind extends React.Component {
if (onFindNext) {
onFindNext(currentValue);
}
- };
+ }
handleFindPrevious = () => {
const { currentValue } = this.state;
@@ -37,7 +37,7 @@ class ToolbarFind extends React.Component {
if (onFindPrevious) {
onFindPrevious(currentValue);
}
- };
+ }
handleValueChange = event => {
const { onChange } = this.props;
@@ -47,15 +47,15 @@ class ToolbarFind extends React.Component {
if (onChange) {
onChange(event.target.value);
}
- };
+ }
hideDropdown = () => {
this.setState({ dropdownShown: false });
- };
+ }
toggleDropdownShown = () => {
this.setState(prevState => ({ dropdownShown: !prevState.dropdownShown }));
- };
+ }
renderCounts() {
const { currentValue } = this.state;
diff --git a/packages/patternfly-3/patternfly-react/src/components/Toolbar/__mocks__/mockToolbarExample.js b/packages/patternfly-3/patternfly-react/src/components/Toolbar/__mocks__/mockToolbarExample.js
index 8fb4f02a42f..0e5585ad349 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Toolbar/__mocks__/mockToolbarExample.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Toolbar/__mocks__/mockToolbarExample.js
@@ -26,7 +26,7 @@ export class MockToolbarExample extends React.Component {
keyEvent.stopPropagation();
keyEvent.preventDefault();
}
- };
+ }
setViewType(viewType) {
const { onViewChanged } = this.props;
@@ -47,13 +47,13 @@ export class MockToolbarExample extends React.Component {
this.filterAdded(currentFilterType, filterValue);
}
}
- };
+ }
clearFilters = () => {
const { onFiltersChanged } = this.props;
this.setState({ activeFilters: [] });
onFiltersChanged && onFiltersChanged('Filters cleared.');
- };
+ }
filterAdded = (field, value) => {
const { onFiltersChanged } = this.props;
@@ -77,14 +77,14 @@ export class MockToolbarExample extends React.Component {
const activeFilters = [...this.state.activeFilters, { label: filterText }];
this.setState({ activeFilters });
onFiltersChanged && onFiltersChanged(`Filter Added: ${filterText}`);
- };
+ }
filterCategorySelected = category => {
const { filterCategory } = this.state;
if (filterCategory !== category) {
this.setState({ filterCategory: category });
}
- };
+ }
filterValueSelected = filterValue => {
const { currentFilterType, currentValue } = this.state;
@@ -95,7 +95,7 @@ export class MockToolbarExample extends React.Component {
this.filterAdded(currentFilterType, filterValue);
}
}
- };
+ }
removeFilter = filter => {
const { onFiltersChanged } = this.props;
@@ -107,7 +107,7 @@ export class MockToolbarExample extends React.Component {
this.setState({ activeFilters: updated });
}
onFiltersChanged && onFiltersChanged(`Filter Removed: ${filter.label}`);
- };
+ }
selectFilterType = filterType => {
const { currentFilterType } = this.state;
@@ -118,7 +118,7 @@ export class MockToolbarExample extends React.Component {
this.setState({ filterCategory: undefined });
}
}
- };
+ }
toggleCurrentSortDirection = () => {
const { isSortAscending } = this.state;
@@ -126,7 +126,7 @@ export class MockToolbarExample extends React.Component {
this.setState({ isSortAscending: !isSortAscending });
onSortChanged && onSortChanged(`sort ascending: ${!isSortAscending}`);
- };
+ }
updateCurrentSortType = sortType => {
const { currentSortType } = this.state;
@@ -140,11 +140,11 @@ export class MockToolbarExample extends React.Component {
});
}
onSortChanged && onSortChanged(`sort type: ${sortType.title}`);
- };
+ }
updateCurrentValue = event => {
this.setState({ currentValue: event.target.value });
- };
+ }
renderInput() {
const { currentFilterType, currentValue, filterCategory } = this.state;
diff --git a/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeView.js b/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeView.js
index 0abb5006c21..74b50133226 100644
--- a/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeView.js
+++ b/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeView.js
@@ -16,7 +16,7 @@ class TreeView extends React.Component {
onFocus = node => {
this.setState(() => ({ focusedNodeId: node.dataset.id }));
- };
+ }
onKeyDown = event => {
const nodes = this.getVisibleNodes([...this.treeRef.current.getElementsByTagName('li')]);
@@ -33,7 +33,7 @@ class TreeView extends React.Component {
const [lastVisibleNode] = nodes.slice(-1);
lastVisibleNode.focus();
}
- };
+ }
onKeyPress = event => {
const nodes = this.getVisibleNodes([...this.treeRef.current.getElementsByTagName('li')]);
@@ -58,13 +58,13 @@ class TreeView extends React.Component {
if (key === '*') {
this.setState(prevState => ({ expandSiblings: prevState.focusedNodeId }));
}
- };
+ }
getVisibleNodes = nodes => nodes.filter(node => !node.className.match(/node-hidden/));
clearExpandSiblings = () => {
this.setState(() => ({ expandSiblings: '' }));
- };
+ }
treeRef = React.createRef();
diff --git a/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeViewNode.js b/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeViewNode.js
index c4562eb9d50..b513f8c7f2d 100644
--- a/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeViewNode.js
+++ b/packages/patternfly-3/patternfly-react/src/components/TreeView/TreeViewNode.js
@@ -64,17 +64,17 @@ class TreeViewNode extends Component {
e.stopPropagation();
this.handleSelect(e);
}
- };
+ }
onFocus = e => {
e.stopPropagation();
this.props.onFocus(this.nodeRef.current);
this.setState(() => ({ focused: true }));
- };
+ }
onBlur = () => {
this.setState(() => ({ focused: false }));
- };
+ }
handleSelect = e => {
const { node, selectNode } = this.props;
@@ -85,16 +85,16 @@ class TreeViewNode extends Component {
this.nodeRef.current.focus();
selectNode(node);
}
- };
+ }
toggleExpand = e => {
e.stopPropagation();
this.toggleExpandedState();
- };
+ }
toggleExpandedState = () => {
this.setState(prevState => ({ expanded: !prevState.expanded }));
- };
+ }
nodeRef = React.createRef();
diff --git a/packages/patternfly-3/patternfly-react/src/components/TreeView/__mocks__/MockTreeView.js b/packages/patternfly-3/patternfly-react/src/components/TreeView/__mocks__/MockTreeView.js
index 8c9400277d7..677aa85ef5f 100644
--- a/packages/patternfly-3/patternfly-react/src/components/TreeView/__mocks__/MockTreeView.js
+++ b/packages/patternfly-3/patternfly-react/src/components/TreeView/__mocks__/MockTreeView.js
@@ -27,13 +27,13 @@ export class MockTreeView extends React.Component {
return { ...node, selected: false };
}
return node;
- });
+ })
selectNode = selectedNode => {
this.setState(prevState => ({
nodes: this.nodeSelector(prevState.nodes, selectedNode)
}));
- };
+ }
render() {
const { nodes } = this.state;
diff --git a/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/AsyncTypeAheadSelect.js b/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/AsyncTypeAheadSelect.js
index 766f4124607..53d17c9505c 100644
--- a/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/AsyncTypeAheadSelect.js
+++ b/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/AsyncTypeAheadSelect.js
@@ -16,7 +16,7 @@ class AsyncTypeAheadSelect extends React.Component {
handleSearch = query => {
this.onSearchStart();
Promise.resolve(this.props.onSearch(query)).then(options => this.onSearchEnd(options));
- };
+ }
render() {
const { innerRef, ...props } = this.props;
diff --git a/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/mock.js b/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/mock.js
index 63fd6ee93d8..14dcfbf6514 100644
--- a/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/mock.js
+++ b/packages/patternfly-3/patternfly-react/src/components/TypeAheadSelect/mock.js
@@ -185,7 +185,7 @@ const mockData = {
'Tajikistan',
'Tanzania',
'Thailand',
- "Timor L'Este",
+ 'Timor L\'Este',
'Togo',
'Tonga',
'Trinidad & Tobago',
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.js
index a85a3477277..393fd9626b6 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.js
@@ -63,29 +63,29 @@ class BaseVerticalNav extends React.Component {
const { onLayoutChange, setControlledState } = this.props;
setControlledState({ isMobile: newLayout === 'mobile' });
onLayoutChange && onLayoutChange(newLayout);
- };
+ }
setActivePath = activePath => {
if (!this.state.controlledActivePath) {
this.props.setControlledState({ activePath });
}
- };
+ }
setControlledActivePath = controlledActivePath => {
this.setState({ controlledActivePath });
- };
+ }
setControlledHoverPath = controlledHoverPath => {
this.setState({ controlledHoverPath });
- };
+ }
setControlledMobilePath = controlledMobilePath => {
this.setState({ controlledMobilePath });
- };
+ }
setControlledPinnedPath = controlledPinnedPath => {
this.setState({ controlledPinnedPath });
- };
+ }
setHoverPath = hoverPath => {
if (!this.state.controlledHoverPath) {
@@ -94,56 +94,56 @@ class BaseVerticalNav extends React.Component {
...(hoverPath === null ? { showMobileNav: false } : {})
});
}
- };
+ }
setMobilePath = mobilePath => {
if (!this.state.controlledMobilePath) {
this.props.setControlledState({ mobilePath });
}
- };
+ }
setPinnedPath = pinnedPath => {
if (!this.state.controlledPinnedPath) {
this.props.setControlledState({ pinnedPath });
}
- };
+ }
hoverTimer = new Timer();
clearBodyClasses = () => {
if (this.props.dynamicBodyClasses) {
setBodyClassIf(false, 'collapsed-nav');
setBodyClassIf(false, 'hidden-nav');
}
- };
+ }
collapseMenu = () => {
const { onCollapse, setControlledState } = this.props;
setControlledState({ navCollapsed: true });
onCollapse && onCollapse();
- };
+ }
expandMenu = () => {
const { onExpand, setControlledState } = this.props;
setControlledState({ navCollapsed: false });
onExpand && onExpand();
- };
+ }
forceHideSecondaryMenu = () => {
this.setState({ forceHidden: true }); // eslint-disable-line react/no-unused-state
setTimeout(() => {
this.setState({ forceHidden: false }); // eslint-disable-line react/no-unused-state
}, 500);
- };
+ }
handleBodyClick = () => {
// Clear hover state on body click. Helps especially when using blurDisabled prop.
this.setHoverPath(null);
- };
+ }
navigateToItem = item => {
const { onNavigate } = this.props;
onNavigate(item);
// Note: This should become router-aware later on.
- };
+ }
updateBodyClasses = () => {
// Note: Updating the body element classes from here like this is a hacky, non-react-y pattern.
@@ -154,7 +154,7 @@ class BaseVerticalNav extends React.Component {
setBodyClassIf(!isMobile && collapsed, 'collapsed-nav');
setBodyClassIf(isMobile, 'hidden-nav');
}
- };
+ }
updateNavOnItemBlur = (primary, secondary, tertiary, idPath, parentPath, noDelay, callback) => {
const { hoverPath, blurDelay, blurDisabled, setControlledState } = this.props;
@@ -181,7 +181,7 @@ class BaseVerticalNav extends React.Component {
}
}
}
- };
+ }
updateNavOnItemClick = (primary, secondary, tertiary, idPath, parentPath) => {
const { onItemClick, hoverPath, hoverDisabled, isMobile } = this.props;
@@ -201,7 +201,7 @@ class BaseVerticalNav extends React.Component {
this.navigateToItem(item);
}
onItemClick && onItemClick(primary, secondary, tertiary);
- };
+ }
updateNavOnItemHover = (primary, secondary, tertiary, idPath, parentPath, callback) => {
const { onItemHover, hoverPath, hoverDelay, hoverDisabled, isMobile } = this.props;
@@ -221,7 +221,7 @@ class BaseVerticalNav extends React.Component {
}, hoverDelay);
}
}
- };
+ }
updateNavOnMenuToggleClick = () => {
const { onMenuToggleClick, isMobile, showMobileNav, navCollapsed, setControlledState } = this.props;
@@ -238,21 +238,21 @@ class BaseVerticalNav extends React.Component {
this.collapseMenu();
}
onMenuToggleClick && onMenuToggleClick();
- };
+ }
updateNavOnMobileSelection = (primary, secondary, tertiary) => {
const { onMobileSelection } = this.props;
// All the behavior here is handled by mobilePath and setMobilePath,
// but we still make a callback available here.
onMobileSelection && onMobileSelection(primary, secondary, tertiary);
- };
+ }
updateNavOnPin = (item, depth, pinned) => {
const { onItemPin, isMobile } = this.props;
if (!isMobile) {
onItemPin && onItemPin(item, depth, pinned);
}
- };
+ }
render() {
const { items, children } = this.props;
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.stories.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.stories.js
index 9f0149870d9..9f8447198fe 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.stories.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNav.stories.js
@@ -215,7 +215,7 @@ stories.add(
'Custom Masthead',
withInfo({
propTablesExclude: [MockFixedLayout, MockIconBarChildren, Icon, MenuItem, Dropdown, Dropdown.Menu, Dropdown.Toggle],
- text: `Example using the **Masthead**, **Brand** and **IconBar** components with images. (items from 'Items as Objects').`
+ text: 'Example using the **Masthead**, **Brand** and **IconBar** components with images. (items from \'Items as Objects\').'
})(() => (
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavConstants.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavConstants.js
index 4cf56e0e867..4772ceda46d 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavConstants.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavConstants.js
@@ -118,9 +118,9 @@ const getNextDepth = depth =>
const deepestOf = (pri, sec, ter) => (pri && sec && ter) || (pri && sec) || pri;
const componentForDepth = depth => {
- if (depth === 'primary') return VerticalNavItem;
- if (depth === 'secondary') return VerticalNavSecondaryItem;
- if (depth === 'tertiary') return VerticalNavTertiaryItem;
+ if (depth === 'primary') { return VerticalNavItem; }
+ if (depth === 'secondary') { return VerticalNavSecondaryItem; }
+ if (depth === 'tertiary') { return VerticalNavTertiaryItem; }
return null;
};
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItem.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItem.js
index f07c9c15eca..bb63db12a77 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItem.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItem.js
@@ -9,7 +9,7 @@ import VerticalNavItemHelper from './VerticalNavItemHelper';
* In the future, we could lift some of the primary-specific code from Helper into this file.
*/
const BaseVerticalNavItem = props => {
- if (wrongDepth(props, 'primary')) return correctDepth(props);
+ if (wrongDepth(props, 'primary')) { return correctDepth(props); }
return ;
};
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItemHelper.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItemHelper.js
index 292e0da4762..74a41d4e261 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItemHelper.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavItemHelper.js
@@ -78,7 +78,7 @@ class BaseVerticalNavItemHelper extends React.Component {
const { primary, secondary, tertiary } = this.getContextNavItems();
const { updateNavOnItemBlur, idPath, onBlur } = this.props;
updateNavOnItemBlur(primary, secondary, tertiary, this.idPath(), idPath, noDelay, onBlur);
- };
+ }
onItemClick = event => {
const { primary, secondary, tertiary } = this.getContextNavItems();
@@ -95,19 +95,19 @@ class BaseVerticalNavItemHelper extends React.Component {
}
this.setActive();
onClick && onClick(primary, secondary, tertiary);
- };
+ }
onItemHover = () => {
const { primary, secondary, tertiary } = this.getContextNavItems();
const { updateNavOnItemHover, idPath, onHover } = this.props;
updateNavOnItemHover(primary, secondary, tertiary, this.idPath(), idPath, onHover);
- };
+ }
onMobileSelection = (primary, secondary, tertiary) => {
const { setMobilePath, updateNavOnMobileSelection } = this.props;
setMobilePath(this.idPath());
updateNavOnMobileSelection(primary, secondary, tertiary);
- };
+ }
getContextNavItems = () => {
// We have primary, secondary, and tertiary items as props if they are part of the parent context,
@@ -119,11 +119,11 @@ class BaseVerticalNavItemHelper extends React.Component {
secondary: depth === 'secondary' ? navItem : secondaryItem,
tertiary: depth === 'tertiary' ? navItem : tertiaryItem
};
- };
+ }
setActive = () => {
this.props.setActivePath(this.idPath());
- };
+ }
setHovered() {
this.props.setHoverPath(this.idPath());
@@ -132,7 +132,7 @@ class BaseVerticalNavItemHelper extends React.Component {
id = () => {
const { id, title } = this.navItem(null, true); // Need to ignorePath here so we don't get an infinite call stack...
return id || title || this.props.index;
- };
+ }
idPath = () => `${this.props.idPath}${this.id()}/`;
@@ -150,7 +150,7 @@ class BaseVerticalNavItemHelper extends React.Component {
selectedOnMobile: valOrOnPath(item.selectedOnMobile, props.mobilePath),
pinned: valOrOnPath(item.pinned, props.pinnedPath)
};
- };
+ }
pinNextDepth = () => {
const {
@@ -181,7 +181,7 @@ class BaseVerticalNavItemHelper extends React.Component {
}
}
updateNavOnPin(this.navItem(), nextDepth, !pinnedPath);
- };
+ }
render() {
const {
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavSecondaryItem.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavSecondaryItem.js
index 18f3a0a3488..847044a2f64 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavSecondaryItem.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavSecondaryItem.js
@@ -9,7 +9,7 @@ import VerticalNavItemHelper from './VerticalNavItemHelper';
* In the future, we could lift some of the secondary-specific code from Helper into this file.
*/
const BaseVerticalNavSecondaryItem = props => {
- if (wrongDepth(props, 'secondary')) return correctDepth(props);
+ if (wrongDepth(props, 'secondary')) { return correctDepth(props); }
return ;
};
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavTertiaryItem.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavTertiaryItem.js
index 273d052612e..a7d4443b516 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavTertiaryItem.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/VerticalNavTertiaryItem.js
@@ -9,7 +9,7 @@ import VerticalNavItemHelper from './VerticalNavItemHelper';
* In the future, we could lift some of the tertiary-specific code from Helper into this file.
*/
const BaseVerticalNavTertiaryItem = props => {
- if (wrongDepth(props, 'tertiary')) return correctDepth(props);
+ if (wrongDepth(props, 'tertiary')) { return correctDepth(props); }
return ;
};
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockNavItems.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockNavItems.js
index 715259be74c..852539a301c 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockNavItems.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockNavItems.js
@@ -96,7 +96,7 @@ export const mockNavItems = [
badges: [
{
count: 9999,
- tooltip: "Whoa, that's a lot"
+ tooltip: 'Whoa, that\'s a lot'
}
]
},
diff --git a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockWithMastHeadComponent.js b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockWithMastHeadComponent.js
index 759d803214d..169a1367a72 100644
--- a/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockWithMastHeadComponent.js
+++ b/packages/patternfly-3/patternfly-react/src/components/VerticalNav/__mocks__/mockWithMastHeadComponent.js
@@ -9,7 +9,7 @@ export class MockWithMastHeadComponent extends React.Component {
onCollapse = () => {
this.setState({ collapse: !this.state.collapse });
- };
+ }
render() {
return (
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/StatefulWizardPattern.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/StatefulWizardPattern.js
index f6ba81a9d2b..d105aae944d 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/StatefulWizardPattern.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/StatefulWizardPattern.js
@@ -33,7 +33,7 @@ class StatefulWizardPattern extends React.Component {
return;
}
this.setState({ activeStepIndex: newStepIndex });
- };
+ }
render() {
const { shouldDisableNextStep, shouldDisablePreviousStep, shouldDisableCancelButton, ...otherProps } = this.props;
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/WizardPattern.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/WizardPattern.js
index b668bdf37f5..26510ffeee7 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/WizardPattern.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Patterns/WizardPattern.js
@@ -58,18 +58,18 @@ const WizardPattern = ({
const activeStep = getStep();
const goToStep = newStepIndex => {
- if (shouldPreventGoToStep(newStepIndex)) return;
+ if (shouldPreventGoToStep(newStepIndex)) { return; }
if (newStepIndex === activeStepIndex + 1) {
const stepOnNextResult = activeStep.onNext && activeStep.onNext();
const propOnNextResult = onNext(newStepIndex);
const stepFailed = stepOnNextResult === false || propOnNextResult === false;
- if (stepFailed) return;
+ if (stepFailed) { return; }
}
if (newStepIndex === activeStepIndex - 1) {
const stepFailed = onBack(newStepIndex) === false;
- if (stepFailed) return;
+ if (stepFailed) { return; }
}
- if (onStepChanged) onStepChanged(newStepIndex);
+ if (onStepChanged) { onStepChanged(newStepIndex); }
};
const shouldPreventGoToStep = newStepIndex => {
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/LoadingWizardExample.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/LoadingWizardExample.js
index 59dcf2e6b2a..4c741e6ae10 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/LoadingWizardExample.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/LoadingWizardExample.js
@@ -12,10 +12,10 @@ export class LoadingWizardExample extends React.Component {
}
close = () => {
this.setState({ showModal: false });
- };
+ }
open = () => {
this.setState({ showModal: true });
- };
+ }
render() {
const { showModal } = this.state;
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardExample.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardExample.js
index cde44b59d2f..42b17eb44f4 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardExample.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardExample.js
@@ -11,10 +11,10 @@ import { renderWizardSteps, renderSidebarItems, renderWizardContents } from './m
export class WizardExample extends MockWizardBase {
open = () => {
this.setState({ showModal: true });
- };
+ }
close = () => {
this.setState({ showModal: false });
- };
+ }
render() {
const { showModal, activeStepIndex, activeSubStepIndex } = this.state;
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardPatternExample.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardPatternExample.js
index 9f3244ceeaa..6a65b88de5f 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardPatternExample.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/WizardPatternExample.js
@@ -28,13 +28,13 @@ export class WizardPatternExample extends React.Component {
close = () => {
this.setState({ showModal: false, loading: false });
- };
+ }
open = () => {
this.setState({ showModal: true, loading: true });
setTimeout(() => {
this.setState({ loading: false });
}, 1000);
- };
+ }
renderStateless = () => {
// We need knobs on the stateless example, because we must drive its state ourselves.
const { loading, activeStepIndex } = this.state;
@@ -64,7 +64,7 @@ export class WizardPatternExample extends React.Component {
/>
);
- };
+ }
renderStateful = () => (
// No knobs for the stateful example, we want to let it control its own state.
@@ -84,7 +84,7 @@ export class WizardPatternExample extends React.Component {
loading={this.state.loading}
/>
- );
+ )
render() {
return this.props.stateful ? this.renderStateful() : this.renderStateless();
}
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardBase.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardBase.js
index ba024559f88..148086e03a4 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardBase.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardBase.js
@@ -23,7 +23,7 @@ class MockWizardBase extends React.Component {
activeSubStepIndex: steps[prevState.activeStepIndex - 1].subSteps.length - 1
}));
}
- };
+ }
onNextButtonClick = () => {
const { steps } = this.props;
const { activeStepIndex, activeSubStepIndex } = this.state;
@@ -39,13 +39,13 @@ class MockWizardBase extends React.Component {
activeSubStepIndex: 0
}));
}
- };
+ }
onSidebarItemClick = (stepIndex, subStepIndex) => {
this.setState({
activeStepIndex: stepIndex,
activeSubStepIndex: subStepIndex
});
- };
+ }
onStepClick = stepIndex => {
if (stepIndex === this.state.activeStepIndex) {
return;
@@ -54,7 +54,7 @@ class MockWizardBase extends React.Component {
activeStepIndex: stepIndex,
activeSubStepIndex: 0
});
- };
+ }
render() {
return false;
}
diff --git a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardReviewStepsManager.js b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardReviewStepsManager.js
index 0f9bba1d4f5..8c7d78ae614 100644
--- a/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardReviewStepsManager.js
+++ b/packages/patternfly-3/patternfly-react/src/components/Wizard/Stories/mockWizardReviewStepsManager.js
@@ -16,7 +16,7 @@ class MockWizardReviewStepsManager extends React.Component {
this.setState({
steps: updated
});
- };
+ }
subStepClicked = (e, stepIndex, subStepIndex) => {
e.preventDefault();
const updated = [...this.state.steps];
@@ -24,7 +24,7 @@ class MockWizardReviewStepsManager extends React.Component {
this.setState({
steps: updated
});
- };
+ }
render() {
const { steps } = this.state;
return (
diff --git a/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.js b/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.js
index 9ca03d1b23d..6ea69fc2623 100644
--- a/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.js
+++ b/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.js
@@ -24,21 +24,21 @@ class SerialConsole extends React.Component {
}
onResetClick = event => {
- if (event.button !== 0) return;
+ if (event.button !== 0) { return; }
this.props.onDisconnect();
this.props.onConnect();
event.target.blur();
this.focusTerminal();
- };
+ }
onDisconnectClick = event => {
- if (event.button !== 0) return;
+ if (event.button !== 0) { return; }
this.props.onDisconnect();
event.target.blur();
this.focusTerminal();
- };
+ }
/**
* Backend sent data.
@@ -60,7 +60,7 @@ class SerialConsole extends React.Component {
focusTerminal = () => {
this.childTerminal && this.childTerminal.focus();
- };
+ }
render() {
const { id, status, topClassName } = this.props;
diff --git a/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.stories.js b/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.stories.js
index 01434d96e10..6b4c6d12db0 100644
--- a/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.stories.js
+++ b/packages/patternfly-3/react-console/src/SerialConsole/SerialConsole.stories.js
@@ -44,13 +44,13 @@ export class SerialConsoleConnector extends React.Component {
passKeys: false,
status: DISCONNECTED // will close the terminal window
});
- };
+ }
onConnect = () => {
log('SerialConsoleConnector.onConnect(), ', this.state);
this.setConnected();
this.tellFairyTale();
- };
+ }
onData = data => {
log('UI terminal component produced data, i.e. a key was pressed, pass it to backend. [', data, ']');
@@ -60,32 +60,32 @@ export class SerialConsoleConnector extends React.Component {
if (this.state.passKeys) {
this.onDataFromBackend(data);
}
- };
+ }
onDataFromBackend = data => {
log('Backend sent data, pass them to the UI component. [', data, ']');
if (this.childSerialconsole) {
this.childSerialconsole.onDataReceived(data);
}
- };
+ }
onDisconnect = () => {
this.setState({
status: DISCONNECTED
});
timeoutIds.forEach(id => clearTimeout(id));
- };
+ }
onResize = (rows, cols) => {
log('UI has been resized, pass this info to backend. [', rows, ', ', cols, ']');
- };
+ }
setConnected = () => {
this.setState({
status: CONNECTED,
passKeys: true
});
- };
+ }
tellFairyTale = () => {
let time = 1000;
@@ -102,7 +102,7 @@ export class SerialConsoleConnector extends React.Component {
time += 5000;
timeoutIds.push(setTimeout(this.onBackendDisconnected, time));
- };
+ }
render() {
return (
diff --git a/packages/patternfly-3/react-console/src/SerialConsole/XTerm.js b/packages/patternfly-3/react-console/src/SerialConsole/XTerm.js
index 8c7e738db6f..9d122ae8506 100644
--- a/packages/patternfly-3/react-console/src/SerialConsole/XTerm.js
+++ b/packages/patternfly-3/react-console/src/SerialConsole/XTerm.js
@@ -100,7 +100,7 @@ class XTerm extends React.Component {
// https://developer.mozilla.org/en-US/docs/Web/Events/beforeunload
event.returnValue = '';
return '';
- };
+ }
/**
* Backend closed connection.
@@ -125,11 +125,11 @@ class XTerm extends React.Component {
onFocus = () => {
window.addEventListener('beforeunload', this.onBeforeUnload);
- };
+ }
onBlur = () => {
window.removeEventListener('beforeunload', this.onBeforeUnload);
- };
+ }
/**
* If autoFit is enabled, compute the size and set it
@@ -174,8 +174,8 @@ class XTerm extends React.Component {
}
focus = () => {
- if (this.state.terminal) this.state.terminal.focus();
- };
+ if (this.state.terminal) { this.state.terminal.focus(); }
+ }
render() {
// ensure react never reuses this div by keying it with the terminal widget
diff --git a/packages/patternfly-3/react-console/src/SpiceConsole/SpiceConsole.js b/packages/patternfly-3/react-console/src/SpiceConsole/SpiceConsole.js
index 908ac2bca15..82092c82b07 100644
--- a/packages/patternfly-3/react-console/src/SpiceConsole/SpiceConsole.js
+++ b/packages/patternfly-3/react-console/src/SpiceConsole/SpiceConsole.js
@@ -45,7 +45,7 @@ class SpiceConsole extends React.Component {
}
onConnected = () => {
this.setState({ status: CONNECTED });
- };
+ }
onCtrlAltDel = e => {
if (this.sc) {
@@ -54,23 +54,23 @@ class SpiceConsole extends React.Component {
sendCtrlAltDel();
window.sc = undefined;
}
- };
+ }
onSpiceError = e => {
this.disconnect();
this.onDisconnected(e);
// if (e !== undefined && e.message === "Permission denied.") {
- };
+ }
onDisconnected = e => {
this.setState({ status: DISCONNECTED });
this.props.onDisconnected(e);
- };
+ }
onSecurityFailure = e => {
this.setState({ status: DISCONNECTED });
this.props.onSecurityFailure(e);
- };
+ }
render() {
const { textDisconnected, textConnecting, textSendShortcut, textCtrlAltDel } = this.props;
diff --git a/packages/patternfly-3/react-console/src/VncConsole/VncConsole.js b/packages/patternfly-3/react-console/src/VncConsole/VncConsole.js
index a6df6a15508..91d8af39448 100644
--- a/packages/patternfly-3/react-console/src/VncConsole/VncConsole.js
+++ b/packages/patternfly-3/react-console/src/VncConsole/VncConsole.js
@@ -73,45 +73,45 @@ class VncConsole extends React.Component {
return;
}
this.rfb.disconnect();
- };
+ }
onConnected = () => {
this.setState({ status: CONNECTED });
- };
+ }
onCtrlAltDel = e => {
if (this.rfb) {
this.rfb.sendCtrlAltDel();
this.focusVnc(e);
}
- };
+ }
onDisconnected = e => {
this.setState({ status: DISCONNECTED });
this.props.onDisconnected(e);
- };
+ }
onSecurityFailure = e => {
this.setState({ status: DISCONNECTED });
this.props.onSecurityFailure(e);
- };
+ }
removeEventListeners = () => {
this.rfb.removeEventListener('connect', this.onConnected);
this.rfb.removeEventListener('disconnect', this.onDisconnected);
this.rfb.removeEventListener('securityfailure', this.onSecurityFailure);
- };
+ }
setNovncElem = e => {
this.novncElem = e;
- };
+ }
focusVnc = e => {
if (e && e.target && e.target.blur) {
e.target.blur();
}
this.novncElem && this.novncElem.focus();
- };
+ }
render() {
const {
diff --git a/packages/patternfly-4/react-charts/src/components/Chart/Chart.test.tsx b/packages/patternfly-4/react-charts/src/components/Chart/Chart.test.tsx
index eeb73051b8d..94041f55506 100644
--- a/packages/patternfly-4/react-charts/src/components/Chart/Chart.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/Chart/Chart.test.tsx
@@ -4,8 +4,8 @@ import { Chart } from './Chart';
import { ChartGroup } from '../ChartGroup';
import { ChartLine } from '../ChartLine';
-Object.values([true, false]).forEach(isRead => {
- test(`Chart`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('Chart', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/Chart/Chart.tsx b/packages/patternfly-4/react-charts/src/components/Chart/Chart.tsx
index 827f5ef3091..7c6ee072e63 100644
--- a/packages/patternfly-4/react-charts/src/components/Chart/Chart.tsx
+++ b/packages/patternfly-4/react-charts/src/components/Chart/Chart.tsx
@@ -21,7 +21,7 @@ import {
ChartLegendOrientation,
ChartLegendPosition,
ChartLegendWrapper
-} from "../ChartLegend";
+} from '../ChartLegend';
import { ChartCommonStyles, ChartThemeDefinition } from '../ChartTheme';
import { getLabelTextSize, getPaddingForSide, getTheme } from '../ChartUtils';
@@ -195,13 +195,13 @@ export interface ChartProps extends VictoryChartProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- legendData?: Array<{
+ legendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The orientation prop takes a string that defines whether legend data
* are displayed in a row or column. When orientation is "horizontal",
@@ -271,7 +271,7 @@ export interface ChartProps extends VictoryChartProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The scale prop determines which scales your chart should use. This prop can be
* given as a string specifying a supported scale ("linear", "time", "log", "sqrt"),
diff --git a/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.test.tsx
index 3bccece1b5c..1fb3b2b5cec 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartArea } from '../ChartArea';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartArea`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartArea', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.tsx b/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.tsx
index 0281e642c9e..b24984ef1f8 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartArea/ChartArea.tsx
@@ -22,7 +22,7 @@ import { getTheme } from '../ChartUtils';
export enum ChartAreaSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -140,7 +140,7 @@ export interface ChartAreaProps extends VictoryAreaProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", "all">[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', 'all'>[];
/**
* ChartArea uses the standard externalEventMutations prop.
*/
@@ -251,7 +251,7 @@ export interface ChartAreaProps extends VictoryAreaProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The samples prop specifies how many individual points to plot when plotting
* y as a function of x. Samples is ignored if x props are provided instead.
@@ -371,7 +371,7 @@ export interface ChartAreaProps extends VictoryAreaProps {
* @example 'last_quarter_profit', () => 10, 1, 'employees.salary', ["employees", "salary"]
*/
y0?: DataGetterPropType;
-};
+}
export const ChartArea: React.FunctionComponent = ({
themeColor,
diff --git a/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.test.tsx
index 7a86b0d8c80..8555b10f3e1 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.test.tsx
@@ -5,8 +5,8 @@ import { ChartAxis } from './ChartAxis';
import { ChartGroup } from '../ChartGroup';
import { ChartLine } from '../ChartLine';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartAxis`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartAxis', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.tsx b/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.tsx
index 2f83a73f15a..46d0ba76945 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartAxis/ChartAxis.tsx
@@ -11,7 +11,7 @@ import {
VictoryAxis,
VictoryAxisProps,
} from 'victory';
-import { ChartThemeDefinition } from "../ChartTheme";
+import { ChartThemeDefinition } from '../ChartTheme';
import { getAxisTheme, getTheme } from '../ChartUtils';
/**
@@ -132,7 +132,7 @@ export interface ChartAxisProps extends VictoryAxisProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"axis" | "axisLabel" | "grid" | "ticks" | "tickLabels" | "parent", number | string>[];
+ events?: EventPropTypeInterface<'axis' | 'axisLabel' | 'grid' | 'ticks' | 'tickLabels' | 'parent', number | string>[];
/**
* ChartLegend uses the standard externalEventMutations prop.
*/
@@ -231,7 +231,7 @@ export interface ChartAxisProps extends VictoryAxisProps {
/**
* The orientation prop specifies the position and orientation of your axis.
*/
- orientation?: "top" | "bottom" | "left" | "right";
+ orientation?: 'top' | 'bottom' | 'left' | 'right';
/**
* The padding props specifies the amount of padding in number of pixels between
* the edge of the chart and any rendered child components. This prop can be given
@@ -252,7 +252,7 @@ export interface ChartAxisProps extends VictoryAxisProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The scale prop determines which scales your chart should use. This prop can be
* given as a string specifying a supported scale ("linear", "time", "log", "sqrt"),
@@ -419,6 +419,6 @@ export const ChartAxis: React.FunctionComponent = ({
return (
);
-}
+};
hoistNonReactStatics(ChartAxis, VictoryAxis);
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.test.tsx
index 39b8d987c20..48237775359 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.test.tsx
@@ -4,8 +4,8 @@ import { Chart } from '../Chart';
import { ChartBar } from './ChartBar';
import { ChartGroup } from '../ChartGroup';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBar`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBar', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.tsx b/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.tsx
index 93b60050e17..39794699f47 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBar/ChartBar.tsx
@@ -33,7 +33,7 @@ export interface ChartBarProps extends VictoryBarProps {
* This prop may be given as “start”, “middle” or “end”. When this prop is not specified,
* bars will have “middle” alignment relative to their data points.
*/
- alignment?: "start" | "middle" | "end";
+ alignment?: 'start' | 'middle' | 'end';
/**
* The animate prop specifies props for VictoryAnimation to use.
* The animate prop should also be used to specify enter and exit
@@ -174,7 +174,7 @@ export interface ChartBarProps extends VictoryBarProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", number | string>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', number | string>[];
/**
* ChartBar uses the standard externalEventMutations prop.
*/
@@ -281,7 +281,7 @@ export interface ChartBarProps extends VictoryBarProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The samples prop specifies how many individual points to plot when plotting
* y as a function of x. Samples is ignored if x props are provided instead.
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.test.tsx
index 54cb4597a26..2913b4aecad 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBullet } from './ChartBullet';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletQualitativeRange`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletQualitativeRange', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
@@ -15,7 +15,7 @@ test('renders component data', () => {
ariaDesc="Storage capacity"
ariaTitle="Bullet chart example"
comparativeWarningMeasureData={[{name: 'Warning', y: 88}]}
- labels={datum => `${datum.name}: ${datum.y}`}
+ labels={(datum) => `${datum.name}: ${datum.y}`}
maxDomain={{y: 100}}
primarySegmentedMeasureData={[{ name: 'Measure', y: 50 }]}
qualitativeRangeData={[{ name: 'Range', y: 50 }, { name: 'Range', y: 75 }]}
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.tsx
index 151ff9efdbe..cc4c20cc159 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBullet.tsx
@@ -110,13 +110,13 @@ export interface ChartBulletProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- comparativeErrorMeasureLegendData?: Array<{
+ comparativeErrorMeasureLegendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The comparative measure warning component to render with the chart
*/
@@ -148,13 +148,13 @@ export interface ChartBulletProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- comparativeWarningMeasureLegendData?: Array<{
+ comparativeWarningMeasureLegendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The domain prop describes the range of values your chart will include. This prop can be
* given as a array of the minimum and maximum expected values for your chart,
@@ -316,13 +316,13 @@ export interface ChartBulletProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- primaryDotMeasureLegendData?: Array<{
+ primaryDotMeasureLegendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The primary segmented measure component to render with the chart
*/
@@ -354,13 +354,13 @@ export interface ChartBulletProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- primarySegmentedMeasureLegendData?: Array<{
+ primarySegmentedMeasureLegendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The qualitative range component to render with the chart
*/
@@ -399,13 +399,13 @@ export interface ChartBulletProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- qualitativeRangeLegendData?: Array<{
+ qualitativeRangeLegendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The standalone prop determines whether the component will render a standalone svg
* or a tag that will be included in an external svg. Set standalone to false to
@@ -491,8 +491,8 @@ interface ChartBulletThemeInterface {
primarySegmentedMeasureLegendData?: any[];
qualitativeRangeData?: any[];
qualitativeRangeLegendData?: any[];
- themeColor?: string,
- themeVariant?: string
+ themeColor?: string;
+ themeVariant?: string;
}
// Returns the min and max domain for comparative / primary measures and qualitative range data
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx
index 01e08a308ad..70ec37eef46 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletComparativeErrorMeasure } from './ChartBulletComparativeErrorMeasure';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletComparativeErrorMeasure`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletComparativeErrorMeasure', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.tsx
index 48709708be2..327d1ef419d 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeErrorMeasure.tsx
@@ -152,7 +152,7 @@ export interface ChartBulletComparativeErrorMeasureProps {
interface ChartBulletComparativeErrorMeasureInterface {
data?: any[];
invert?: boolean;
- theme?: ChartThemeDefinition,
+ theme?: ChartThemeDefinition;
themeColor?: string;
themeVariant?: string;
y?: DataGetterPropType;
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx
index ffbff93658b..15affe868a5 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletComparativeMeasure } from './ChartBulletComparativeMeasure';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletComparativeMeasure`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletComparativeMeasure', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.tsx
index b412031a0d7..9f7f9018dcb 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeMeasure.tsx
@@ -154,7 +154,7 @@ export interface ChartBulletComparativeMeasureProps {
interface ChartBulletComparativeMeasureInterface {
data?: any[];
invert?: boolean;
- theme?: ChartThemeDefinition,
+ theme?: ChartThemeDefinition;
themeColor?: string;
themeVariant?: string;
y?: DataGetterPropType;
@@ -221,16 +221,16 @@ export const ChartBulletComparativeMeasure: React.FunctionComponent {
+ dx={(datum) => {
if (horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
const result = (typeof barWidth === 'function') ? barWidth(data, false) : barWidth;
return result / 2;
}}
- dy={datum => {
+ dy={(datum) => {
if (!horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
const result = (typeof barWidth === 'function') ? barWidth(data, false) : barWidth;
return result / 2;
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx
index ffc6ce7e245..ce00bdfb564 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletComparativeWarningMeasure } from './ChartBulletComparativeWarningMeasure';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletComparativeZeroMeasure`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletComparativeZeroMeasure', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.tsx
index 0cd14c2a9b3..66ce71a1844 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletComparativeWarningMeasure.tsx
@@ -152,7 +152,7 @@ export interface ChartBulletComparativeWarningMeasureProps {
interface ChartBulletComparativeWarningMeasureInterface {
data?: any[];
invert?: boolean;
- theme?: ChartThemeDefinition,
+ theme?: ChartThemeDefinition;
themeColor?: string;
themeVariant?: string;
y?: DataGetterPropType;
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx
index 6f88f36951e..3eab6fe3dbb 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletGroupTitle.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletGroupTitle } from './ChartBulletGroupTitle';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletGroupTitle`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletGroupTitle', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx
index 562ff87b026..297eecccbed 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletPrimaryDotMeasure } from './ChartBulletPrimaryDotMeasure';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletPrimaryDotMeasure`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletPrimaryDotMeasure', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.tsx
index b187e969aa0..3e8bd3668aa 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimaryDotMeasure.tsx
@@ -156,7 +156,7 @@ export interface ChartBulletPrimaryDotMeasureProps {
interface ChartBulletPrimaryDotMeasureDataInterface {
data?: any[];
invert?: boolean;
- theme?: ChartThemeDefinition,
+ theme?: ChartThemeDefinition;
themeColor?: string;
themeVariant?: string;
y?: DataGetterPropType;
@@ -221,15 +221,15 @@ export const ChartBulletPrimaryDotMeasure: React.FunctionComponent {
+ dx={(datum) => {
if (horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
return ChartBulletStyles.primaryDotMeasureSize;
}}
- dy={datum => {
+ dy={(datum) => {
if (!horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
return ChartBulletStyles.primaryDotMeasureSize;
}}
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx
index beb0ff53702..b79dbdbd416 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletPrimarySegmentedMeasure } from './ChartBulletPrimarySegmentedMeasure';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletPrimarySegmentedMeasure`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletPrimarySegmentedMeasure', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.tsx
index f8507252a30..25fad93631c 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletPrimarySegmentedMeasure.tsx
@@ -13,7 +13,7 @@ import { ChartContainer } from '../ChartContainer';
import { ChartBulletStyles, ChartThemeDefinition } from '../ChartTheme';
import { ChartTooltip } from '../ChartTooltip';
import { getBulletPrimaryNegativeMeasureTheme, getBulletPrimarySegmentedMeasureTheme } from '../ChartUtils';
-import { ChartBulletComparativeMeasure } from "./ChartBulletComparativeMeasure";
+import { ChartBulletComparativeMeasure } from './ChartBulletComparativeMeasure';
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -178,8 +178,8 @@ export interface ChartBulletPrimarySegmentedMeasureProps {
interface ChartBulletPrimarySegmentedMeasureDataInterface {
data?: any[];
invert?: boolean;
- negativeMeasureTheme?: ChartThemeDefinition,
- theme?: ChartThemeDefinition,
+ negativeMeasureTheme?: ChartThemeDefinition;
+ theme?: ChartThemeDefinition;
themeColor?: string;
themeVariant?: string;
y?: DataGetterPropType;
@@ -275,16 +275,16 @@ export const ChartBulletPrimarySegmentedMeasure: React.FunctionComponent {
+ dx={(datum) => {
if (horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
const result = (typeof barWidth === 'function') ? barWidth(data, false) : barWidth;
return result / 2;
}}
- dy={datum => {
+ dy={(datum) => {
if (!horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
const result = (typeof barWidth === 'function') ? barWidth(data, false) : barWidth;
return result / 2;
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx
index ead18094570..19d6251f36e 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletQualitativeRange } from './ChartBulletQualitativeRange';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletQualitativeRange`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletQualitativeRange', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.tsx
index c6c18b91ced..5a147c74157 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletQualitativeRange.tsx
@@ -165,7 +165,7 @@ export interface ChartBulletQualitativeRangeProps {
interface ChartBulletQualitativeRangeDataInterface {
data?: any[];
invert?: boolean;
- theme?: ChartThemeDefinition,
+ theme?: ChartThemeDefinition;
themeColor?: string;
themeVariant?: string;
y?: DataGetterPropType;
@@ -239,16 +239,16 @@ export const ChartBulletQualitativeRange: React.FunctionComponent {
+ dx={(datum) => {
if (horizontal) {
- return datum._y > 0 ? -10 : 10
+ return datum._y > 0 ? -10 : 10;
}
const result = (typeof barWidth === 'function') ? barWidth(data, false) : barWidth;
return result / 2;
}}
- dy={datum => {
+ dy={(datum) => {
if (!horizontal) {
- return -10
+ return -10;
}
const result = (typeof barWidth === 'function') ? barWidth(data, false) : barWidth;
return result / 2;
diff --git a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx
index 0a40947430e..1852fc9f663 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartBullet/ChartBulletTitle.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartBulletTitle } from './ChartBulletTitle';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartBulletTitle`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartBulletTitle', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.test.tsx
index cee984ab72a..25ed039c08d 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.test.tsx
@@ -3,8 +3,8 @@ import { shallow } from 'enzyme';
import { ChartContainer } from './ChartContainer';
import { ChartLegend } from '../ChartLegend';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartContainer`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartContainer', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.tsx b/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.tsx
index 6a5e4fdb244..dd5577b4446 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartContainer/ChartContainer.tsx
@@ -89,7 +89,7 @@ export interface ChartContainerProps extends VictoryContainerProps {
* is given, the width prop from the child component passed will be used.
*/
width?: number;
-};
+}
// const ChartContainer = props => ;
export const ChartContainer: React.FunctionComponent = ({
diff --git a/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.test.tsx
index 50474a31635..b8b58c42a7c 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartDonut } from './ChartDonut';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartDonut`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartDonut', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.tsx b/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.tsx
index a27eb52c53f..0d3d1018dd6 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartDonut/ChartDonut.tsx
@@ -22,12 +22,12 @@ export enum ChartDonutLabelPosition {
centroid = 'centroid',
endAngle = 'endAngle',
startAngle = 'startAngle'
-};
+}
export enum ChartDonutSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
export enum ChartDonutSubTitlePosition {
bottom = 'bottom',
@@ -219,7 +219,7 @@ export interface ChartDonutProps extends ChartPieProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback | string[] | number[]>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback | string[] | number[]>[];
/**
* ChartDonut uses the standard externalEventMutations prop.
*/
@@ -297,13 +297,13 @@ export interface ChartDonutProps extends ChartPieProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- legendData?: Array<{
+ legendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* Defines a horizontal shift from the x coordinate. It should not be set manually.
*/
diff --git a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx
index da805333f20..b1d80e3f66a 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartDonutThreshold } from './ChartDonutThreshold';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartDonutThreshold`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartDonutThreshold', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.tsx b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.tsx
index 98d3d63c212..cb3861e5466 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutThreshold.tsx
@@ -9,40 +9,40 @@ import {
StringOrNumberOrCallback,
VictoryPie,
VictoryStyleInterface
-} from "victory";
+} from 'victory';
import { Data } from 'victory-core';
import hoistNonReactStatics from 'hoist-non-react-statics';
import { ChartContainer } from '../ChartContainer';
import { ChartDonut, ChartDonutProps } from '../ChartDonut';
-import { ChartCommonStyles, ChartDonutStyles, ChartThemeDefinition } from "../ChartTheme";
+import { ChartCommonStyles, ChartDonutStyles, ChartThemeDefinition } from '../ChartTheme';
import { getChartOrigin, getDonutThresholdDynamicTheme, getDonutThresholdStaticTheme } from '../ChartUtils';
export enum ChartDonutThresholdDonutOrientation {
left = 'left',
right = 'right',
top = 'top'
-};
+}
export enum ChartDonutThresholdLabelOrientation {
horizontal = 'horizontal',
vertical = 'vertical'
-};
+}
export enum ChartDonutThresholdLabelPosition {
centroid = 'centroid',
endAngle = 'endAngle',
startAngle = 'startAngle'
-};
+}
export enum ChartDonutThresholdLegendPosition {
bottom = 'bottom',
right = 'right'
-};
+}
export enum ChartDonutThresholdSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
export enum ChartDonutThresholdSubTitlePosition {
bottom = 'bottom',
@@ -237,7 +237,7 @@ export interface ChartDonutThresholdProps extends ChartDonutProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback | string[] | number[]>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback | string[] | number[]>[];
/**
* ChartDonutThreshold uses the standard externalEventMutations prop.
*/
@@ -459,7 +459,7 @@ export const ChartDonutThreshold: React.FunctionComponent {
// Format and sort data. Sorting ensures thresholds are displayed in the correct order and simplifies calculations.
- const datum = Data.formatData(data, {x, y, ...rest}, ['x', 'y']).sort((a: any,b: any) => a._y - b._y);
+ const datum = Data.formatData(data, {x, y, ...rest}, ['x', 'y']).sort((a: any, b: any) => a._y - b._y);
// Data must be offset so that the sum of all data point y-values (including the final slice) == 100.
const [prev, computedData] = datum.reduce((acc: [number, any], dataPoint: {_x: number | string, _y: number}) => {
@@ -498,7 +498,7 @@ export const ChartDonutThreshold: React.FunctionComponent {
const dynamicHeight = donutSize - (theme.pie.height - dynamicTheme.pie.height);
return Math.round((donutSize - dynamicHeight) / 2);
- }
+ };
// Returns the horizontal shift for the donut utilization legend
const getLegendDx = (dynamicTheme: ChartThemeDefinition, position: string) => {
@@ -520,7 +520,7 @@ export const ChartDonutThreshold: React.FunctionComponent {
@@ -536,11 +536,11 @@ export const ChartDonutThreshold: React.FunctionComponent {
return getLegendDy(dynamicTheme, position);
- }
+ };
// Render dynamic utilization donut cart
const renderChildren = () =>
- React.Children.toArray(children).map(child => {
+ React.Children.toArray(children).map((child) => {
if (child.props) {
const { data: childData, ...childProps } = child.props;
const datum = Data.formatData([childData], childProps, ['x', 'y']); // Format child data independently of this component's props
diff --git a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx
index 5549cb85d1a..59536336d51 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartDonutUtilization } from './ChartDonutUtilization';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartDonutUtilization`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartDonutUtilization', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.tsx b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.tsx
index 5aa0576b51b..a63bcf947c7 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartDonutUtilization/ChartDonutUtilization.tsx
@@ -14,7 +14,7 @@ import {
} from 'victory';
import { Data } from 'victory-core';
import { ChartContainer } from '../ChartContainer';
-import { ChartDonut, ChartDonutProps } from "../ChartDonut";
+import { ChartDonut, ChartDonutProps } from '../ChartDonut';
import { ChartThemeDefinition, ChartDonutUtilizationStyles } from '../ChartTheme';
import { getDonutUtilizationTheme } from '../ChartUtils';
@@ -22,22 +22,22 @@ export enum ChartDonutUtilizationLabelPosition {
centroid = 'centroid',
endAngle = 'endAngle',
startAngle = 'startAngle'
-};
+}
export enum ChartDonutUtilizationLegendOrientation {
horizontal = 'horizontal',
vertical = 'vertical'
-};
+}
export enum ChartDonutUtilizationLegendPosition {
bottom = 'bottom',
right = 'right'
-};
+}
export enum ChartDonutUtilizationSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
export enum ChartDonutUtilizationSubTitlePosition {
bottom = 'bottom',
@@ -251,7 +251,7 @@ export interface ChartDonutUtilizationProps extends ChartDonutProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback | string[] | number[]>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback | string[] | number[]>[];
/**
* ChartDonutUtilization uses the standard externalEventMutations prop.
*/
@@ -322,13 +322,13 @@ export interface ChartDonutUtilizationProps extends ChartDonutProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- legendData?: Array<{
+ legendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* Defines a horizontal shift from the x coordinate. It should not be set manually.
*/
@@ -561,7 +561,7 @@ export const ChartDonutUtilization: React.FunctionComponent {
const datum = [{ ...data }];
- return Data.formatData(datum, { x, y, ...rest }, ['x', 'y']).sort((a: any,b: any) => a._y - b._y);
+ return Data.formatData(datum, { x, y, ...rest }, ['x', 'y']).sort((a: any, b: any) => a._y - b._y);
};
// Returns thresholds with default color scale
diff --git a/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.test.tsx
index e299bb0d4b5..9041c15dcfe 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.test.tsx
@@ -3,8 +3,8 @@ import { shallow } from 'enzyme';
import { ChartArea } from '../ChartArea';
import { ChartGroup } from './ChartGroup';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartGroup`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartGroup', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.tsx b/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.tsx
index 08bdfad5c81..3c537dfddb8 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartGroup/ChartGroup.tsx
@@ -20,12 +20,12 @@ import {
} from 'victory';
import { ChartThemeDefinition } from '../ChartTheme';
import { getTheme } from '../ChartUtils';
-import {ChartContainer} from "../ChartContainer";
+import {ChartContainer} from '../ChartContainer';
export enum ChartGroupSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -172,7 +172,7 @@ export interface ChartGroupProps extends VictoryGroupProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", "all">[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', 'all'>[];
/**
* ChartGroup uses the standard externalEventMutations prop.
*/
@@ -286,7 +286,7 @@ export interface ChartGroupProps extends VictoryGroupProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The samples prop specifies how many individual points to plot when plotting
* y as a function of x. Samples is ignored if x props are provided instead.
@@ -403,7 +403,7 @@ export interface ChartGroupProps extends VictoryGroupProps {
* @example 'last_quarter_profit', () => 10, 1, 'employees.salary', ["employees", "salary"]
*/
y0?: DataGetterPropType;
-};
+}
export const ChartGroup: React.FunctionComponent = ({
allowZoom = false,
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.test.tsx
index da3d25043ca..9972c4be9c2 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartLabel } from './ChartLabel';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartLabel`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartLabel', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.tsx b/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.tsx
index 2030449bd69..e44899e124b 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLabel/ChartLabel.tsx
@@ -12,13 +12,13 @@ export enum ChartLabelDirection {
rtl = 'rtl',
ltr = 'ltr',
inherit = 'inherit'
-};
+}
export enum ChartLabelPlacement {
parallel = 'parallel',
perpendicular = 'perpendicular',
vertical = 'vertical'
-};
+}
type TextAnchorType = 'start' | 'middle' | 'end' | 'inherit';
@@ -164,7 +164,7 @@ export interface ChartLabelProps extends VictoryLabelProps {
* The y prop defines the y coordinate to use as a basis for vertical positioning.
*/
y?: number;
-};
+}
export const ChartLabel: React.FunctionComponent = ({
style,
@@ -177,7 +177,7 @@ export const ChartLabel: React.FunctionComponent = ({
});
const newStyle = Array.isArray(style) ? style.map(applyDefaultStyle) : applyDefaultStyle(style);
return ;
-}
+};
// Note: VictoryLabel.role must be hoisted
hoistNonReactStatics(ChartLabel, VictoryLabel);
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.test.tsx
index 4c6ab94dc49..9d4f6660e4b 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartLegend } from './ChartLegend';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartLegend`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartLegend', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.tsx b/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.tsx
index ddfe307c63c..281b879a0d4 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegend.tsx
@@ -20,18 +20,18 @@ import { getTheme } from '../ChartUtils';
export enum ChartLegendOrientation {
horizontal = 'horizontal',
vertical = 'vertical'
-};
+}
export enum ChartLegendPosition {
bottom = 'bottom',
bottomLeft = 'bottom-left',
right = 'right'
-};
+}
export enum ChartLegendRowGutter {
bottom = 'bottom',
top = 'top'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -97,13 +97,13 @@ export interface ChartLegendProps extends VictoryLegendProps {
* array of objects with name (required), symbol, and labels properties.
* The data prop must be given as an array.
*/
- data?: Array<{
+ data?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* The dataComponent prop takes a component instance which will be
* responsible for rendering a data element used to associate a symbol
@@ -124,7 +124,7 @@ export interface ChartLegendProps extends VictoryLegendProps {
/**
* ChartLegend uses the standard events prop.
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback>[];
/**
* ChartLegend uses the standard externalEventMutations prop.
*/
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegendWrapper.tsx b/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegendWrapper.tsx
index 59989df80f1..f494c462fce 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegendWrapper.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLegend/ChartLegendWrapper.tsx
@@ -1,12 +1,12 @@
import * as React from 'react';
-import { ChartLegendOrientation, ChartLegendPosition } from "../ChartLegend";
+import { ChartLegendOrientation, ChartLegendPosition } from '../ChartLegend';
import { ChartCommonStyles, ChartThemeDefinition } from '../ChartTheme';
-import { getLegendX, getLegendY, getTheme } from "../ChartUtils";
+import { getLegendX, getLegendY, getTheme } from '../ChartUtils';
export enum ChartLegendConfigChartType {
chart = 'chart',
pie = 'pie'
-};
+}
/**
* Helper to position a legend component within a component's SVG
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.test.tsx
index cc51b67156d..d1f9ec35543 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.test.tsx
@@ -4,8 +4,8 @@ import { Chart } from '../Chart';
import { ChartGroup } from '../ChartGroup';
import { ChartLine } from './ChartLine';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartLine`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartLine', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.tsx b/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.tsx
index a8ebe3a7396..0b50507a9a8 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartLine/ChartLine.tsx
@@ -22,7 +22,7 @@ import { getTheme } from '../ChartUtils';
export enum ChartLineSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -140,7 +140,7 @@ export interface ChartLineProps extends VictoryLineProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", number | string>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', number | string>[];
/**
* ChartLine uses the standard externalEventMutations prop.
*/
@@ -251,7 +251,7 @@ export interface ChartLineProps extends VictoryLineProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The samples prop specifies how many individual points to plot when plotting
* y as a function of x. Samples is ignored if x props are provided instead.
@@ -371,7 +371,7 @@ export interface ChartLineProps extends VictoryLineProps {
* @example 'last_quarter_profit', () => 10, 1, 'employees.salary', ["employees", "salary"]
*/
y0?: DataGetterPropType;
-};
+}
export const ChartLine: React.FunctionComponent = ({
themeColor,
diff --git a/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.test.tsx
index 5378bd28bb2..3bc3ff60c17 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.test.tsx
@@ -2,8 +2,8 @@ import * as React from 'react';
import { shallow } from 'enzyme';
import { ChartPie } from './ChartPie';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartPie`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartPie', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.tsx b/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.tsx
index c9b1fd59f62..2e4aae67ecc 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartPie/ChartPie.tsx
@@ -22,17 +22,17 @@ export enum ChartPieLabelPosition {
centroid = 'centroid',
endAngle = 'endAngle',
startAngle = 'startAngle'
-};
+}
export enum ChartPieLegendPosition {
bottom = 'bottom',
right = 'right'
-};
+}
export enum ChartPieSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -170,7 +170,7 @@ export interface ChartPieProps extends VictoryPieProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback | string[] | number[]>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback | string[] | number[]>[];
/**
* ChartPie uses the standard externalEventMutations prop.
*/
@@ -249,13 +249,13 @@ export interface ChartPieProps extends VictoryPieProps {
*
* @example legendData={[{ name: `GBps capacity - 45%` }, { name: 'Unused' }]}
*/
- legendData?: Array<{
+ legendData?: {
name?: string;
symbol?: {
fill?: string;
type?: string;
};
- }>;
+ }[];
/**
* Defines a horizontal shift from the x coordinate. It should not be set manually.
*/
@@ -526,7 +526,7 @@ export const ChartPie: React.FunctionComponent = ({
{getWrappedLegend()}
);
-}
+};
// Note: VictoryPie.role must be hoisted
hoistNonReactStatics(ChartPie, VictoryPie);
diff --git a/packages/patternfly-4/react-charts/src/components/ChartPoint/ChartPoint.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartPoint/ChartPoint.test.tsx
index d767bcb9e13..cbb16660766 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartPoint/ChartPoint.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartPoint/ChartPoint.test.tsx
@@ -3,8 +3,8 @@ import { shallow } from 'enzyme';
import { ChartLegend } from '../ChartLegend';
import { ChartPoint } from './ChartPoint';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartPoint`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartPoint', () => {
const view = shallow(} />);
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartPoint/path-helpers.ts b/packages/patternfly-4/react-charts/src/components/ChartPoint/path-helpers.ts
index 4156507f817..f1ced8fe8f4 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartPoint/path-helpers.ts
+++ b/packages/patternfly-4/react-charts/src/components/ChartPoint/path-helpers.ts
@@ -89,7 +89,7 @@ export const PathHelpers = {
const baseSize = 1.35 * size;
const angle = Math.PI / 5;
const range = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
- const starCoords = range.map(index => {
+ const starCoords = range.map((index) => {
const length = index % 2 === 0 ? baseSize : baseSize / 2;
return `${length * Math.sin(angle * (index + 1)) + x},
${length * Math.cos(angle * (index + 1)) + y}`;
diff --git a/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.test.tsx
index 2421b61497c..c6175d6e2f3 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.test.tsx
@@ -4,8 +4,8 @@ import { Chart } from '../Chart/Chart';
import { ChartGroup } from '../ChartGroup/ChartGroup';
import { ChartScatter } from './ChartScatter';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartScatter`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartScatter', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.tsx b/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.tsx
index 434ac68820f..a4277a0a24e 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartScatter/ChartScatter.tsx
@@ -22,7 +22,7 @@ import { getTheme } from '../ChartUtils';
export enum ChartScatterSortOrder {
ascending = 'ascending',
descending = 'descending'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -145,7 +145,7 @@ export interface ChartScatterProps extends VictoryScatterProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback>[];
/**
* ChartScatter uses the standard externalEventMutations prop.
*/
@@ -260,7 +260,7 @@ export interface ChartScatterProps extends VictoryScatterProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The samples prop specifies how many individual points to plot when plotting
* y as a function of x. Samples is ignored if x props are provided instead.
diff --git a/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.test.tsx
index 2bc1b689830..96ebbf158ac 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.test.tsx
@@ -4,8 +4,8 @@ import { Chart } from '../Chart';
import { ChartBar } from '../ChartBar';
import { ChartStack } from './ChartStack';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartStack`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartStack', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.tsx b/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.tsx
index 3eb38af205e..783207ad5ea 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartStack/ChartStack.tsx
@@ -136,7 +136,7 @@ export interface ChartStackProps extends VictoryStackProps {
* }
* ]}
*/
- events?: EventPropTypeInterface<"data" | "labels" | "parent", StringOrNumberOrCallback>[];
+ events?: EventPropTypeInterface<'data' | 'labels' | 'parent', StringOrNumberOrCallback>[];
/**
* ChartStack uses the standard externalEventMutations prop.
*/
@@ -243,7 +243,7 @@ export interface ChartStackProps extends VictoryStackProps {
* Cartesian: range={{ x: [50, 250], y: [50, 250] }}
* Polar: range={{ x: [0, 360], y: [0, 250] }}
*/
- range?: [number, number] | { x?: [number, number], y?: [number, number] }
+ range?: [number, number] | { x?: [number, number], y?: [number, number] };
/**
* The scale prop determines which scales your chart should use. This prop can be
* given as a string specifying a supported scale ("linear", "time", "log", "sqrt"),
diff --git a/packages/patternfly-4/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx
index a4ed9c26dcf..95b74833919 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartTooltip/ChartTooltip.test.tsx
@@ -5,8 +5,8 @@ import { ChartGroup } from '../ChartGroup';
import { ChartVoronoiContainer } from '../ChartVoronoiContainer';
import { ChartTooltip } from './ChartTooltip';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartTooltip`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartTooltip', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
@@ -15,7 +15,7 @@ Object.values([true, false]).forEach(isRead => {
test('allows tooltip via container component', () => {
const view = shallow(
"y: " + point.y} />}
+ containerComponent={ 'y: ' + point.y} />}
height={200}
width={200}
>
diff --git a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-domain.ts b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-domain.ts
index 501da9a2db8..109eb724110 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-domain.ts
+++ b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-domain.ts
@@ -1,6 +1,6 @@
-import * as React from "react";
+import * as React from 'react';
import { DataGetterPropType } from 'victory';
-import { Data } from "victory-core";
+import { Data } from 'victory-core';
interface DomainInterface {
data?: any;
@@ -19,7 +19,7 @@ interface SourcesInterface {
}[];
}
-export type ChartDomain = {x: [number, number], y: [number, number]};
+export interface ChartDomain {x: [number, number], y: [number, number]}
// Returns the min and max domain for given data
export const getDomain = ({
@@ -102,7 +102,7 @@ export const getDomains = ({
sources
}: SourcesInterface): ChartDomain => {
const domains: ChartDomain[] = [];
- sources.forEach(source => {
+ sources.forEach((source) => {
const {data: compData = source.data} = source.component ? source.component.props : undefined;
const domain = getDomain({
data: compData,
diff --git a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-label.ts b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-label.ts
index 69bc0ffd23a..019011e1aa3 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-label.ts
+++ b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-label.ts
@@ -1,5 +1,5 @@
import {ChartCommonStyles, ChartThemeDefinition} from '../ChartTheme';
-import { TextSize } from "victory-core";
+import { TextSize } from 'victory-core';
interface ChartLabelPaddingXInterface {
dx?: number; // Horizontal shift from the x coordinate
diff --git a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-legend.ts b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-legend.ts
index 03d47437683..434e849df78 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-legend.ts
+++ b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-legend.ts
@@ -1,9 +1,9 @@
import { VictoryLegend } from 'victory';
-import { TextSize } from "victory-core";
+import { TextSize } from 'victory-core';
import { ChartLegendProps } from '../ChartLegend';
import { ChartCommonStyles, ChartThemeDefinition } from '../ChartTheme';
import { overpassFontCharacterConstant } from './chart-label';
-import { getPaddingForSide } from "./chart-padding";
+import { getPaddingForSide } from './chart-padding';
interface ChartLegendPaddingXInterface {
chartWidth: number; // Width of chart (e.g., donut) within SVG
@@ -56,7 +56,7 @@ export const getLegendDimensions = ({
});
}
return {};
-}
+};
// Returns x coordinate for legend
export const getLegendX = ({
@@ -154,7 +154,7 @@ const getTextSizeWorkAround = ({
// For vertical legends, account for the growing char count of the longest legend item
if (legendOrientation === 'vertical') {
- legendData.forEach(data => {
+ legendData.forEach((data) => {
if (data.name && data.name.length > result.length) {
result = data.name;
}
diff --git a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-padding.ts b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-padding.ts
index eada3a8a6b1..a10859d6522 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-padding.ts
+++ b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-padding.ts
@@ -11,4 +11,4 @@ export const getPaddingForSide = (side: 'bottom' | 'left' | 'right' | 'top', pad
}
return getPaddingForSide(side, fallback, 0);
-}
+};
diff --git a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-theme.ts b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-theme.ts
index 443c792d3b9..8d9068f2fb5 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-theme.ts
+++ b/packages/patternfly-4/react-charts/src/components/ChartUtils/chart-theme.ts
@@ -46,10 +46,10 @@ export const getCustomTheme = (themeColor: string, themeVariant: string, customT
merge(getTheme(themeColor, themeVariant), customTheme);
// Returns axis theme
-export const getAxisTheme = (themeColor: string, themeVariant: string) : ChartThemeDefinition => {
+export const getAxisTheme = (themeColor: string, themeVariant: string): ChartThemeDefinition => {
const theme = getCustomTheme(themeColor, themeVariant, ChartAxisTheme);
return theme;
-}
+};
// Returns bullet chart theme
export const getBulletTheme = (themeColor: string, themeVariant: string): ChartThemeDefinition =>
diff --git a/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx b/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx
index 45b906b5a50..08625ba985f 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoContainer.test.tsx
@@ -4,8 +4,8 @@ import { ChartArea } from '../ChartArea';
import { ChartGroup } from '../ChartGroup';
import { ChartVoronoiContainer } from './ChartVoronoiContainer';
-Object.values([true, false]).forEach(isRead => {
- test(`ChartVoronoiContainer`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('ChartVoronoiContainer', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx b/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx
index 539aed72a02..b2ab3ea24c1 100644
--- a/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx
+++ b/packages/patternfly-4/react-charts/src/components/ChartVoronoiContainer/ChartVoronoiContainer.tsx
@@ -11,7 +11,7 @@ import { getTheme } from '../ChartUtils';
export enum ChartVoronoiDimension {
x = 'x',
y = 'y'
-};
+}
/**
* See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/victory/index.d.ts
@@ -105,7 +105,7 @@ export interface ChartVoronoiContainerProps extends VictoryVoronoiContainerProps
* position will be activated regardless of y value. When this prop is not given, voronoi selection
* is determined by both x any y values.
*/
- voronoiDimension?: "x" | "y";
+ voronoiDimension?: 'x' | 'y';
/**
* When the voronoiPadding prop is given, the area of the chart that will trigger voronoi events is
* reduced by the given padding on every side. By default, no padding is applied, and the entire range
@@ -127,7 +127,7 @@ export const ChartVoronoiContainer: React.FunctionComponent;
-}
+};
ChartVoronoiContainer.defaultProps = (VictoryVoronoiContainer as any).defaultProps;
// Note: VictoryVoronoiContainer.defaultEvents & VictoryContainer.role must be hoisted
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.test.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.test.tsx
index 0943cce4bbf..d54cb7ef581 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.test.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.test.tsx
@@ -8,7 +8,7 @@ const mockListener = jest.spyOn(ReactDOM, 'createPortal');
jest.spyOn(document, 'createElement');
jest.spyOn(document, 'addEventListener');
-mockListener.mockImplementation(node => node as React.ReactPortal);
+mockListener.mockImplementation((node) => node as React.ReactPortal);
const props = {
onClose: jest.fn(),
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.tsx
index 13adac7953f..ed04397bccb 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModal.tsx
@@ -27,7 +27,7 @@ export interface AboutModalProps {
backgroundImageSrc?: string;
/** Prevents the about modal from rendering content inside a container; allows for more flexible layouts */
noAboutModalBoxContentContainer?: boolean;
-};
+}
interface ModalState {
container: HTMLElement;
@@ -66,7 +66,7 @@ export class AboutModal extends React.Component {
if (event.keyCode === KEY_CODES.ESCAPE_KEY && this.props.isOpen) {
this.props.onClose();
}
- };
+ }
toggleSiblingsFromScreenReaders = (hide: boolean) => {
const bodyChildren = document.body.children;
@@ -75,7 +75,7 @@ export class AboutModal extends React.Component {
hide ? child.setAttribute('aria-hidden', '' + hide) : child.removeAttribute('aria-hidden');
}
}
- };
+ }
componentDidMount() {
const container = document.createElement('div');
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBox.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBox.tsx
index 11f67fe9488..c626bd35084 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBox.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBox.tsx
@@ -7,7 +7,7 @@ export interface AboutModalBoxProps extends React.HTMLProps {
children: React.ReactNode;
/** additional classes added to the AboutModalBox */
className?: string;
-};
+}
export const AboutModalBox: React.SFC = ({
children,
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx
index 524e6ca09f7..17a32182efa 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxBrand.tsx
@@ -9,7 +9,7 @@ export interface AboutModalBoxBrandProps extends React.HTMLProps
src?: string;
/** the alternate text of the Brand image. */
alt: string;
-};
+}
export const AboutModalBoxBrand: React.SFC = ({
className = '',
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx
index aea0ba56826..7049709da3f 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxCloseButton.tsx
@@ -9,7 +9,7 @@ export interface AboutModalBoxCloseButtonProps extends React.HTMLProps void;
-};
+}
export const AboutModalBoxCloseButton: React.SFC = ({
className = '',
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxContent.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxContent.tsx
index 82ed0e6fcd3..4201d246d6c 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxContent.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxContent.tsx
@@ -1,7 +1,6 @@
import * as React from 'react';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box';
-import titleStyles from '@patternfly/react-styles/css/components/Title/title';
import contentStyles from '@patternfly/react-styles/css/components/Content/content';
export interface AboutModalBoxContentProps extends React.HTMLProps {
@@ -15,7 +14,7 @@ export interface AboutModalBoxContentProps extends React.HTMLProps = ({
children,
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxHero.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxHero.tsx
index 790b2184042..f185ac5d9bc 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxHero.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalBoxHero.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/react-styles/css/components/AboutModalBox/about-modal-box';
-import { c_about_modal_box__hero_sm_BackgroundImage } from '@patternfly/react-tokens'
+import { c_about_modal_box__hero_sm_BackgroundImage } from '@patternfly/react-tokens';
export interface AboutModalBoxHeroProps extends React.HTMLProps {
/** additional classes added to the About Modal Hero */
diff --git a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalContainer.tsx b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalContainer.tsx
index c33e9470f38..30554b11685 100644
--- a/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalContainer.tsx
+++ b/packages/patternfly-4/react-core/src/components/AboutModal/AboutModalContainer.tsx
@@ -37,7 +37,7 @@ export interface AboutModalContainerProps extends React.HTMLProps = ({
children,
diff --git a/packages/patternfly-4/react-core/src/components/Alert/Alert.test.tsx b/packages/patternfly-4/react-core/src/components/Alert/Alert.test.tsx
index 7b7571615f7..9dcbd9b272b 100644
--- a/packages/patternfly-4/react-core/src/components/Alert/Alert.test.tsx
+++ b/packages/patternfly-4/react-core/src/components/Alert/Alert.test.tsx
@@ -6,11 +6,11 @@ import { AlertActionLink } from './AlertActionLink';
import { AlertActionCloseButton } from './AlertActionCloseButton';
test('default Alert variant is info', () => {
- const view = shallow(Alert testing)
+ const view = shallow(Alert testing);
expect(view.props().className).toMatch(/pf-m-info/);
-})
+});
-Object.values(AlertVariant).forEach(variant => {
+Object.values(AlertVariant).forEach((variant) => {
describe(`Alert - ${variant}`, () => {
test('Description', () => {
const view = mount(
diff --git a/packages/patternfly-4/react-core/src/components/Alert/Alert.tsx b/packages/patternfly-4/react-core/src/components/Alert/Alert.tsx
index c605c717485..eb3c03e93b8 100644
--- a/packages/patternfly-4/react-core/src/components/Alert/Alert.tsx
+++ b/packages/patternfly-4/react-core/src/components/Alert/Alert.tsx
@@ -29,10 +29,10 @@ export interface AlertProps
/** Additional classes added to the Alert */
className?: string;
/** Adds accessible text to the Alert */
- 'aria-label'?: string,
+ 'aria-label'?: string;
/** Variant label text for screen readers */
variantLabel?: string;
-};
+}
export const Alert: React.FunctionComponent = ({
variant = AlertVariant.info,
diff --git a/packages/patternfly-4/react-core/src/components/Alert/AlertActionCloseButton.tsx b/packages/patternfly-4/react-core/src/components/Alert/AlertActionCloseButton.tsx
index 6334fe03c2f..9ea591a73e4 100644
--- a/packages/patternfly-4/react-core/src/components/Alert/AlertActionCloseButton.tsx
+++ b/packages/patternfly-4/react-core/src/components/Alert/AlertActionCloseButton.tsx
@@ -11,7 +11,7 @@ interface AlertActionCloseButtonProps extends ButtonProps {
'aria-label'?: string;
/** Variant Label for the Close button */
variantLabel?: string;
-};
+}
export const AlertActionCloseButton = ({
className = '',
diff --git a/packages/patternfly-4/react-core/src/components/Alert/AlertActionLink.tsx b/packages/patternfly-4/react-core/src/components/Alert/AlertActionLink.tsx
index 43f62bd3bd8..1daeeacf6fc 100644
--- a/packages/patternfly-4/react-core/src/components/Alert/AlertActionLink.tsx
+++ b/packages/patternfly-4/react-core/src/components/Alert/AlertActionLink.tsx
@@ -6,7 +6,7 @@ export interface AlertActionLinkProps extends ButtonProps {
children?: string;
/** Additional classes added to the AlertActionLink */
className?: string;
-};
+}
export const AlertActionLink: React.FunctionComponent = ({
className = '',
diff --git a/packages/patternfly-4/react-core/src/components/Alert/AlertIcon.tsx b/packages/patternfly-4/react-core/src/components/Alert/AlertIcon.tsx
index 83e959d3cfb..24fae539106 100644
--- a/packages/patternfly-4/react-core/src/components/Alert/AlertIcon.tsx
+++ b/packages/patternfly-4/react-core/src/components/Alert/AlertIcon.tsx
@@ -22,7 +22,7 @@ export interface AlertIconProps extends React.HTMLProps {
variant: 'success' | 'danger' | 'warning' | 'info' | 'default';
/** className */
className?: string;
-};
+}
export const AlertIcon = ({
variant,
diff --git a/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx b/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx
index 07dc4d58bab..be2d66100b4 100644
--- a/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx
+++ b/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncher.tsx
@@ -33,23 +33,23 @@ export interface ApplicationLauncherProps extends React.HTMLProps {
static defaultProps = {
- className: '',
- isDisabled: false,
- direction: DropdownDirection.down,
- dropdownItems: [] as React.ReactNode[],
- items: [] as React.ReactNode[],
- isOpen: false,
- position: DropdownPosition.left,
- onSelect: (_event: any): any => undefined,
- onToggle: (_value: boolean): any => undefined,
+ "className": '',
+ "isDisabled": false,
+ "direction": DropdownDirection.down,
+ "dropdownItems": [] as React.ReactNode[],
+ "items": [] as React.ReactNode[],
+ "isOpen": false,
+ "position": DropdownPosition.left,
+ "onSelect": (_event: any): any => undefined,
+ "onToggle": (_value: boolean): any => undefined,
'aria-label': 'Application launcher',
- isGrouped: false,
- toggleIcon:
+ "isGrouped": false,
+ "toggleIcon":
};
render() {
const {
diff --git a/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncherItem.tsx b/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncherItem.tsx
index 1a64829ec6e..49fc2480c22 100644
--- a/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncherItem.tsx
+++ b/packages/patternfly-4/react-core/src/components/ApplicationLauncher/ApplicationLauncherItem.tsx
@@ -28,7 +28,7 @@ export const ApplicationLauncherItem: React.FunctionComponent (
- {
/** content rendered inside the backdrop */
- children?: React.ReactNode;
+ children?: React.ReactNode;
/** additional classes added to the button */
- className?: string;
+ className?: string;
}
export const Backdrop: React.FunctionComponent = ({
- children = null,
- className = '',
+ children = null,
+ className = '',
...props
}: BackdropProps) => (
{children}
-)
\ No newline at end of file
+);
diff --git a/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.test.tsx b/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.test.tsx
index 1038a53f6b0..f6a0f1fe5c8 100644
--- a/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.test.tsx
+++ b/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.test.tsx
@@ -11,8 +11,8 @@ const images = {
[BackgroundImageSrc.filter]: '/assets/images/background-filter.svg'
};
-Object.values([true, false]).forEach(isRead => {
- test(`BackgroundImage`, () => {
+Object.values([true, false]).forEach((isRead) => {
+ test('BackgroundImage', () => {
const view = shallow();
expect(view).toMatchSnapshot();
});
diff --git a/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.tsx b/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.tsx
index c3c66605642..485de49a518 100644
--- a/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.tsx
+++ b/packages/patternfly-4/react-core/src/components/BackgroundImage/BackgroundImage.tsx
@@ -20,7 +20,7 @@ export enum BackgroundImageSrc {
sm2x = 'sm2x',
lg = 'lg',
filter = 'filter'
-};
+}
const cssVariables = {
[BackgroundImageSrc.xs]: c_background_image_BackgroundImage && c_background_image_BackgroundImage.name,
@@ -31,23 +31,23 @@ const cssVariables = {
};
export interface BackgroundImageSrcMap {
- xs: string,
- xs2x: string,
- sm: string,
- sm2x: string,
- lg: string,
- filter?: string
-};
+ xs: string;
+ xs2x: string;
+ sm: string;
+ sm2x: string;
+ lg: string;
+ filter?: string;
+}
export interface BackgroundImageProps extends Omit, 'src'> {
/** Additional classes added to the background. */
- className?: string;
+ className?: string;
/** Override image styles using a string or BackgroundImageSrc */
- src: string | BackgroundImageSrcMap;
-};
+ src: string | BackgroundImageSrcMap;
+}
export const BackgroundImage: React.FunctionComponent = ({
- className = '',
+ className = '',
src,
...props
}: BackgroundImageProps) => {
@@ -66,8 +66,8 @@ export const BackgroundImage: React.FunctionComponent = ({
// Build stylesheet string based on cssVariables
let cssSheet = '';
- (Object.keys(cssVariables) as [keyof typeof srcMap]).forEach(size => {
- cssSheet += `${cssVariables[size as keyof typeof cssVariables]}: url('${srcMap[size]}');`
+ (Object.keys(cssVariables) as [keyof typeof srcMap]).forEach((size) => {
+ cssSheet += `${cssVariables[size as keyof typeof cssVariables]}: url('${srcMap[size]}');`;
});
// Create emotion stylesheet to inject new css
@@ -75,7 +75,7 @@ export const BackgroundImage: React.FunctionComponent = ({
bgOverrides: `&.pf-c-background-image {
${cssSheet}
}`});
-
+
return (