From 87bcaea59ac75971459d27bb529ed88955955360 Mon Sep 17 00:00:00 2001 From: Gilad Gray Date: Wed, 23 Jan 2019 17:08:01 -0800 Subject: [PATCH 1/2] upgrade tslint and related packages --- packages/node-build-scripts/package.json | 2 +- packages/tslint-config/package.json | 10 ++--- yarn.lock | 57 +++++++++++++++--------- 3 files changed, 41 insertions(+), 28 deletions(-) diff --git a/packages/node-build-scripts/package.json b/packages/node-build-scripts/package.json index 5bf1d9d4cf..7e03d92942 100644 --- a/packages/node-build-scripts/package.json +++ b/packages/node-build-scripts/package.json @@ -25,7 +25,7 @@ "stylelint": "~8.4.0", "stylelint-junit-formatter": "^0.2.0", "svgo": "^1.0.3", - "tslint": "^5.9.1", + "tslint": "^5.12.1", "typescript": "~2.8.3" }, "repository": { diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index 663630adac..f2bcaa0190 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -7,14 +7,14 @@ "test": "tslint --rules-dir ./lib/rules --test test/rules/**/tslint.json" }, "dependencies": { - "prettier": "^1.7.4", + "prettier": "^1.16.1", "tslib": "^1.9.0", - "tslint-config-prettier": "^1.6.0", - "tslint-plugin-prettier": "^1.3.0", - "tslint-react": "^3.2.0" + "tslint-config-prettier": "^1.17.0", + "tslint-plugin-prettier": "^2.0.1", + "tslint-react": "^3.6.0" }, "peerDependencies": { - "tslint": "^5.7.0" + "tslint": "^5.12.1" }, "repository": { "type": "git", diff --git a/yarn.lock b/yarn.lock index d1935914c2..92a5382277 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5505,6 +5505,11 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lines-and-columns@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" + integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -7558,10 +7563,10 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier@^1.7.4: - version "1.10.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.10.2.tgz#1af8356d1842276a99a5b5529c82dd9e9ad3cc93" - integrity sha512-TcdNoQIWFoHblurqqU6d1ysopjq7UX0oRcT/hJ8qvBAELiYWn+Ugf0AXdnzISEJ7vuhNnQ98N8jR8Sh53x4IZg== +prettier@^1.16.1: + version "1.16.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.1.tgz#534c2c9d7853f8845e5e078384e71973bd74089f" + integrity sha512-XXUITwIkGb3CPJ2hforHah/zTINRyie5006Jd2HKy2qz7snEJXl0KLfsJZW/wst9g6R2rFvqba3VpNYdu1hDcA== pretty-hrtime@^1.0.3: version "1.0.3" @@ -9591,30 +9596,31 @@ tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" integrity sha512-f/qGG2tUkrISBlQZEjEqoZ3B2+npJjIf04H1wuAv9iA8i04Icp+61KRXxFdha22670NJopsZCIjhC3SnjPRKrQ== -tslint-config-prettier@^1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.6.0.tgz#fec1ee8fb07e8f033c63fed6b135af997f31962a" - integrity sha512-39xsbQGnv20r0iraRNR/tlIaW4Fk2rj6mTk+V1r0TV1NztFfP0WTFKYP7JDq91w+wsfEfMNqWG4GPA6FjpDZEA== +tslint-config-prettier@^1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.17.0.tgz#946ed6117f98f3659a65848279156d87628c33dc" + integrity sha512-NKWNkThwqE4Snn4Cm6SZB7lV5RMDDFsBwz6fWUkTxOKGjMx8ycOHnjIbhn7dZd5XmssW3CwqUjlANR6EhP9YQw== -tslint-plugin-prettier@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-1.3.0.tgz#7eb65d19ea786a859501a42491b78c5de2031a3f" - integrity sha512-6UqeeV6EABp0RdQkW6eC1vwnAXcKMGJgPeJ5soXiKdSm2vv7c3dp+835CM8pjgx9l4uSa7tICm1Kli+SMsADDg== +tslint-plugin-prettier@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/tslint-plugin-prettier/-/tslint-plugin-prettier-2.0.1.tgz#95b6a3b766622ffc44375825d7760225c50c3680" + integrity sha512-4FX9JIx/1rKHIPJNfMb+ooX1gPk5Vg3vNi7+dyFYpLO+O57F4g+b/fo1+W/G0SUOkBLHB/YKScxjX/P+7ZT/Tw== dependencies: eslint-plugin-prettier "^2.2.0" + lines-and-columns "^1.1.6" tslib "^1.7.1" -tslint-react@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.4.0.tgz#12ed3fc7063f3df988370206736b50acbce07e59" - integrity sha512-zs4UgLmKfKuXuUh976QBV1zyZ/41gcKfww4IHXrgDpNkvFKl9AiDvYH6CgcqT8yH1DKqfv8KHlHqa0hStEoMxA== +tslint-react@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.6.0.tgz#7f462c95c4a0afaae82507f06517ff02942196a1" + integrity sha512-AIv1QcsSnj7e9pFir6cJ6vIncTqxfqeFF3Lzh8SuuBljueYzEAtByuB6zMaD27BL0xhMEqsZ9s5eHuCONydjBw== dependencies: tsutils "^2.13.1" -tslint@^5.9.1: - version "5.9.1" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae" - integrity sha1-ElX4ej/1frCw4fDmEKi0dIBGya4= +tslint@^5.12.1: + version "5.12.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.12.1.tgz#8cec9d454cf8a1de9b0a26d7bdbad6de362e52c1" + integrity sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw== dependencies: babel-code-frame "^6.22.0" builtin-modules "^1.1.1" @@ -9627,15 +9633,22 @@ tslint@^5.9.1: resolve "^1.3.2" semver "^5.3.0" tslib "^1.8.0" - tsutils "^2.12.1" + tsutils "^2.27.2" -tsutils@^2.12.1, tsutils@^2.13.1: +tsutils@^2.13.1: version "2.19.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.19.0.tgz#170a267c1df5ae046e902568ca3444a1a4dfcb3a" integrity sha512-qjgvrvtzRUtOmqlZTfBFtep6s+ymuBLsHOC4ee9JNA+AZIbnR/x4C2Y7QFhOGpD2R3lDp0BBcnxb0vnMVrU7Aw== dependencies: tslib "^1.8.1" +tsutils@^2.27.2: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" From c897bfebbfca6aad7771d7d7cc47da73e80522ad Mon Sep 17 00:00:00 2001 From: Gilad Gray Date: Wed, 23 Jan 2019 17:12:29 -0800 Subject: [PATCH 2/2] lint --fix --- .../core/src/components/popover/popover.tsx | 5 ++- .../core/src/components/slider/handle.tsx | 8 +++-- .../src/components/slider/multiSlider.tsx | 5 ++- .../core/src/components/spinner/spinner.tsx | 2 +- packages/core/test/popover/popoverTests.tsx | 6 ++-- packages/datetime/src/datePicker.tsx | 4 ++- packages/datetime/src/dateRangePicker.tsx | 21 +++++++----- packages/datetime/test/dateInputTests.tsx | 6 ++-- packages/datetime/test/datePickerTests.tsx | 21 ++++-------- .../datetime/test/dateRangePickerTests.tsx | 33 +++++++------------ .../datetime/test/dateTimePickerTests.tsx | 6 ++-- .../docs-app/src/components/colorPalettes.tsx | 8 +++-- packages/docs-app/src/components/navIcons.tsx | 8 ++--- .../core-examples/collapseExample.tsx | 12 ++++--- .../core-examples/nonIdealStateExample.tsx | 4 ++- .../core-examples/panelStackExample.tsx | 6 +++- .../examples/core-examples/popoverExample.tsx | 3 +- .../datetime-examples/common/formatSelect.tsx | 4 ++- .../dateRangePickerExample.tsx | 4 ++- .../docs-theme/src/components/navButton.tsx | 8 ++--- .../docs-theme/src/components/navMenuItem.tsx | 8 ++--- .../src/components/typescript/enumTable.tsx | 9 +++-- .../components/typescript/interfaceTable.tsx | 10 ++++-- packages/select/test/omnibarTests.tsx | 8 ++--- packages/table-dev-app/src/features.tsx | 3 +- packages/table-dev-app/src/mutableTable.tsx | 2 +- packages/table/test/locatorTests.tsx | 4 +-- 27 files changed, 119 insertions(+), 99 deletions(-) diff --git a/packages/core/src/components/popover/popover.tsx b/packages/core/src/components/popover/popover.tsx index 4d336c4cd1..e625a81dc0 100644 --- a/packages/core/src/components/popover/popover.tsx +++ b/packages/core/src/components/popover/popover.tsx @@ -507,7 +507,10 @@ 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 aefe418e06..c50a54571d 100644 --- a/packages/core/src/components/slider/handle.tsx +++ b/packages/core/src/components/slider/handle.tsx @@ -223,8 +223,12 @@ 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 290a64f9b3..f61a46e32b 100644 --- a/packages/core/src/components/spinner/spinner.tsx +++ b/packages/core/src/components/spinner/spinner.tsx @@ -76,7 +76,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 2d5bba5b88..4a0eeed1ec 100644 --- a/packages/core/test/popover/popoverTests.tsx +++ b/packages/core/test/popover/popoverTests.tsx @@ -597,16 +597,14 @@ 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 f08b0fc8d7..0a0fba86d8 100644 --- a/packages/datetime/src/datePicker.tsx +++ b/packages/datetime/src/datePicker.tsx @@ -188,7 +188,9 @@ 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 ba843b9dd8..d6669d6971 100644 --- a/packages/datetime/src/dateRangePicker.tsx +++ b/packages/datetime/src/dateRangePicker.tsx @@ -144,7 +144,10 @@ 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; } @@ -263,7 +266,9 @@ 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]; }; @@ -564,12 +569,12 @@ export class DateRangePicker extends AbstractPureComponent { let leftView = new MonthAndYear(this.state.leftView.getMonth(), leftDisplayYear); Utils.safeInvoke(this.props.dayPickerProps.onMonthChange, leftView.getFullDate()); diff --git a/packages/datetime/test/dateInputTests.tsx b/packages/datetime/test/dateInputTests.tsx index 6c40ccbd42..55ce8e64ae 100644 --- a/packages/datetime/test/dateInputTests.tsx +++ b/packages/datetime/test/dateInputTests.tsx @@ -124,8 +124,7 @@ 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); @@ -136,8 +135,7 @@ 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 6005c3d99e..381537b088 100644 --- a/packages/datetime/test/datePickerTests.tsx +++ b/packages/datetime/test/datePickerTests.tsx @@ -137,8 +137,7 @@ 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); @@ -147,8 +146,7 @@ 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); @@ -157,8 +155,7 @@ 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"); @@ -168,8 +165,7 @@ 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"); @@ -493,8 +489,7 @@ 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); @@ -548,8 +543,7 @@ 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"); @@ -564,8 +558,7 @@ 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 625bf2e462..1e31dfeb82 100644 --- a/packages/datetime/test/dateRangePickerTests.tsx +++ b/packages/datetime/test/dateRangePickerTests.tsx @@ -714,8 +714,7 @@ 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); @@ -724,8 +723,7 @@ 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); @@ -734,8 +732,7 @@ 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); @@ -746,8 +743,7 @@ 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); @@ -755,8 +751,7 @@ 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); @@ -764,8 +759,7 @@ 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); @@ -773,8 +767,7 @@ 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); @@ -782,8 +775,7 @@ 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); @@ -791,8 +783,7 @@ 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); @@ -984,8 +975,7 @@ 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); @@ -1028,8 +1018,7 @@ 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 d3c163e491..b8e34193d6 100644 --- a/packages/datetime/test/dateTimePickerTests.tsx +++ b/packages/datetime/test/dateTimePickerTests.tsx @@ -55,8 +55,7 @@ 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); @@ -80,8 +79,7 @@ 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 ccde74c2db..0d9617c034 100644 --- a/packages/docs-app/src/components/colorPalettes.tsx +++ b/packages/docs-app/src/components/colorPalettes.tsx @@ -58,7 +58,9 @@ 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) => ( + + ))}
); @@ -92,7 +94,9 @@ 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/components/navIcons.tsx b/packages/docs-app/src/components/navIcons.tsx index e9593d7979..5d01aace4b 100644 --- a/packages/docs-app/src/components/navIcons.tsx +++ b/packages/docs-app/src/components/navIcons.tsx @@ -1,8 +1,8 @@ /* -* Copyright 2018 Palantir Technologies, Inc. All rights reserved. -* -* Licensed under the terms of the LICENSE file distributed with this project. -*/ + * Copyright 2018 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the terms of the LICENSE file distributed with this project. + */ import React from "react"; diff --git a/packages/docs-app/src/examples/core-examples/collapseExample.tsx b/packages/docs-app/src/examples/core-examples/collapseExample.tsx index e0a2123c1b..809f5bebe2 100644 --- a/packages/docs-app/src/examples/core-examples/collapseExample.tsx +++ b/packages/docs-app/src/examples/core-examples/collapseExample.tsx @@ -42,10 +42,14 @@ export class CollapseExample extends React.PureComponent{this.state.isOpen ? "Hide" : "Show"} build logs
-                            [11:53:30] Finished 'typescript-bundle-blueprint' after 769 ms
- [11:53:30] Starting 'typescript-typings-blueprint'...
- [11:53:30] Finished 'typescript-typings-blueprint' after 198 ms
- [11:53:30] write ./blueprint.css
+ [11:53:30] Finished 'typescript-bundle-blueprint' after 769 ms +
+ [11:53:30] Starting 'typescript-typings-blueprint'... +
+ [11:53:30] Finished 'typescript-typings-blueprint' after 198 ms +
+ [11:53:30] write ./blueprint.css +
[11:53:30] Finished 'sass-compile-blueprint' after 2.84 s
diff --git a/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx b/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx index 6027a55e11..6f2c477bfb 100644 --- a/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx +++ b/packages/docs-app/src/examples/core-examples/nonIdealStateExample.tsx @@ -39,7 +39,9 @@ export class NonIdealStateExample extends React.PureComponent; const description = ( <> - Your search didn't match any files.
Try searching for something else. + Your search didn't match any files. +
+ Try searching for something else. ); diff --git a/packages/docs-app/src/examples/core-examples/panelStackExample.tsx b/packages/docs-app/src/examples/core-examples/panelStackExample.tsx index 68c3a67375..e2d2650b6e 100644 --- a/packages/docs-app/src/examples/core-examples/panelStackExample.tsx +++ b/packages/docs-app/src/examples/core-examples/panelStackExample.tsx @@ -30,7 +30,11 @@ 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/core-examples/popoverExample.tsx b/packages/docs-app/src/examples/core-examples/popoverExample.tsx index cdd505cb5c..42e2f21e12 100644 --- a/packages/docs-app/src/examples/core-examples/popoverExample.tsx +++ b/packages/docs-app/src/examples/core-examples/popoverExample.tsx @@ -133,7 +133,8 @@ export class PopoverExample extends React.PureComponent

