Skip to content

Commit b2dec8f

Browse files
committed
style(lint): fix all formatting issues
1 parent 3eee033 commit b2dec8f

File tree

5 files changed

+16
-9
lines changed

5 files changed

+16
-9
lines changed

src/components/AccordionItem.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import DisplayName from '../helpers/DisplayName';
33
import { DivAttributes } from '../helpers/types';
4-
import { nextUuid, assertValidHtmlId } from '../helpers/uuid';
4+
import { assertValidHtmlId, nextUuid } from '../helpers/uuid';
55
import {
66
Consumer as ItemConsumer,
77
ItemContext,
@@ -43,7 +43,9 @@ export default class AccordionItem extends React.Component<Props> {
4343
render(): JSX.Element {
4444
const { uuid = this.instanceUuid, dangerouslySetExpanded } = this.props;
4545

46-
if (rest.id) assertValidHtmlId(rest.id);
46+
if (rest.id) {
47+
assertValidHtmlId(rest.id);
48+
}
4749

4850
return (
4951
<ItemProvider

src/components/AccordionItemButton.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import {
99
} from '../helpers/focus';
1010
import keycodes from '../helpers/keycodes';
1111
import { DivAttributes } from '../helpers/types';
12+
import { assertValidHtmlId } from '../helpers/uuid';
1213

1314
import { Consumer as ItemConsumer, ItemContext } from './ItemContext';
14-
import { assertValidHtmlId } from '../helpers/uuid';
1515

1616
type Props = DivAttributes & {
1717
toggleExpanded(): void;
@@ -71,7 +71,9 @@ export class AccordionItemButton extends React.PureComponent<Props> {
7171
render(): JSX.Element {
7272
const { toggleExpanded, ...rest } = this.props;
7373

74-
if (rest.id) assertValidHtmlId(rest.id);
74+
if (rest.id) {
75+
assertValidHtmlId(rest.id);
76+
}
7577

7678
return (
7779
<div

src/components/AccordionItemHeading.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import * as React from 'react';
22
import { InjectedHeadingAttributes } from '../helpers/AccordionStore';
33
import DisplayName from '../helpers/DisplayName';
44
import { DivAttributes } from '../helpers/types';
5+
import { assertValidHtmlId } from '../helpers/uuid';
56

67
import { Consumer as ItemConsumer, ItemContext } from './ItemContext';
7-
import { assertValidHtmlId } from '../helpers/uuid';
88

99
type Props = DivAttributes;
1010

@@ -78,7 +78,9 @@ const AccordionItemHeadingWrapper: React.SFC<DivAttributes> = (
7878
{(itemContext: ItemContext): JSX.Element => {
7979
const { headingAttributes } = itemContext;
8080

81-
if (props.id) assertValidHtmlId(props.id);
81+
if (props.id) {
82+
assertValidHtmlId(props.id);
83+
}
8284

8385
return <AccordionItemHeading {...props} {...headingAttributes} />;
8486
}}

src/components/AccordionItemPanel.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
22
import DisplayName from '../helpers/DisplayName';
33
import { DivAttributes } from '../helpers/types';
4-
import { Consumer as ItemConsumer, ItemContext } from './ItemContext';
54
import { assertValidHtmlId } from '../helpers/uuid';
5+
import { Consumer as ItemConsumer, ItemContext } from './ItemContext';
66

77
type Props = DivAttributes;
88

@@ -17,7 +17,9 @@ export default class AccordionItemPanel extends React.Component<Props> {
1717
DisplayName.AccordionItemPanel;
1818

1919
renderChildren = ({ panelAttributes }: ItemContext): JSX.Element => {
20-
if (this.props.id) assertValidHtmlId(this.props.id);
20+
if (this.props.id) {
21+
assertValidHtmlId(this.props.id);
22+
}
2123

2224
return (
2325
<div

src/helpers/uuid.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ describe('UUID helper', () => {
2020
describe('assertValidHtmlId', () => {
2121
it("returns false in case there's a whitespace or an empty string", () => {
2222
expect(assertValidHtmlId('a a')).toBe(false);
23-
expect(assertValidHtmlId('a a')).toBe(false);
2423
expect(assertValidHtmlId('')).toBe(false);
2524
});
2625

0 commit comments

Comments
 (0)