Skip to content

Commit fd86f23

Browse files
committed
Fix lint errors
1 parent 7088af2 commit fd86f23

20 files changed

+32
-32
lines changed

cypress/component/BulkSelect.cy.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ const BulkSelectTestComponent = ({
99
canSelectAll,
1010
isDataPaginated
1111
}: Omit<BulkSelectProps, 'onSelect' | 'selectedCount'>) => {
12-
const [selected, setSelected] = useState<DataItem[]>([]);
12+
const [ selected, setSelected ] = useState<DataItem[]>([]);
1313

14-
const allData = [{ name: '1' }, { name: '2' }, { name: '3' }, { name: '4' }, { name: '5' }, { name: '6' }];
15-
const pageData = [{ name: '1' }, { name: '2' }, { name: '3' }, { name: '4' }, { name: '5' }];
14+
const allData = [ { name: '1' }, { name: '2' }, { name: '3' }, { name: '4' }, { name: '5' }, { name: '6' } ];
15+
const pageData = [ { name: '1' }, { name: '2' }, { name: '3' }, { name: '4' }, { name: '5' } ];
1616
const pageDataNames = pageData.map((item) => item.name);
1717
const pageSelected = pageDataNames.every((item) => selected.find((selectedItem) => selectedItem.name === item));
1818

1919
const handleBulkSelect = (value: BulkSelectValue) => {
2020
if (value === BulkSelectValue.page) {
21-
const updatedSelection = [...selected];
21+
const updatedSelection = [ ...selected ];
2222
pageData.forEach(
2323
(item) =>
2424
!updatedSelection.some((selectedItem) => selectedItem.name === item.name) && updatedSelection.push(item)

packages/module/patternfly-docs/content/extensions/component-groups/examples/BulkSelect/BulkSelectAllExample.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { FunctionComponent, useState } from 'react';
22
import { BulkSelect, BulkSelectValue } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect';
33

4-
const allData = ['Item 1', 'Item 2', 'Item 3', 'Item4', 'Item 5'];
5-
const pageData = ['Item 1', 'Item 2'];
4+
const allData = [ 'Item 1', 'Item 2', 'Item 3', 'Item4', 'Item 5' ];
5+
const pageData = [ 'Item 1', 'Item 2' ];
66

77
export const BasicExample: FunctionComponent = () => {
8-
const [selected, setSelected] = useState<string[]>(pageData);
8+
const [ selected, setSelected ] = useState<string[]>(pageData);
99

1010
const handleBulkSelect = (value: BulkSelectValue) => {
1111
value === BulkSelectValue.none && setSelected([]);
1212
value === BulkSelectValue.all && setSelected(allData);
1313
value === BulkSelectValue.nonePage && setSelected(selected.filter((item) => !pageData.includes(item)));
14-
value === BulkSelectValue.page && setSelected(Array.from(new Set([...selected, ...pageData])));
14+
value === BulkSelectValue.page && setSelected(Array.from(new Set([ ...selected, ...pageData ])));
1515
};
1616

1717
return (

packages/module/patternfly-docs/content/extensions/component-groups/examples/BulkSelect/BulkSelectExample.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { FunctionComponent, useState } from 'react';
22
import { BulkSelect, BulkSelectValue } from '@patternfly/react-component-groups/dist/dynamic/BulkSelect';
33

4-
const allData = ['Item 1', 'Item 2', 'Item 3', 'Item4', 'Item 5'];
5-
const pageData = ['Item 1', 'Item 2'];
4+
const allData = [ 'Item 1', 'Item 2', 'Item 3', 'Item4', 'Item 5' ];
5+
const pageData = [ 'Item 1', 'Item 2' ];
66

77
export const BasicExample: FunctionComponent = () => {
8-
const [selected, setSelected] = useState<string[]>([]);
8+
const [ selected, setSelected ] = useState<string[]>([]);
99

1010
const handleBulkSelect = (value: BulkSelectValue) => {
1111
value === BulkSelectValue.none && setSelected([]);
1212
value === BulkSelectValue.all && setSelected(allData);
1313
value === BulkSelectValue.nonePage && setSelected(selected.filter((item) => !pageData.includes(item)));
14-
value === BulkSelectValue.page && setSelected(Array.from(new Set([...selected, ...pageData])));
14+
value === BulkSelectValue.page && setSelected(Array.from(new Set([ ...selected, ...pageData ])));
1515
};
1616

1717
return (

packages/module/patternfly-docs/content/extensions/component-groups/examples/ColumnManagementModal/ColumnManagementModalExample.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ const ROWS = [
6262
];
6363

6464
export const ColumnManagementModalExample: FunctionComponent = () => {
65-
const [columns, setColumns] = useState(DEFAULT_COLUMNS);
66-
const [isOpen, setOpen] = useState(false);
65+
const [ columns, setColumns ] = useState(DEFAULT_COLUMNS);
66+
const [ isOpen, setOpen ] = useState(false);
6767

6868
return (
6969
<>

packages/module/patternfly-docs/content/extensions/component-groups/examples/ErrorBoundary/ErrorBoundaryExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Title, Button, Card, CardBody, CardFooter, CardHeader } from '@patternf
33
import ErrorBoundary from '@patternfly/react-component-groups/dist/dynamic/ErrorBoundary';
44

55
export const BasicExample: FunctionComponent = () => {
6-
const [hasError, setHasError] = useState(false);
6+
const [ hasError, setHasError ] = useState(false);
77

88
const Surprise = () => {
99
if (hasError) {

packages/module/patternfly-docs/content/extensions/component-groups/examples/MultiContentCard/MultiContentCardExpandableActionsExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const useStyles = createUseStyles({
3232

3333
export const BasicExample: FunctionComponent = () => {
3434
const classes = useStyles();
35-
const [isMenuOpen, setMenuOpen] = useState(false);
35+
const [ isMenuOpen, setMenuOpen ] = useState(false);
3636

3737
const cards = [
3838
<Card isFullHeight isPlain key="card-1">

packages/module/patternfly-docs/content/extensions/component-groups/examples/PageHeader/PageHeaderActionsExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
import { EllipsisVIcon } from '@patternfly/react-icons';
1313

1414
export const ActionsExample: FunctionComponent = () => {
15-
const [isOpen, setIsOpen] = useState(false);
15+
const [ isOpen, setIsOpen ] = useState(false);
1616

1717
const onToggle = () => {
1818
setIsOpen(!isOpen);

packages/module/patternfly-docs/content/extensions/component-groups/examples/ResponsiveActions/ResponsiveActionsBreakpointExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ResponsiveActions } from '@patternfly/react-component-groups/dist/dynam
44
import { ResponsiveAction } from '@patternfly/react-component-groups/dist/dynamic/ResponsiveAction';
55

66
export const ResponsiveActionsBreakpointExample: FunctionComponent = () => {
7-
const [containerWidth, setContainerWidth] = useState(100);
7+
const [ containerWidth, setContainerWidth ] = useState(100);
88
const containerRef = useRef<HTMLDivElement>(null);
99

1010
const onChange = (_event: SliderOnChangeEvent, value: number) => {

packages/module/patternfly-docs/content/extensions/component-groups/examples/ShortcutGrid/ShortcutExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { FunctionComponent } from 'react';
22
import Shortcut from '@patternfly/react-component-groups/dist/dynamic/Shortcut';
33

44
export const BasicExample: FunctionComponent = () => (
5-
<Shortcut description="Shortcut description" keys={['cmd', 'shift']} click />
5+
<Shortcut description="Shortcut description" keys={[ 'cmd', 'shift' ]} click />
66
);

packages/module/patternfly-docs/content/extensions/component-groups/examples/ShortcutGrid/ShortcutGridExample.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import ShortcutGrid from '@patternfly/react-component-groups/dist/dynamic/Shortc
44
export const BasicExample: FunctionComponent = () => (
55
<ShortcutGrid
66
shortcuts={[
7-
{ description: 'Open new tab', keys: ['cmd', 'shift', 't'] },
8-
{ description: 'Open new page', keys: ['opt', 'n'] },
9-
{ description: 'Move object', keys: ['ctrl'], drag: true }
7+
{ description: 'Open new tab', keys: [ 'cmd', 'shift', 't' ] },
8+
{ description: 'Open new page', keys: [ 'opt', 'n' ] },
9+
{ description: 'Move object', keys: [ 'ctrl' ], drag: true }
1010
]}
1111
/>
1212
);

packages/module/patternfly-docs/content/extensions/component-groups/examples/SkeletonTable/SkeletonTableCompactExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import SkeletonTable from '@patternfly/react-component-groups/dist/dynamic/Skele
33
import { TableVariant } from '@patternfly/react-table';
44

55
export const SkeletonTableExample: FC = () => (
6-
<SkeletonTable rowsCount={10} columns={['First', 'Second']} variant={TableVariant.compact} borders={false} />
6+
<SkeletonTable rowsCount={10} columns={[ 'First', 'Second' ]} variant={TableVariant.compact} borders={false} />
77
);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { FC } from 'react';
22
import SkeletonTable from '@patternfly/react-component-groups/dist/dynamic/SkeletonTable';
33

4-
export const SkeletonTableExample: FC = () => <SkeletonTable rowsCount={10} columns={['First', 'Second']} />;
4+
export const SkeletonTableExample: FC = () => <SkeletonTable rowsCount={10} columns={[ 'First', 'Second' ]} />;

packages/module/patternfly-docs/content/extensions/component-groups/examples/SkeletonTable/SkeletonTableExpandableExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { FC } from 'react';
22
import SkeletonTable from '@patternfly/react-component-groups/dist/dynamic/SkeletonTable';
33

44
export const SkeletonTableExample: FC = () => (
5-
<SkeletonTable rowsCount={10} columns={['First', 'Second']} isExpandable />
5+
<SkeletonTable rowsCount={10} columns={[ 'First', 'Second' ]} isExpandable />
66
);

packages/module/patternfly-docs/content/extensions/component-groups/examples/SkeletonTable/SkeletonTableHeadExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ import SkeletonTableHead from '@patternfly/react-component-groups/dist/dynamic/S
44

55
export const SkeletonTableHeadExample: FC = () => (
66
<Table>
7-
<SkeletonTableHead columns={['First', 'Second']} />
7+
<SkeletonTableHead columns={[ 'First', 'Second' ]} />
88
</Table>
99
);

packages/module/patternfly-docs/content/extensions/component-groups/examples/SkeletonTable/SkeletonTableLoadingExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ interface Repository {
1212
}
1313

1414
export const SkeletonTableExample: FC = () => {
15-
const [isLoaded, setIsLoaded] = useState(false);
15+
const [ isLoaded, setIsLoaded ] = useState(false);
1616

1717
const loadData = () => {
1818
setIsLoaded(false);

packages/module/patternfly-docs/content/extensions/component-groups/examples/SkeletonTable/SkeletonTableSelectableExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import SkeletonTable from '@patternfly/react-component-groups/dist/dynamic/Skele
33
import { RowSelectVariant } from '@patternfly/react-table';
44

55
export const SkeletonTableExample: FC = () => (
6-
<SkeletonTable rowsCount={10} columns={['First', 'Second']} isSelectable selectVariant={RowSelectVariant.radio} />
6+
<SkeletonTable rowsCount={10} columns={[ 'First', 'Second' ]} isSelectable selectVariant={RowSelectVariant.radio} />
77
);

packages/module/patternfly-docs/content/extensions/component-groups/examples/WarningModal/WarningModalCheckboxExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import WarningModal from '@patternfly/react-component-groups/dist/dynamic/Warnin
33
import { Button, ButtonVariant } from '@patternfly/react-core';
44

55
export const BasicExample: FunctionComponent = () => {
6-
const [isOpen, setIsOpen] = useState(false);
6+
const [ isOpen, setIsOpen ] = useState(false);
77
return (
88
<>
99
<Button onClick={() => setIsOpen(true)}>Open modal</Button>

packages/module/patternfly-docs/content/extensions/component-groups/examples/WarningModal/WarningModalDangerExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import WarningModal from '@patternfly/react-component-groups/dist/dynamic/Warnin
33
import { Button, ButtonVariant } from '@patternfly/react-core';
44

55
export const BasicExample: FunctionComponent = () => {
6-
const [isOpen, setIsOpen] = useState(false);
6+
const [ isOpen, setIsOpen ] = useState(false);
77
return (
88
<>
99
<Button onClick={() => setIsOpen(true)}>Open modal</Button>

packages/module/patternfly-docs/content/extensions/component-groups/examples/WarningModal/WarningModalExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import WarningModal from '@patternfly/react-component-groups/dist/dynamic/Warnin
33
import { Button } from '@patternfly/react-core';
44

55
export const BasicExample: FunctionComponent = () => {
6-
const [isOpen, setIsOpen] = useState(false);
6+
const [ isOpen, setIsOpen ] = useState(false);
77
return (
88
<>
99
<Button onClick={() => setIsOpen(true)}>Open modal</Button>

packages/module/patternfly-docs/content/extensions/component-groups/examples/WarningModal/WarningModalTextConfirmationExample.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import WarningModal from '@patternfly/react-component-groups/dist/dynamic/Warnin
33
import { Button } from '@patternfly/react-core';
44

55
export const BasicExample: FunctionComponent = () => {
6-
const [isOpen, setIsOpen] = useState(false);
6+
const [ isOpen, setIsOpen ] = useState(false);
77
return (
88
<>
99
<Button onClick={() => setIsOpen(true)}>Open modal</Button>

0 commit comments

Comments
 (0)