diff --git a/packages/core/src/components/popover/popover.tsx b/packages/core/src/components/popover/popover.tsx index e625a81dc0e..4d336c4cd1f 100644 --- a/packages/core/src/components/popover/popover.tsx +++ b/packages/core/src/components/popover/popover.tsx @@ -507,10 +507,7 @@ export class Popover extends AbstractPureComponent } private isArrowEnabled() { - const { - minimal, - modifiers: { arrow }, - } = this.props; + const { minimal, modifiers: { arrow } } = this.props; // omitting `arrow` from `modifiers` uses Popper default, which does show an arrow. return !minimal && (arrow == null || arrow.enabled); } diff --git a/packages/core/src/components/slider/handle.tsx b/packages/core/src/components/slider/handle.tsx index c50a54571d6..aefe418e06d 100644 --- a/packages/core/src/components/slider/handle.tsx +++ b/packages/core/src/components/slider/handle.tsx @@ -223,12 +223,8 @@ export class Handle extends AbstractPureComponent boolean = () => true) { - const maybeHandles = React.Children.map(children, child => - Utils.isElementOfType(child, MultiSlider.Handle) && predicate(child.props) ? child.props : null, + const maybeHandles = React.Children.map( + children, + child => (Utils.isElementOfType(child, MultiSlider.Handle) && predicate(child.props) ? child.props : null), ); let handles = maybeHandles != null ? maybeHandles : []; handles = handles.filter(handle => handle !== null); diff --git a/packages/core/src/components/spinner/spinner.tsx b/packages/core/src/components/spinner/spinner.tsx index e2175043453..c74c9b537ab 100644 --- a/packages/core/src/components/spinner/spinner.tsx +++ b/packages/core/src/components/spinner/spinner.tsx @@ -81,7 +81,7 @@ export class Spinner extends AbstractPureComponent { ); // keep spinner track width consistent at all sizes (down to about 10px). - const strokeWidth = Math.min(MIN_STROKE_WIDTH, (STROKE_WIDTH * Spinner.SIZE_LARGE) / size); + const strokeWidth = Math.min(MIN_STROKE_WIDTH, STROKE_WIDTH * Spinner.SIZE_LARGE / size); const strokeOffset = PATH_LENGTH - PATH_LENGTH * (value == null ? 0.25 : clamp(value, 0, 1)); diff --git a/packages/core/test/popover/popoverTests.tsx b/packages/core/test/popover/popoverTests.tsx index 4a0eeed1ec7..2d5bba5b882 100644 --- a/packages/core/test/popover/popoverTests.tsx +++ b/packages/core/test/popover/popoverTests.tsx @@ -597,14 +597,16 @@ describe("", () => { afterEach(() => root.detach()); it("shows tooltip on hover", () => { - root.find(`.${Classes.POPOVER_TARGET}`) + root + .find(`.${Classes.POPOVER_TARGET}`) .last() .simulate("mouseenter"); assert.lengthOf(root.find(`.${Classes.TOOLTIP}`), 1); }); it("shows popover on click", () => { - root.find(`.${Classes.POPOVER_TARGET}`) + root + .find(`.${Classes.POPOVER_TARGET}`) .first() .simulate("click"); assert.lengthOf(root.find(`.${Classes.POPOVER}`), 1); diff --git a/packages/datetime/src/datePicker.tsx b/packages/datetime/src/datePicker.tsx index 389bf6d5747..a5cdd9650c4 100644 --- a/packages/datetime/src/datePicker.tsx +++ b/packages/datetime/src/datePicker.tsx @@ -188,9 +188,7 @@ export class DatePicker extends AbstractPureComponent !DateUtils.isDayInRange(day, [this.props.minDate, this.props.maxDate]); private getDisabledDaysModifier = () => { - const { - dayPickerProps: { disabledDays }, - } = this.props; + const { dayPickerProps: { disabledDays } } = this.props; return Array.isArray(disabledDays) ? [this.disabledDays, ...disabledDays] : [this.disabledDays, disabledDays]; }; diff --git a/packages/datetime/src/dateRangePicker.tsx b/packages/datetime/src/dateRangePicker.tsx index d6669d6971f..6b49f3d679d 100644 --- a/packages/datetime/src/dateRangePicker.tsx +++ b/packages/datetime/src/dateRangePicker.tsx @@ -144,10 +144,7 @@ export class DateRangePicker extends AbstractPureComponent DateUtils.areSameDay(this.state.value[1], day), [HOVERED_RANGE_MODIFIER]: day => { - const { - hoverValue, - value: [selectedStart, selectedEnd], - } = this.state; + const { hoverValue, value: [selectedStart, selectedEnd] } = this.state; if (selectedStart == null && selectedEnd == null) { return false; } @@ -266,9 +263,7 @@ export class DateRangePicker extends AbstractPureComponent !DateUtils.isDayInRange(day, [this.props.minDate, this.props.maxDate]); private getDisabledDaysModifier = () => { - const { - dayPickerProps: { disabledDays }, - } = this.props; + const { dayPickerProps: { disabledDays } } = this.props; return disabledDays instanceof Array ? [this.disabledDays, ...disabledDays] : [this.disabledDays, disabledDays]; }; diff --git a/packages/datetime/test/dateInputTests.tsx b/packages/datetime/test/dateInputTests.tsx index 55ce8e64ae3..6c40ccbd42a 100644 --- a/packages/datetime/test/dateInputTests.tsx +++ b/packages/datetime/test/dateInputTests.tsx @@ -124,7 +124,8 @@ describe("", () => { const defaultValue = new Date(2018, Months.FEBRUARY, 6, 15, 0, 0, 0); const { root, changeSelect } = wrap(); root.setState({ isOpen: true }); - root.find("input") + root + .find("input") .simulate("focus") .simulate("blur"); changeSelect(Classes.DATEPICKER_MONTH_SELECT, Months.FEBRUARY); @@ -135,7 +136,8 @@ describe("", () => { const defaultValue = new Date(2018, Months.FEBRUARY, 6, 15, 0, 0, 0); const { root, changeSelect } = wrap(); root.setState({ isOpen: true }); - root.find("input") + root + .find("input") .simulate("focus") .simulate("blur"); changeSelect(Classes.DATEPICKER_YEAR_SELECT, 2016); diff --git a/packages/datetime/test/datePickerTests.tsx b/packages/datetime/test/datePickerTests.tsx index 7af3f9ad136..dc9b712658c 100644 --- a/packages/datetime/test/datePickerTests.tsx +++ b/packages/datetime/test/datePickerTests.tsx @@ -137,7 +137,8 @@ describe("", () => { it("calls onMonthChange on button next click", () => { const onMonthChange = sinon.spy(); const { root } = wrap(); - root.find(".DayPicker-NavButton--next") + root + .find(".DayPicker-NavButton--next") .first() .simulate("click"); assert.isTrue(onMonthChange.called); @@ -146,7 +147,8 @@ describe("", () => { it("calls onMonthChange on button prev click", () => { const onMonthChange = sinon.spy(); const { root } = wrap(); - root.find(".DayPicker-NavButton--prev") + root + .find(".DayPicker-NavButton--prev") .first() .simulate("click"); assert.isTrue(onMonthChange.called); @@ -155,7 +157,8 @@ describe("", () => { it("calls onMonthChange on month select change", () => { const onMonthChange = sinon.spy(); const { root } = wrap(); - root.find({ className: Classes.DATEPICKER_MONTH_SELECT }) + root + .find({ className: Classes.DATEPICKER_MONTH_SELECT }) .first() .find("select") .simulate("change"); @@ -165,7 +168,8 @@ describe("", () => { it("calls onMonthChange on year select change", () => { const onMonthChange = sinon.spy(); const { root } = wrap(); - root.find({ className: Classes.DATEPICKER_YEAR_SELECT }) + root + .find({ className: Classes.DATEPICKER_YEAR_SELECT }) .first() .find("select") .simulate("change"); @@ -499,7 +503,8 @@ describe("", () => { />, ); assert.isTrue(onChangeSpy.notCalled); - root.find(`.${Classes.TIMEPICKER_ARROW_BUTTON}.${Classes.TIMEPICKER_HOUR}`) + root + .find(`.${Classes.TIMEPICKER_ARROW_BUTTON}.${Classes.TIMEPICKER_HOUR}`) .first() .simulate("click"); assert.isTrue(onChangeSpy.calledOnce); @@ -553,7 +558,8 @@ describe("", () => { it("selects the current day when Today is clicked", () => { const { root } = wrap(); - root.find({ className: Classes.DATEPICKER_FOOTER }) + root + .find({ className: Classes.DATEPICKER_FOOTER }) .find(Button) .first() .simulate("click"); @@ -568,7 +574,8 @@ describe("", () => { it("clears the value when Clear is clicked", () => { const { getDay, root } = wrap(); getDay().simulate("click"); - root.find({ className: Classes.DATEPICKER_FOOTER }) + root + .find({ className: Classes.DATEPICKER_FOOTER }) .find(Button) .last() .simulate("click"); diff --git a/packages/datetime/test/dateRangePickerTests.tsx b/packages/datetime/test/dateRangePickerTests.tsx index 1e31dfeb820..625bf2e462b 100644 --- a/packages/datetime/test/dateRangePickerTests.tsx +++ b/packages/datetime/test/dateRangePickerTests.tsx @@ -714,7 +714,8 @@ describe("", () => { describe("when only end date is defined", () => { it("should show a hovered range of [end, day] if day > end", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .clickDay(14) // deselect start date .mouseEnterDay(22); @@ -723,7 +724,8 @@ describe("", () => { it("should show a hovered range of [null, null] if day === end", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .clickDay(14) .mouseEnterDay(18); @@ -732,7 +734,8 @@ describe("", () => { it("should show a hovered range of [day, end] if day < end", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .clickDay(14) .mouseEnterDay(14); @@ -743,7 +746,8 @@ describe("", () => { describe("when both start and end date are defined", () => { it("should show a hovered range of [null, end] if day === start", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .mouseEnterDay(14); assertHoveredDays(null, 18); @@ -751,7 +755,8 @@ describe("", () => { it("should show a hovered range of [start, null] if day === end", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .mouseEnterDay(18); assertHoveredDays(14, null); @@ -759,7 +764,8 @@ describe("", () => { it("should show a hovered range of [day, null] if start < day < end", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .mouseEnterDay(16); assertHoveredDays(16, null); @@ -767,7 +773,8 @@ describe("", () => { it("should show a hovered range of [day, null] if day < start", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .mouseEnterDay(10); assertHoveredDays(10, null); @@ -775,7 +782,8 @@ describe("", () => { it("should show a hovered range of [day, null] if day > end", () => { const { left, assertHoveredDays } = render(); - left.clickDay(14) + left + .clickDay(14) .clickDay(18) .mouseEnterDay(22); assertHoveredDays(22, null); @@ -783,7 +791,8 @@ describe("", () => { it("should show a hovered range of [null, null] if start === day === end", () => { const { left, assertHoveredDays } = render({ allowSingleDayRange: true }); - left.clickDay(14) + left + .clickDay(14) .clickDay(14) .mouseEnterDay(14); assertHoveredDays(null, null); @@ -975,7 +984,8 @@ describe("", () => { it("onHoverChange fired with `undefined` on mouseleave within a day", () => { const { left } = render({ initialMonth: new Date(2015, Months.JANUARY, 1) }); assert.isTrue(onHoverChangeSpy.notCalled); - left.clickDay(1) + left + .clickDay(1) .findDay(5) .simulate("mouseleave"); assert.isTrue(onHoverChangeSpy.calledTwice); @@ -1018,7 +1028,8 @@ describe("", () => { it("deselects endpoint when an endpoint of the current selection is clicked", () => { const { assertSelectedDays, left } = render({ initialMonth: new Date(2015, Months.JANUARY, 1) }); - left.clickDay(10) + left + .clickDay(10) .clickDay(14) .clickDay(10); assertSelectedDays(14); diff --git a/packages/datetime/test/dateTimePickerTests.tsx b/packages/datetime/test/dateTimePickerTests.tsx index b8e34193d6c..d3c163e491e 100644 --- a/packages/datetime/test/dateTimePickerTests.tsx +++ b/packages/datetime/test/dateTimePickerTests.tsx @@ -55,7 +55,8 @@ describe("", () => { />, ); assert.isTrue(onChangeSpy.notCalled); - root.find(`.${Classes.TIMEPICKER_ARROW_BUTTON}.${Classes.TIMEPICKER_HOUR}`) + root + .find(`.${Classes.TIMEPICKER_ARROW_BUTTON}.${Classes.TIMEPICKER_HOUR}`) .first() .simulate("click"); assert.isTrue(onChangeSpy.calledOnce); @@ -79,7 +80,8 @@ describe("", () => { , ); getDay(5).simulate("click"); - root.find(`.${Classes.TIMEPICKER_ARROW_BUTTON}.${Classes.TIMEPICKER_HOUR}`) + root + .find(`.${Classes.TIMEPICKER_ARROW_BUTTON}.${Classes.TIMEPICKER_HOUR}`) .first() .simulate("click"); getDay(15).simulate("click"); diff --git a/packages/docs-app/src/components/colorPalettes.tsx b/packages/docs-app/src/components/colorPalettes.tsx index 0d9617c0342..ccde74c2db3 100644 --- a/packages/docs-app/src/components/colorPalettes.tsx +++ b/packages/docs-app/src/components/colorPalettes.tsx @@ -58,9 +58,7 @@ const ColorSwatch: React.SFC<{ colorName: string; hexCode: string }> = ({ colorN // vertical list of swatches for each color const ColorPalette: React.SFC<{ colors: string[] }> = ({ colors }) => (
- {colors.map((name, i) => ( - - ))} + {colors.map((name, i) => )}
); @@ -94,9 +92,7 @@ export const ColorBar: React.SFC<{ colors: string[] }> = ({ colors }) => { function createPaletteBook(palettes: string[][], className?: string): React.SFC<{}> { return () => (
- {palettes.map((palette, index) => ( - - ))} + {palettes.map((palette, index) => )}
); } diff --git a/packages/docs-app/src/examples/core-examples/panelStackExample.tsx b/packages/docs-app/src/examples/core-examples/panelStackExample.tsx index e2d2650b6e6..68c3a673758 100644 --- a/packages/docs-app/src/examples/core-examples/panelStackExample.tsx +++ b/packages/docs-app/src/examples/core-examples/panelStackExample.tsx @@ -30,11 +30,7 @@ export class PanelStackExample extends React.PureComponent
Current stack
-
    - {this.state.currentPanelStack.map((p, i) => ( -
  • {p.title}
  • - ))} -
+
    {this.state.currentPanelStack.map((p, i) =>
  • {p.title}
  • )}
); return ( diff --git a/packages/docs-app/src/examples/datetime-examples/common/formatSelect.tsx b/packages/docs-app/src/examples/datetime-examples/common/formatSelect.tsx index db2ef77da3b..4f266aba3c9 100644 --- a/packages/docs-app/src/examples/datetime-examples/common/formatSelect.tsx +++ b/packages/docs-app/src/examples/datetime-examples/common/formatSelect.tsx @@ -25,9 +25,7 @@ export class FormatSelect extends React.PureComponent { const value = FORMATS.indexOf(this.props.format); return ( - {FORMATS.map((format, index) => ( - - ))} + {FORMATS.map((format, index) => )} ); } diff --git a/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx b/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx index 65dc38c563a..eeb5d7b9d56 100644 --- a/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx @@ -173,9 +173,7 @@ export class DateRangePickerExample extends React.PureComponent {label} - {options.map((opt, i) => ( - ); diff --git a/packages/docs-theme/src/components/typescript/enumTable.tsx b/packages/docs-theme/src/components/typescript/enumTable.tsx index b32291d167d..37f405735d6 100644 --- a/packages/docs-theme/src/components/typescript/enumTable.tsx +++ b/packages/docs-theme/src/components/typescript/enumTable.tsx @@ -41,10 +41,7 @@ export class EnumTable extends React.PureComponent { private renderPropRow = (entry: ITsEnumMember) => { const { renderBlock } = this.context; - const { - flags: { isDeprecated, isExternal }, - name, - } = entry; + const { flags: { isDeprecated, isExternal }, name } = entry; const classes = classNames("docs-prop-name", { "docs-prop-is-deprecated": !!isDeprecated, @@ -70,9 +67,7 @@ export class EnumTable extends React.PureComponent { }; private renderTags(entry: ITsEnumMember) { - const { - flags: { isDeprecated }, - } = entry; + const { flags: { isDeprecated } } = entry; return ; } } diff --git a/packages/docs-theme/src/components/typescript/interfaceTable.tsx b/packages/docs-theme/src/components/typescript/interfaceTable.tsx index 798ec2115b9..8fb099e55d3 100644 --- a/packages/docs-theme/src/components/typescript/interfaceTable.tsx +++ b/packages/docs-theme/src/components/typescript/interfaceTable.tsx @@ -55,10 +55,7 @@ export class InterfaceTable extends React.PureComponent { private renderPropRow = (entry: ITsProperty | ITsMethod) => { const { renderBlock, renderType } = this.context; - const { - flags: { isDeprecated, isExternal, isOptional }, - name, - } = entry; + const { flags: { isDeprecated, isExternal, isOptional }, name } = entry; const { documentation } = isTsProperty(entry) ? entry : entry.signatures[0]; // ignore props marked with `@internal` tag (this tag is in contents instead of in flags) @@ -124,10 +121,7 @@ export class InterfaceTable extends React.PureComponent { private renderTags(entry: ITsProperty | ITsMethod) { const { renderType } = this.context; - const { - flags: { isDeprecated, isOptional }, - inheritedFrom, - } = entry; + const { flags: { isDeprecated, isOptional }, inheritedFrom } = entry; return ( <> {!isOptional && } diff --git a/packages/table/test/locatorTests.tsx b/packages/table/test/locatorTests.tsx index a61459a370b..0cfef7ce2c0 100644 --- a/packages/table/test/locatorTests.tsx +++ b/packages/table/test/locatorTests.tsx @@ -125,8 +125,8 @@ describe("Locator", () => { originalScrollTop = bodyElement.scrollTop; // make the table smaller, then scroll it one column and one row over - bodyElement.style.height = `${(N_ROWS / 2) * ROW_HEIGHT}px`; - bodyElement.style.width = `${(N_COLS / 2) * COL_WIDTH}px`; + bodyElement.style.height = `${N_ROWS / 2 * ROW_HEIGHT}px`; + bodyElement.style.width = `${N_COLS / 2 * COL_WIDTH}px`; bodyElement.style.overflow = "auto"; bodyElement.scrollLeft = NUM_COLUMNS_SCROLLED_OUT_OF_VIEW * COL_WIDTH; bodyElement.scrollTop = NUM_ROWS_SCROLLED_OUT_OF_VIEW * ROW_HEIGHT;