- Scroll around this container to experiment
+ Scroll around this container to experiment +
with flip and preventOverflow modifiers.

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 4f266aba3c..db2ef77da3 100644 --- a/packages/docs-app/src/examples/datetime-examples/common/formatSelect.tsx +++ b/packages/docs-app/src/examples/datetime-examples/common/formatSelect.tsx @@ -25,7 +25,9 @@ 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 eeb5d7b9d5..65dc38c563 100644 --- a/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx +++ b/packages/docs-app/src/examples/datetime-examples/dateRangePickerExample.tsx @@ -173,7 +173,9 @@ export class DateRangePickerExample extends React.PureComponent {label} - {options.map((opt, i) => ); diff --git a/packages/docs-theme/src/components/navButton.tsx b/packages/docs-theme/src/components/navButton.tsx index ed0754a6ef..38af651f35 100644 --- a/packages/docs-theme/src/components/navButton.tsx +++ b/packages/docs-theme/src/components/navButton.tsx @@ -1,8 +1,8 @@ /* -* Copyright 2018 Palantir Technologies, Inc. All rights reserved. -* -* Licensed under the terms of the LICENSE file distributed with this project. -*/ + * Copyright 2018 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the terms of the LICENSE file distributed with this project. + */ import { Classes, Icon, IconName, KeyCombo } from "@blueprintjs/core"; import classNames from "classnames"; diff --git a/packages/docs-theme/src/components/navMenuItem.tsx b/packages/docs-theme/src/components/navMenuItem.tsx index 0c7078e4a6..c2fce1f3ee 100644 --- a/packages/docs-theme/src/components/navMenuItem.tsx +++ b/packages/docs-theme/src/components/navMenuItem.tsx @@ -1,8 +1,8 @@ /* -* Copyright 2018 Palantir Technologies, Inc. All rights reserved. -* -* Licensed under the terms of the LICENSE file distributed with this project. -*/ + * Copyright 2018 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the terms of the LICENSE file distributed with this project. + */ import { Classes } from "@blueprintjs/core"; import classNames from "classnames"; diff --git a/packages/docs-theme/src/components/typescript/enumTable.tsx b/packages/docs-theme/src/components/typescript/enumTable.tsx index 37f405735d..b32291d167 100644 --- a/packages/docs-theme/src/components/typescript/enumTable.tsx +++ b/packages/docs-theme/src/components/typescript/enumTable.tsx @@ -41,7 +41,10 @@ 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, @@ -67,7 +70,9 @@ 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 8fb099e55d..798ec2115b 100644 --- a/packages/docs-theme/src/components/typescript/interfaceTable.tsx +++ b/packages/docs-theme/src/components/typescript/interfaceTable.tsx @@ -55,7 +55,10 @@ 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) @@ -121,7 +124,10 @@ 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/select/test/omnibarTests.tsx b/packages/select/test/omnibarTests.tsx index 6e0e56bbdb..e00e404253 100644 --- a/packages/select/test/omnibarTests.tsx +++ b/packages/select/test/omnibarTests.tsx @@ -1,8 +1,8 @@ /* -* Copyright 2018 Palantir Technologies, Inc. All rights reserved. -* -* Licensed under the terms of the LICENSE file distributed with this project. -*/ + * Copyright 2018 Palantir Technologies, Inc. All rights reserved. + * + * Licensed under the terms of the LICENSE file distributed with this project. + */ import { mount } from "enzyme"; import * as React from "react"; diff --git a/packages/table-dev-app/src/features.tsx b/packages/table-dev-app/src/features.tsx index 717bcf8e3c..90ca7aec9f 100644 --- a/packages/table-dev-app/src/features.tsx +++ b/packages/table-dev-app/src/features.tsx @@ -589,7 +589,8 @@ ReactDOM.render(

-
after +
+ after
, document.getElementById("table-9"), diff --git a/packages/table-dev-app/src/mutableTable.tsx b/packages/table-dev-app/src/mutableTable.tsx index df0408d18a..09b69270f6 100644 --- a/packages/table-dev-app/src/mutableTable.tsx +++ b/packages/table-dev-app/src/mutableTable.tsx @@ -67,7 +67,7 @@ export enum SelectedRegionTransformPreset { type IMutableStateUpdateCallback = ( stateKey: keyof IMutableTableState, -) => ((event: React.FormEvent) => void); +) => (event: React.FormEvent) => void; const COLUMN_COUNTS = [0, 1, 5, 20, 100, 1000]; const ROW_COUNTS = [0, 1, 5, 20, 100, 1000, 100000]; diff --git a/packages/table/test/locatorTests.tsx b/packages/table/test/locatorTests.tsx index 0cfef7ce2c..a61459a370 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;