From a848842411644aabecdde8772888fa5e191fe04d Mon Sep 17 00:00:00 2001 From: Patrick Riley Date: Wed, 20 Dec 2017 10:40:05 -0500 Subject: [PATCH] fix(nvmrc): remove nvmrc checks and reenable node6 support --- .eslintrc | 10 +- .travis.yml | 1 + README.md | 6 +- package-lock.json | 210 +++++++++--------- package.json | 4 +- src/components/Alert/Alert.js | 6 +- src/components/Alert/Alert.stories.js | 20 +- src/components/Alert/Alert.test.js | 2 +- src/components/Alert/constants.js | 2 +- src/components/Alert/helpers.js | 2 +- src/components/Badge/Badge.stories.js | 4 +- .../Breadcrumb/Breadcrumb.stories.js | 4 +- src/components/Button/Button.js | 2 +- src/components/Button/Button.stories.js | 4 +- src/components/Button/Button.test.js | 4 +- src/components/Button/DropdownButton.js | 2 +- src/components/Button/DropdownButton.test.js | 2 +- src/components/Button/SplitButton.js | 2 +- src/components/Button/SplitButton.test.js | 2 +- src/components/Chart/AreaChart.js | 2 +- src/components/Chart/AreaChart.test.js | 8 +- src/components/Chart/BarChart.js | 2 +- src/components/Chart/BarChart.test.js | 12 +- src/components/Chart/Chart.stories.js | 6 +- src/components/Chart/DonutChart.js | 8 +- src/components/Chart/DonutChart.test.js | 4 +- src/components/Chart/GroupedBarChart.js | 2 +- src/components/Chart/LineChart.js | 2 +- src/components/Chart/LineChart.test.js | 12 +- src/components/Chart/PieChart.js | 2 +- src/components/Chart/SingleAreaChart.js | 2 +- src/components/Chart/SingleLineChart.js | 2 +- src/components/Chart/SparklineChart.js | 2 +- src/components/Chart/StackedBarChart.js | 2 +- .../Chart/Stories/AreaChartStory.js | 6 +- src/components/Chart/Stories/BarChartStory.js | 28 +-- .../Chart/Stories/DonutChartStory.js | 16 +- .../Chart/Stories/LineChartStory.js | 10 +- src/components/Chart/Stories/PieChartStory.js | 8 +- src/components/Chart/constants.js | 30 +-- src/components/DropdownKebab/DropdownKebab.js | 2 +- .../DropdownKebab/DropdownKebab.stories.js | 6 +- .../DropdownKebab/DropdownKebab.test.js | 2 +- src/components/Grid/Grid.stories.js | 6 +- src/components/Icon/Icon.js | 4 +- .../Icon/InnerComponents/PatternflyIcon.js | 2 +- src/components/Label/Label.stories.js | 4 +- src/components/ListGroup/ListGroup.stories.js | 4 +- src/components/ListView/ListView.js | 2 +- src/components/ListView/ListView.stories.js | 16 +- src/components/ListView/ListView.test.js | 4 +- src/components/ListView/ListViewActions.js | 2 +- .../ListView/ListViewAdditionalInfo.js | 2 +- src/components/ListView/ListViewBody.js | 2 +- src/components/ListView/ListViewCheckbox.js | 2 +- .../ListView/ListViewDescription.js | 2 +- .../ListView/ListViewDescriptionHeading.js | 2 +- .../ListView/ListViewDescriptionText.js | 2 +- src/components/ListView/ListViewExpand.js | 6 +- src/components/ListView/ListViewGroupItem.js | 8 +- .../ListView/ListViewGroupItemContainer.js | 6 +- .../ListView/ListViewGroupItemHeader.js | 2 +- src/components/ListView/ListViewIcon.js | 4 +- src/components/ListView/ListViewInfoItem.js | 6 +- src/components/ListView/ListViewItem.js | 4 +- src/components/ListView/ListViewLeft.js | 2 +- src/components/ListView/ListViewMainInfo.js | 2 +- src/components/ListView/ListViewRow.js | 4 +- .../ListView/__mocks__/mockListItems.js | 16 +- src/components/ListView/index.js | 2 +- src/components/MenuItem/MenuItem.stories.js | 4 +- .../InnerComponents/CustomModalDialog.js | 8 +- src/components/Modal/Modal.js | 2 +- src/components/Modal/Modal.stories.js | 16 +- src/components/Popover/Popover.stories.js | 12 +- src/components/Spinner/Spinner.js | 6 +- src/components/Spinner/Spinner.stories.js | 8 +- src/components/Spinner/Spinner.test.js | 4 +- .../TimedToastNotification.js | 4 +- .../ToastNotification/ToastNotification.js | 10 +- .../ToastNotification.stories.js | 22 +- .../ToastNotification.test.js | 4 +- .../ToastNotificationList.js | 6 +- src/components/ToastNotification/constants.js | 2 +- src/components/Tooltip/Tooltip.stories.js | 12 +- src/components/Wizard/Wizard.js | 4 +- src/components/Wizard/Wizard.stories.js | 16 +- src/components/Wizard/Wizard.test.js | 12 +- src/components/Wizard/WizardBody.js | 2 +- src/components/Wizard/WizardContents.js | 6 +- src/components/Wizard/WizardFooter.js | 2 +- src/components/Wizard/WizardHeader.js | 2 +- src/components/Wizard/WizardMain.js | 2 +- src/components/Wizard/WizardReviewContent.js | 4 +- src/components/Wizard/WizardReviewItem.js | 2 +- src/components/Wizard/WizardReviewStep.js | 2 +- src/components/Wizard/WizardReviewSteps.js | 2 +- src/components/Wizard/WizardReviewSubStep.js | 2 +- src/components/Wizard/WizardReviewSubSteps.js | 4 +- src/components/Wizard/WizardRow.js | 2 +- src/components/Wizard/WizardSidebar.js | 2 +- src/components/Wizard/WizardSidebarGroup.js | 2 +- .../Wizard/WizardSidebarGroupItem.js | 2 +- src/components/Wizard/WizardStep.js | 4 +- src/components/Wizard/WizardSteps.js | 2 +- src/components/Wizard/WizardSubStep.js | 4 +- .../__mocks__/mockEmbeddedWizardManager.js | 8 +- .../__mocks__/mockModalWizardManager.js | 8 +- .../Wizard/__mocks__/mockWizardBase.js | 18 +- .../__mocks__/mockWizardDeployContents.js | 2 +- .../Wizard/__mocks__/mockWizardItems.js | 34 +-- .../Wizard/__mocks__/mockWizardRenderers.js | 6 +- .../__mocks__/mockWizardReviewStepsManager.js | 8 +- src/components/Wizard/index.js | 2 +- storybook/webpack.config.js | 42 ++-- 115 files changed, 450 insertions(+), 461 deletions(-) diff --git a/.eslintrc b/.eslintrc index c234d9e996e..cf799500702 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,9 @@ { "rules": { - "prettier/prettier": ["error", { "singleQuote": true, "trailingComma": "all" }] + "prettier/prettier": [ + "error", + { "singleQuote": true, "trailingComma": "none" } + ] }, "extends": [ "standard", @@ -19,9 +22,6 @@ "jsx": true, "experimentalObjectRestSpread": true }, - "plugins": [ - "prettier", - "react" - ], + "plugins": ["prettier", "react"], "parser": "babel-eslint" } diff --git a/.travis.yml b/.travis.yml index 5d01c548cb1..2b6fd3711f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,7 @@ notifications: email: false node_js: - '8' +- '6' before_script: - npm prune script: diff --git a/README.md b/README.md index 307b36b9ee1..0b84f845b58 100644 --- a/README.md +++ b/README.md @@ -20,14 +20,14 @@ As an alernative to consuming the `patternfly-react.css` file (found in `dist/cs ## Node Environment -To build you **must** use Node 8. If you are not using Node 8, you will get an error at `npm install` time. Please install and use via: +This project currently supports Node [Active LTS](https://github.com/nodejs/Release#release-schedule) releases. Please stay current with Node Active LTS when developing patternfly-react. + +For example, to develop with Node 8, use the following: ``` nvm install 8 nvm use 8 ``` -Run `npm install` again. If you then get an error with `Node Sass`, remove the `node_modules` and `npm install` again (to pull the correct version of node-sass). - ## Storybook UI Development This project uses [React Storybook](https://getstorybook.io/) to test and demo new React UI components. You can view our current storybook [here](https://rawgit.com/patternfly/patternfly-react/gh-pages/index.html). diff --git a/package-lock.json b/package-lock.json index f9e715c1e65..9a16da3af02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,12 +94,12 @@ } }, "@storybook/addon-actions": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-3.2.17.tgz", - "integrity": "sha512-B4++4+p6zWTeTBzqe9lgzT8J0onaMfSZsBRJpa5URoDo3d4kTq+DTDs2qHhhTKJb2Drtu24/JlEgJG7lv0Fb0w==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-3.2.18.tgz", + "integrity": "sha512-jIbNxYXm3MyPECcPWZ9Vxuq31/rwq/oPXhfPpf4xD9sdQcfwm/5on2d75UJOXKio60xWagP4RpECz7d3uc6nJA==", "dev": true, "requires": { - "@storybook/addons": "3.2.17", + "@storybook/addons": "3.2.18", "deep-equal": "1.0.1", "json-stringify-safe": "5.0.1", "prop-types": "15.6.0", @@ -108,13 +108,13 @@ } }, "@storybook/addon-info": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/addon-info/-/addon-info-3.2.17.tgz", - "integrity": "sha512-MHZv/lam+NYyibOIRly+66GPSmlhrGMDlQaZFliXYILQuF6skN4KeC/A7IkhquAUVA2PrkBS8EJfTAV0Qw0pcQ==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/addon-info/-/addon-info-3.2.18.tgz", + "integrity": "sha512-InEJmMUgWHpP4O0Q+Wq74p/K28cNf6qcW6LriOkYvFqES6p1LdMJUvbRoblpQh6T5gI88weGVS50+wRDLBKCdw==", "dev": true, "requires": { - "@storybook/addons": "3.2.17", - "@storybook/components": "3.2.17", + "@storybook/addons": "3.2.18", + "@storybook/components": "3.2.18", "babel-runtime": "6.26.0", "global": "4.3.2", "marksy": "2.0.1", @@ -129,13 +129,13 @@ "integrity": "sha512-Xnd54kx47boM5Xl0sVMqblcki3Z8Z9hS8CIWz5CCJCfxQKx7mhFtcOmHrIqUH2oUZhhFSj+aFrRx1zPcFcPaZQ==", "dev": true, "requires": { - "@storybook/addons": "3.2.17", + "@storybook/addons": "3.2.18", "babel-runtime": "6.26.0", "deep-equal": "1.0.1", "global": "4.3.2", "insert-css": "1.1.0", "lodash.debounce": "4.0.8", - "moment": "2.19.4", + "moment": "2.20.1", "prop-types": "15.6.0", "react-color": "2.13.8", "react-datetime": "2.11.1", @@ -144,41 +144,41 @@ } }, "@storybook/addon-links": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-3.2.17.tgz", - "integrity": "sha512-AdCH9DsbOfiMDv42/l0Zfk2yhiBrlWuzHk7ubhSwqF3/61sXr+BWFv+SlOx2oFfSWAT7zfg2sC7Wr+us8gs7GQ==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-3.2.18.tgz", + "integrity": "sha512-X96TNRA0x0rWWVweIQCDM84GJdQpAXQutxnARvskV0RD6bf8Bhq7nw3FVzElNilnFyfhtFzYVqCUlEOAJcKEgg==", "dev": true, "requires": { - "@storybook/addons": "3.2.17" + "@storybook/addons": "3.2.18" } }, "@storybook/addons": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-3.2.17.tgz", - "integrity": "sha512-1/Ux++3hMfYqAgBwgWbGtGAM0CfSdAchf//wDLBUmX09+E5CjiQvW3YwVplNYzfRuAsSrE1GOYJRAsz639oTYQ==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-3.2.18.tgz", + "integrity": "sha512-I1oJhimBZiyrDa2UxorXhBBGapAIa+KxF8thtCUWmFgToeWhlHnRepQiRE+mCDM2yjSQpmTN+md/W8DPcLIHag==", "dev": true }, "@storybook/channel-postmessage": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-3.2.17.tgz", - "integrity": "sha512-sNlXcHTKM6aIxRsQMaMbowsAToYRlbeP/THqulVxoRRKNDPndNnZe/Lu3eSjBjAfNWBLRFfgX903adt82QAPCA==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-3.2.18.tgz", + "integrity": "sha512-a3SSLYlVf61BaAcM2pA/W4Rhdh/RCf1oise22TXfgC83ELUyRksKQX/Pm7FKn2NgffrZb5aRIUQRzfe3LH/www==", "dev": true, "requires": { - "@storybook/channels": "3.2.17", + "@storybook/channels": "3.2.18", "global": "4.3.2", "json-stringify-safe": "5.0.1" } }, "@storybook/channels": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-3.2.17.tgz", - "integrity": "sha512-HIdRmFTFVLcbrwYFf6+LyAlgcd57ki+6DDTmcvXQTHCWrOOCJKwfKjHgn6tbnHlGHiWByA8lAdO1bFcYhHxl4Q==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-3.2.18.tgz", + "integrity": "sha512-7+3Kic5FRWyojff/CA4wfhI24xxbXmQzdVLx0gUZm8r4+h/3JSt8hVfhJeXkS+GEvo852PRS/AOHnN4ENKw9uw==", "dev": true }, "@storybook/components": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/components/-/components-3.2.17.tgz", - "integrity": "sha512-pXwNKLavYCu18B2EynFu9EKXlKi0LDo0B/KctbJvidxR5ubzqkZu9h2ti3hPPVomR2DQiRx61Vzqd7cbcyy14w==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-3.2.18.tgz", + "integrity": "sha512-jvwUewMiwG+svDqLxu6YyHQdBdvDQ5etA5dUplpx7aPW4bZog+DHkZ0RLgwHadxbeff1qs/RXlz23D3El6BDxA==", "dev": true, "requires": { "glamor": "2.20.40", @@ -203,11 +203,11 @@ "integrity": "sha512-/TWoVYHfoUnEAjcEj463zRIA7SJjB6RIzShFzI2HtJw+P2EdT8mFN2EYGdsuGHQqkbGSC3owHSy1Jxuy1GVuqQ==", "dev": true, "requires": { - "@storybook/addon-actions": "3.2.17", - "@storybook/addon-links": "3.2.17", - "@storybook/addons": "3.2.17", - "@storybook/channel-postmessage": "3.2.17", - "@storybook/ui": "3.2.17", + "@storybook/addon-actions": "3.2.18", + "@storybook/addon-links": "3.2.18", + "@storybook/addons": "3.2.18", + "@storybook/channel-postmessage": "3.2.18", + "@storybook/ui": "3.2.18", "airbnb-js-shims": "1.4.0", "autoprefixer": "7.2.3", "babel-core": "6.26.0", @@ -343,13 +343,13 @@ } }, "@storybook/ui": { - "version": "3.2.17", - "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-3.2.17.tgz", - "integrity": "sha512-At0oWWTALJrJhtdnP+0AMANBC5omIBnEg3Pin3M0+yzUy6Poelcvt8+81dQEKLBP6LiyFOVpiDjfqpiHR5l0ow==", + "version": "3.2.18", + "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-3.2.18.tgz", + "integrity": "sha512-n3j//YF5gbTRZHrdIREGK8C+weaCF/pu4iWKu4Pty8rbMjrghkgrhENga2XaFvEOfTsBUc2ldXCCjNw0tJOGWg==", "dev": true, "requires": { "@hypnosphi/fuse.js": "3.0.9", - "@storybook/components": "3.2.17", + "@storybook/components": "3.2.18", "@storybook/mantra-core": "1.7.2", "@storybook/react-fuzzy": "0.4.3", "@storybook/react-komposer": "2.0.3", @@ -367,16 +367,16 @@ "qs": "6.5.1", "react-icons": "2.2.7", "react-inspector": "2.2.2", - "react-modal": "3.1.8", - "react-split-pane": "0.1.71", + "react-modal": "3.1.10", + "react-split-pane": "0.1.72", "react-treebeard": "2.1.0", "redux": "3.7.2" }, "dependencies": { "react-modal": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.1.8.tgz", - "integrity": "sha512-cp5fSUBuwkyojclrxZuWXudK2kTBycbDG9Eg1t/bEPdUVBW6vDiGE+4eZg7bVwMyFtiwvyVJ2ugdCOFllNPReg==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.1.10.tgz", + "integrity": "sha512-7b77AGWCkdg0YOf/qcYIGCpuwbxRwOA8P3UrUovk4grUNv+idOmHovJAx/Dcd3fuwHtgixxVjpcjVG60985MSA==", "dev": true, "requires": { "exenv": "1.2.2", @@ -393,9 +393,9 @@ "dev": true }, "@types/react": { - "version": "16.0.30", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.30.tgz", - "integrity": "sha512-BQHUN9veeQJsmIod4i7sphZPAp85KBsYNtL2YMScPosJ58mVyChcN2SIfItmMrxZYWy2gBj5H3oKasT72rbsjQ==", + "version": "16.0.31", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.0.31.tgz", + "integrity": "sha512-ft7OuDGUo39e+9LGwUewf2RyEaNBOjWbHUmD5bzjNuSuDabccE/1IuO7iR0dkzLjVUKxTMq69E+FmKfbgBcfbQ==", "dev": true }, "abab": { @@ -504,7 +504,7 @@ "array-includes": "3.0.3", "array.prototype.flatmap": "1.1.1", "array.prototype.flatten": "1.1.1", - "es5-shim": "4.5.9", + "es5-shim": "4.5.10", "es6-shim": "0.35.3", "function.prototype.name": "1.0.3", "object.entries": "1.0.4", @@ -516,9 +516,9 @@ } }, "ajv": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.1.tgz", - "integrity": "sha1-s4u4h22ehr7plJVqBOch6IskjrI=", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "dev": true, "requires": { "co": "4.6.0", @@ -818,7 +818,7 @@ "dev": true, "requires": { "browserslist": "2.10.0", - "caniuse-lite": "1.0.30000783", + "caniuse-lite": "1.0.30000784", "normalize-range": "0.1.2", "num2fraction": "1.2.2", "postcss": "6.0.14", @@ -2492,8 +2492,8 @@ "integrity": "sha512-WyvzSLsuAVPOjbljXnyeWl14Ae+ukAT8MUuagKVzIDvwBxl4UAwD1xqtyQs2eWYPGUKMeC3Ol62goqYuKqTTcw==", "dev": true, "requires": { - "caniuse-lite": "1.0.30000783", - "electron-to-chromium": "1.3.28" + "caniuse-lite": "1.0.30000784", + "electron-to-chromium": "1.3.29" } }, "bser": { @@ -2603,7 +2603,7 @@ "dev": true, "requires": { "browserslist": "1.7.7", - "caniuse-db": "1.0.30000783", + "caniuse-db": "1.0.30000784", "lodash.memoize": "4.1.2", "lodash.uniq": "4.5.0" }, @@ -2614,22 +2614,22 @@ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", "dev": true, "requires": { - "caniuse-db": "1.0.30000783", - "electron-to-chromium": "1.3.28" + "caniuse-db": "1.0.30000784", + "electron-to-chromium": "1.3.29" } } } }, "caniuse-db": { - "version": "1.0.30000783", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000783.tgz", - "integrity": "sha1-FrMNRyZqT1FcxprgMWtnDJYDzb4=", + "version": "1.0.30000784", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30000784.tgz", + "integrity": "sha1-G+lQEtlInHcZB0+BruV9vf/mNhs=", "dev": true }, "caniuse-lite": { - "version": "1.0.30000783", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000783.tgz", - "integrity": "sha1-m1SZ+xtQPSNF0SqmuGEoUvQnb/0=", + "version": "1.0.30000784", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000784.tgz", + "integrity": "sha1-EpztdOmhKApEGIC2zSvOMO9Z5sA=", "dev": true }, "case-sensitive-paths-webpack-plugin": { @@ -3491,7 +3491,7 @@ "dev": true, "requires": { "browserslist": "1.7.7", - "caniuse-db": "1.0.30000783", + "caniuse-db": "1.0.30000784", "normalize-range": "0.1.2", "num2fraction": "1.2.2", "postcss": "5.2.18", @@ -3504,8 +3504,8 @@ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", "dev": true, "requires": { - "caniuse-db": "1.0.30000783", - "electron-to-chromium": "1.3.28" + "caniuse-db": "1.0.30000784", + "electron-to-chromium": "1.3.29" } }, "chalk": { @@ -3847,9 +3847,9 @@ } }, "dom-helpers": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.2.1.tgz", - "integrity": "sha1-MgPgf+0he9H0JLAZc1WC/Deyglo=" + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.3.1.tgz", + "integrity": "sha512-2Sm+JaYn74OiTM2wHvxJOo3roiq/h25Yi69Fqk269cNUwIXsCvATB6CRSFC9Am/20G2b28hGv/+7NiWydIrPvg==" }, "dom-walk": { "version": "0.1.1", @@ -3895,9 +3895,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.28", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz", - "integrity": "sha1-jdTmRYCGZE6fnwoc8y4qH53/2e4=", + "version": "1.3.29", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.29.tgz", + "integrity": "sha1-elgja5VGjD52YAkTSFItZddzazY=", "dev": true }, "elliptic": { @@ -4000,9 +4000,9 @@ } }, "es5-shim": { - "version": "4.5.9", - "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.9.tgz", - "integrity": "sha1-Kh4rnlg/9f7Qwgo+4svz91IwpcA=", + "version": "4.5.10", + "resolved": "https://registry.npmjs.org/es5-shim/-/es5-shim-4.5.10.tgz", + "integrity": "sha512-vmryBdqKRO8Ei9LJ4yyEk/EOmAOGIagcHDYPpTAi6pot4IMHS1AC2q5cTKPmydpijg2iX8DVmCuqgrNxIWj8Yg==", "dev": true }, "es6-iterator": { @@ -4145,7 +4145,7 @@ "ignore": "3.3.7", "imurmurhash": "0.1.4", "inquirer": "0.12.0", - "is-my-json-valid": "2.16.1", + "is-my-json-valid": "2.17.1", "is-resolvable": "1.0.1", "js-yaml": "3.7.0", "json-stable-stringify": "1.0.1", @@ -4375,9 +4375,9 @@ } }, "eslint-plugin-prettier": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz", - "integrity": "sha512-AV8shBlGN9tRZffj5v/f4uiQWlP3qiQ+lh+BhTqRLuKSyczx+HRWVkVZaf7dOmguxghAH1wftnou/JUEEChhGg==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz", + "integrity": "sha512-P0EohHM1MwL36GX5l1TOEYyt/5d7hcxrX3CqCjibTN3dH7VCAy2kjsC/WB6dUHnpB4mFkZq1Ndfh2DYQ2QMEGQ==", "dev": true, "requires": { "fast-diff": "1.1.2", @@ -6232,7 +6232,7 @@ "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "dev": true, "requires": { - "ajv": "5.5.1", + "ajv": "5.5.2", "har-schema": "2.0.0" } }, @@ -6762,9 +6762,9 @@ } }, "is-my-json-valid": { - "version": "2.16.1", - "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz", - "integrity": "sha512-ochPsqWS1WXj8ZnMIV0vnNXooaMhp7cyL4FMSIPKTtnV0Ha/T19G2b9kkhcNsabV9bxYkze7/aLZJb/bYuFduQ==", + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.17.1.tgz", + "integrity": "sha512-Q2khNw+oBlWuaYvEEHtKSw/pCxD2L5Rc1C+UQme9X6JdRDh7m5D7HkozA0qa3DUkQ6VzCnEm8mVIQPyIRkI5sQ==", "dev": true, "requires": { "generate-function": "2.0.0", @@ -8726,9 +8726,9 @@ } }, "moment": { - "version": "2.19.4", - "resolved": "https://registry.npmjs.org/moment/-/moment-2.19.4.tgz", - "integrity": "sha512-1xFTAknSLfc47DIxHDUbnJWC+UwgWxATmymaxIPQpmMh7LBm7ZbwVEsuushqwL2GYZU0jie4xO+TK44hJPjNSQ==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.20.1.tgz", + "integrity": "sha512-Yh9y73JRljxW5QxN08Fner68eFLxM5ynNOAw2LbIB1YAGeQzZT8QFSUvkAz609Zf+IHhhaUxqZK8dG3W/+HEvg==", "dev": true }, "ms": { @@ -8994,7 +8994,7 @@ "requires": { "chalk": "1.1.3", "commander": "2.12.2", - "is-my-json-valid": "2.16.1", + "is-my-json-valid": "2.17.1", "pinkie-promise": "2.0.1" } }, @@ -9227,15 +9227,6 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, - "nvmrc-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nvmrc-check/-/nvmrc-check-1.0.2.tgz", - "integrity": "sha512-KkNioqcoEHEZeNLcWXL1klGiP6F+QNRTYl5ASeEFvldG/4Q9hDUsYSXpbGDw267Aq4sZ2qG1rKl+48SJxN2lRw==", - "dev": true, - "requires": { - "semver": "5.4.1" - } - }, "nwmatcher": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/nwmatcher/-/nwmatcher-1.4.3.tgz", @@ -9613,9 +9604,9 @@ } }, "patternfly": { - "version": "3.31.2", - "resolved": "https://registry.npmjs.org/patternfly/-/patternfly-3.31.2.tgz", - "integrity": "sha1-XqvBVjE/2plQhSuil8vnPdp/U2M=", + "version": "3.32.1", + "resolved": "https://registry.npmjs.org/patternfly/-/patternfly-3.32.1.tgz", + "integrity": "sha1-M3JdZSrJprf00/GKQYnbwxntWTo=", "requires": { "bootstrap": "3.3.7", "bootstrap-datepicker": "1.6.4", @@ -10788,8 +10779,8 @@ "integrity": "sha1-C9dnBCWL6CmyOYu1Dkti0aFmsLk=", "dev": true, "requires": { - "caniuse-db": "1.0.30000783", - "electron-to-chromium": "1.3.28" + "caniuse-db": "1.0.30000784", + "electron-to-chromium": "1.3.29" } }, "chalk": { @@ -12178,7 +12169,7 @@ "requires": { "babel-runtime": "6.26.0", "classnames": "2.2.5", - "dom-helpers": "3.2.1", + "dom-helpers": "3.3.1", "invariant": "2.2.2", "keycode": "2.1.9", "prop-types": "15.6.0", @@ -12328,20 +12319,21 @@ "integrity": "sha512-7vsooMx3siLAuEfTs8FYeP/lAORWWFXTO8PON3KgX0Htq1Oa+po6ioSjGyO0/GO5CVSMNhpWt6V2opeexHgBuQ==", "requires": { "classnames": "2.2.5", - "dom-helpers": "3.2.1", + "dom-helpers": "3.3.1", "prop-types": "15.6.0", "prop-types-extra": "1.0.1", "warning": "3.0.0" } }, "react-split-pane": { - "version": "0.1.71", - "resolved": "https://registry.npmjs.org/react-split-pane/-/react-split-pane-0.1.71.tgz", - "integrity": "sha512-c7aK5ffRyeOySSWVeoSEsQHBUrNtzXTB9TFNUnZv/2EM7HEnN1Rfsgxag/bpDcl5GuaY5IuMvq7XySc6nyokog==", + "version": "0.1.72", + "resolved": "https://registry.npmjs.org/react-split-pane/-/react-split-pane-0.1.72.tgz", + "integrity": "sha512-9dFQsCLNsz9SYBr61kcHUoMsyNtaB2sHNIMtaMX4RJjUWlRGnDqoGYeCnH+C+y6VbWSC7lBKpwibF83e5pdQNg==", "dev": true, "requires": { "@types/inline-style-prefixer": "3.0.1", - "@types/react": "16.0.30", + "@types/react": "16.0.31", + "fast-deep-equal": "1.0.0", "inline-style-prefixer": "3.0.8", "prop-types": "15.6.0", "react-style-proptype": "3.1.0" @@ -12383,7 +12375,7 @@ "dev": true, "requires": { "chain-function": "1.0.0", - "dom-helpers": "3.2.1", + "dom-helpers": "3.3.1", "loose-envify": "1.3.1", "prop-types": "15.6.0", "warning": "3.0.0" @@ -13096,7 +13088,7 @@ "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=", "dev": true, "requires": { - "ajv": "5.5.1" + "ajv": "5.5.2" } }, "scss-tokenizer": { @@ -14026,7 +14018,7 @@ "requires": { "chalk": "1.1.3", "commander": "2.12.2", - "is-my-json-valid": "2.16.1", + "is-my-json-valid": "2.17.1", "pinkie-promise": "2.0.1" } }, @@ -14554,7 +14546,7 @@ "requires": { "acorn": "5.2.1", "acorn-dynamic-import": "2.0.2", - "ajv": "5.5.1", + "ajv": "5.5.2", "ajv-keywords": "2.1.1", "async": "2.6.0", "enhanced-resolve": "3.4.1", diff --git a/package.json b/package.json index 30d982e0770..074dc5b9cae 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,6 @@ "eslint-plugin-standard": "^3.0.1", "jest": "^19.0.2", "node-sass": "^4.7.2", - "nvmrc-check": "^1.0.2", "patternfly": "^3.31.0", "prettier": "^1.7.4", "raf": "^3.4.0", @@ -77,7 +76,6 @@ "fontAwesome": "--include-path node_modules/patternfly/node_modules/font-awesome-sass/assets/stylesheets" }, "scripts": { - "postinstall": "nvmrc-check --node $(cat .nvmrc)", "start": "npm run storybook:run", "commit": "git-cz", "build": "npm run build:scripts && npm run build:sass && npm run build:less", @@ -85,7 +83,7 @@ "build:less": "mkdir -p dist/less && cp -r less/* dist/less", "build:sass": "mkdir -p dist/sass && cp -r sass/patternfly-react/* dist/sass && node-sass --output-style compressed --include-path sass $npm_package_sassIncludes_patternfly $npm_package_sassIncludes_bootstrap $npm_package_sassIncludes_fontAwesome -o dist/css sass/patternfly-react.scss", "lint": "eslint --max-warnings 0 src storybook", - "prettier": "prettier --write --single-quote --trailing-comma=all '{src,storybook}/**/*.js'", + "prettier": "prettier --write --single-quote --trailing-comma=none '{src,storybook}/**/*.js'", "prepublish": "npm run build", "test": "npm run lint && jest", "test:watch": "jest --watchAll", diff --git a/src/components/Alert/Alert.js b/src/components/Alert/Alert.js index 44e05301b3d..64404990bc0 100644 --- a/src/components/Alert/Alert.js +++ b/src/components/Alert/Alert.js @@ -10,7 +10,7 @@ import { ALERT_TYPES, ALERT_TYPE_ERROR } from './constants'; */ const Alert = ({ children, className, onDismiss, type, ...props }) => { const alertClass = ClassNames(className, 'alert', getClassName(type), { - 'alert-dismissable': onDismiss, + 'alert-dismissable': onDismiss }); const iconName = getIconName(type); @@ -40,10 +40,10 @@ Alert.propTypes = { /** the type of alert */ type: PropTypes.oneOf(ALERT_TYPES).isRequired, /** children nodes */ - children: PropTypes.node, + children: PropTypes.node }; Alert.defaultProps = { - type: ALERT_TYPE_ERROR, + type: ALERT_TYPE_ERROR }; Alert.ALERT_TYPES = ALERT_TYPES; diff --git a/src/components/Alert/Alert.stories.js b/src/components/Alert/Alert.stories.js index 4bd45b84e0d..400802cc01f 100644 --- a/src/components/Alert/Alert.stories.js +++ b/src/components/Alert/Alert.stories.js @@ -11,8 +11,8 @@ stories.addDecorator( defaultTemplate({ title: 'Alert / Inline Notification', documentationLink: - 'http://www.patternfly.org/pattern-library/communication/inline-notifications/', - }), + 'http://www.patternfly.org/pattern-library/communication/inline-notifications/' + }) ); stories.addWithInfo( @@ -22,7 +22,7 @@ stories.addWithInfo( {text('Label', 'Danger Will Robinson!')} - ), + ) ); stories.addWithInfo( @@ -33,11 +33,11 @@ stories.addWithInfo( {text( 'Label', - 'Warning! Better check yourself, you are not looking too good.', + 'Warning! Better check yourself, you are not looking too good.' )} - ), + ) ); stories.addWithInfo('with info', `This is the Alert with info type.`, () => ( @@ -45,7 +45,7 @@ stories.addWithInfo('with info', `This is the Alert with info type.`, () => ( {text( 'Label', - 'Heads up! This alert needs your attention, but it is not super important.', + 'Heads up! This alert needs your attention, but it is not super important.' )} @@ -59,11 +59,11 @@ stories.addWithInfo( {text( 'Label', - 'Well done! You successfully read this important alert message.', + 'Well done! You successfully read this important alert message.' )} - ), + ) ); stories.addWithInfo( @@ -74,9 +74,9 @@ stories.addWithInfo( {text( 'Label', - 'Well done! You successfully read this important alert message.', + 'Well done! You successfully read this important alert message.' )} - ), + ) ); diff --git a/src/components/Alert/Alert.test.js b/src/components/Alert/Alert.test.js index efeabcfce2c..1dd3ff4047e 100644 --- a/src/components/Alert/Alert.test.js +++ b/src/components/Alert/Alert.test.js @@ -9,7 +9,7 @@ test('Alert renders properly', () => { const component = renderer.create( Danger Will Robinson! - , + ); let tree = component.toJSON(); diff --git a/src/components/Alert/constants.js b/src/components/Alert/constants.js index 60fea857dee..d6819923826 100644 --- a/src/components/Alert/constants.js +++ b/src/components/Alert/constants.js @@ -9,5 +9,5 @@ export const ALERT_TYPES = [ ALERT_TYPE_ERROR, ALERT_TYPE_WARNING, ALERT_TYPE_SUCCESS, - ALERT_TYPE_INFO, + ALERT_TYPE_INFO ]; diff --git a/src/components/Alert/helpers.js b/src/components/Alert/helpers.js index 24fd29a6d94..d2c1a1d0b90 100644 --- a/src/components/Alert/helpers.js +++ b/src/components/Alert/helpers.js @@ -3,7 +3,7 @@ import { ALERT_TYPE_ERROR, ALERT_TYPE_WARNING, ALERT_TYPE_SUCCESS, - ALERT_TYPE_INFO, + ALERT_TYPE_INFO } from './constants'; export const getIconName = type => { diff --git a/src/components/Badge/Badge.stories.js b/src/components/Badge/Badge.stories.js index 08cf53d33a6..4263b955d9f 100644 --- a/src/components/Badge/Badge.stories.js +++ b/src/components/Badge/Badge.stories.js @@ -21,8 +21,8 @@ stories.addDecorator( title: 'Badges', documentationLink: 'http://www.patternfly.org/pattern-library/widgets/#badges', - description: description, - }), + description: description + }) ); stories.addWithInfo('Badges', '', () => ( diff --git a/src/components/Breadcrumb/Breadcrumb.stories.js b/src/components/Breadcrumb/Breadcrumb.stories.js index ad383e30f4b..74c15aa3418 100644 --- a/src/components/Breadcrumb/Breadcrumb.stories.js +++ b/src/components/Breadcrumb/Breadcrumb.stories.js @@ -21,8 +21,8 @@ stories.addDecorator( title: 'Breadcrumb', documentationLink: 'http://www.patternfly.org/pattern-library/navigation/breadcrumbs/', - description: description, - }), + description: description + }) ); stories.addWithInfo('Breadcrumb', '', () => ( diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js index 83b7103e6cf..9344a3fb8f0 100644 --- a/src/components/Button/Button.js +++ b/src/components/Button/Button.js @@ -7,7 +7,7 @@ const Button = props => ; Button.propTypes = { ...BsButton.propTypes, - bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES), + bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES) }; Button.BUTTON_BS_STYLES = BUTTON_BS_STYLES; diff --git a/src/components/Button/Button.stories.js b/src/components/Button/Button.stories.js index 93930a0f098..5d608f31702 100644 --- a/src/components/Button/Button.stories.js +++ b/src/components/Button/Button.stories.js @@ -25,8 +25,8 @@ stories.addDecorator( title: 'Button', documentationLink: 'http://www.patternfly.org/pattern-library/widgets/#buttons', - description: description, - }), + description: description + }) ); stories.addWithInfo('Button', '', () => ( diff --git a/src/components/Button/Button.test.js b/src/components/Button/Button.test.js index a6547e57afe..9af175f59c8 100644 --- a/src/components/Button/Button.test.js +++ b/src/components/Button/Button.test.js @@ -7,7 +7,7 @@ import Button from './Button'; test('Button renders properly', () => { const component = renderer.create( - , + ); let tree = component.toJSON(); @@ -18,7 +18,7 @@ test('Button allows to specify size and style', () => { const component = renderer.create( , + ); let tree = component.toJSON(); diff --git a/src/components/Button/DropdownButton.js b/src/components/Button/DropdownButton.js index 4bda1189043..c4dcd59583a 100644 --- a/src/components/Button/DropdownButton.js +++ b/src/components/Button/DropdownButton.js @@ -7,7 +7,7 @@ const DropdownButton = props => ; DropdownButton.propTypes = { ...BsDropdownButton.propTypes, - bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES), + bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES) }; DropdownButton.BUTTON_BS_STYLES = BUTTON_BS_STYLES; diff --git a/src/components/Button/DropdownButton.test.js b/src/components/Button/DropdownButton.test.js index 5553f27a183..25b797c3a8b 100644 --- a/src/components/Button/DropdownButton.test.js +++ b/src/components/Button/DropdownButton.test.js @@ -17,7 +17,7 @@ test('DropdownButton should renders properly', () => { Separated link - , + ); const tree = component.toJSON(); diff --git a/src/components/Button/SplitButton.js b/src/components/Button/SplitButton.js index dc36d38da5b..59a8c64ea31 100644 --- a/src/components/Button/SplitButton.js +++ b/src/components/Button/SplitButton.js @@ -7,7 +7,7 @@ const SplitButton = props => ; SplitButton.propTypes = { ...BsSplitButton.propTypes, - bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES), + bsStyle: PropTypes.oneOf(BUTTON_BS_STYLES) }; SplitButton.BUTTON_BS_STYLES = BUTTON_BS_STYLES; diff --git a/src/components/Button/SplitButton.test.js b/src/components/Button/SplitButton.test.js index bc17889810e..e47d5c84f25 100644 --- a/src/components/Button/SplitButton.test.js +++ b/src/components/Button/SplitButton.test.js @@ -17,7 +17,7 @@ test('SplitButton should renders properly', () => { Separated link - , + ); const tree = component.toJSON(); diff --git a/src/components/Chart/AreaChart.js b/src/components/Chart/AreaChart.js index 6f364d293d2..eae9deb2f6e 100644 --- a/src/components/Chart/AreaChart.js +++ b/src/components/Chart/AreaChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const AreaChart = getComposer('AREA_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default AreaChart; diff --git a/src/components/Chart/AreaChart.test.js b/src/components/Chart/AreaChart.test.js index 965fd22ca02..af68374aca5 100644 --- a/src/components/Chart/AreaChart.test.js +++ b/src/components/Chart/AreaChart.test.js @@ -10,15 +10,15 @@ const renderer = new ShallowRenderer(); test('AreaChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); test('SingleAreaChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); diff --git a/src/components/Chart/BarChart.js b/src/components/Chart/BarChart.js index de4ccef5c7f..8e0546faf44 100644 --- a/src/components/Chart/BarChart.js +++ b/src/components/Chart/BarChart.js @@ -19,7 +19,7 @@ const mapBarChartProps = props => { const BarChart = compose(getComposer('BAR_CHART'), mapProps(mapBarChartProps))( ({ className, type, data, ...props }) => ( - ), + ) ); export default BarChart; diff --git a/src/components/Chart/BarChart.test.js b/src/components/Chart/BarChart.test.js index f0c074dfd64..186c97f9cad 100644 --- a/src/components/Chart/BarChart.test.js +++ b/src/components/Chart/BarChart.test.js @@ -9,24 +9,22 @@ const renderer = new ShallowRenderer(); test('BarChart renders properly', () => { expect( - renderer.render( - , - ), + renderer.render() ).toMatchSnapshot(); }); test('GroupedBarChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); test('StackedBarChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); diff --git a/src/components/Chart/Chart.stories.js b/src/components/Chart/Chart.stories.js index 52aeca4e492..d11fe9d0dec 100644 --- a/src/components/Chart/Chart.stories.js +++ b/src/components/Chart/Chart.stories.js @@ -7,7 +7,7 @@ import { barChartAddWithInfo, donutChartAddWithInfo, lineChartAddWithInfo, - pieChartAddWithInfo, + pieChartAddWithInfo } from './Stories'; const stories = storiesOf('Chart', module); @@ -26,8 +26,8 @@ stories.addDecorator( title: 'Chart', documentationLink: 'http://www.patternfly.org/pattern-library/data-visualization/line-chart/', - description: description, - }), + description: description + }) ); /** diff --git a/src/components/Chart/DonutChart.js b/src/components/Chart/DonutChart.js index edc8a54b84e..ddacb68c51f 100644 --- a/src/components/Chart/DonutChart.js +++ b/src/components/Chart/DonutChart.js @@ -10,7 +10,7 @@ const pfSetDonutChartTitle = patternfly.pfSetDonutChartTitle; const colIndexOfMaxValue = columns => { return columns.reduce( (iMax, x, i, arr) => (x[1] > arr[iMax][1] ? i : iMax), - 0, + 0 ); }; @@ -41,7 +41,7 @@ const setDonutTitle = obj => { pfSetDonutChartTitle( findDOMNode(obj), title.primary || primary, - title.secondary || secondary, + title.secondary || secondary ); }; @@ -51,13 +51,13 @@ const addDonutTitle = lifecycle({ }, componentDidUpdate(prevProps) { setDonutTitle(this); - }, + } }); const DonutChart = compose(getComposer('DONUT_CHART'), addDonutTitle)( ({ className, type, data, ...props }) => ( - ), + ) ); export default DonutChart; diff --git a/src/components/Chart/DonutChart.test.js b/src/components/Chart/DonutChart.test.js index 2175914cd4d..45c0f8af3dd 100644 --- a/src/components/Chart/DonutChart.test.js +++ b/src/components/Chart/DonutChart.test.js @@ -10,7 +10,7 @@ const renderer = new ShallowRenderer(); test('DonutChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); diff --git a/src/components/Chart/GroupedBarChart.js b/src/components/Chart/GroupedBarChart.js index cb86f76f23d..73280dd8767 100644 --- a/src/components/Chart/GroupedBarChart.js +++ b/src/components/Chart/GroupedBarChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const GroupedBarChart = getComposer('GROUPED_BAR_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default GroupedBarChart; diff --git a/src/components/Chart/LineChart.js b/src/components/Chart/LineChart.js index b51b9e8a90b..40b418eec66 100644 --- a/src/components/Chart/LineChart.js +++ b/src/components/Chart/LineChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const LineChart = getComposer('LINE_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default LineChart; diff --git a/src/components/Chart/LineChart.test.js b/src/components/Chart/LineChart.test.js index 37fdf697b05..dc052b797ff 100644 --- a/src/components/Chart/LineChart.test.js +++ b/src/components/Chart/LineChart.test.js @@ -10,23 +10,23 @@ const renderer = new ShallowRenderer(); test('LineChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); test('SingleLineChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); test('SparklineChart renders properly', () => { expect( renderer.render( - , - ), + + ) ).toMatchSnapshot(); }); diff --git a/src/components/Chart/PieChart.js b/src/components/Chart/PieChart.js index afd228f4ee0..bd2314e563b 100644 --- a/src/components/Chart/PieChart.js +++ b/src/components/Chart/PieChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const PieChart = getComposer('PIE_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default PieChart; diff --git a/src/components/Chart/SingleAreaChart.js b/src/components/Chart/SingleAreaChart.js index d78df6c7215..0f238f06abb 100644 --- a/src/components/Chart/SingleAreaChart.js +++ b/src/components/Chart/SingleAreaChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const SingleAreaChart = getComposer('SINGLE_AREA_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default SingleAreaChart; diff --git a/src/components/Chart/SingleLineChart.js b/src/components/Chart/SingleLineChart.js index 2544838a34b..370c1b13c96 100644 --- a/src/components/Chart/SingleLineChart.js +++ b/src/components/Chart/SingleLineChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const SingleLineChart = getComposer('SINGLE_LINE_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default SingleLineChart; diff --git a/src/components/Chart/SparklineChart.js b/src/components/Chart/SparklineChart.js index a690fe10b1e..e35308d1454 100644 --- a/src/components/Chart/SparklineChart.js +++ b/src/components/Chart/SparklineChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const SparklineChart = getComposer('SPARKLINE_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default SparklineChart; diff --git a/src/components/Chart/StackedBarChart.js b/src/components/Chart/StackedBarChart.js index 3237a4e6f6b..ffe0e899e72 100644 --- a/src/components/Chart/StackedBarChart.js +++ b/src/components/Chart/StackedBarChart.js @@ -5,7 +5,7 @@ import { getComposer } from './constants'; const StackedBarChart = getComposer('STACKED_BAR_CHART')( ({ className, type, data, ...props }) => ( - ), + ) ); export default StackedBarChart; diff --git a/src/components/Chart/Stories/AreaChartStory.js b/src/components/Chart/Stories/AreaChartStory.js index 1084ef980d7..a72d94f4383 100644 --- a/src/components/Chart/Stories/AreaChartStory.js +++ b/src/components/Chart/Stories/AreaChartStory.js @@ -9,17 +9,17 @@ const areaChartDataColumns = [ ['data1', 350, 400, 350, 0], ['data2', 140, 100, 150, 205, 145, 50], ['data3', 10, 60, 90, 10, 325, 400], - ['data4', 260, 10, 305, 100, 50, 150], + ['data4', 260, 10, 305, 100, 50, 150] ]; const areaChartData = { columns: areaChartDataColumns, - type: 'area-spline', + type: 'area-spline' }; const singleAreaChartDataColumns = [['data2', 140, 100, 150, 205, 145, 50]]; const singleAreaChartData = { columns: singleAreaChartDataColumns, - type: 'area-spline', + type: 'area-spline' }; /** diff --git a/src/components/Chart/Stories/BarChartStory.js b/src/components/Chart/Stories/BarChartStory.js index 0f851a526b9..f3c4cdfac90 100644 --- a/src/components/Chart/Stories/BarChartStory.js +++ b/src/components/Chart/Stories/BarChartStory.js @@ -12,11 +12,11 @@ const columnsData = [['data1', 400, 360, 320, 175]]; const barChartConfigAxis = { x: { categories: categories, - type: 'category', - }, + type: 'category' + } }; const barChartConfigData = { - columns: columnsData, + columns: columnsData }; const groupedcCategories = ['2013', '2014', '2015']; @@ -24,46 +24,46 @@ const groupedColumnsData = [ ['Q1', 400, 250, 375], ['Q2', 355, 305, 300], ['Q3', 315, 340, 276], - ['Q4', 180, 390, 190], + ['Q4', 180, 390, 190] ]; const groupedColors = { pattern: [ patternfly.pfPaletteColors.red, patternfly.pfPaletteColors.blue, patternfly.pfPaletteColors.orange, - patternfly.pfPaletteColors.green, - ], + patternfly.pfPaletteColors.green + ] }; const groupedBarChartConfigAxis = { x: { categories: groupedcCategories, - type: 'category', - }, + type: 'category' + } }; const groupedBarChartConfigData = { columns: groupedColumnsData, - order: null, + order: null }; const groupedBarChartConfigColor = groupedColors; const stackedBarChartConfigAxis = { x: { categories: groupedcCategories, - type: 'category', - }, + type: 'category' + } }; const stackedBarChartConfigData = { groups: [categories], columns: groupedColumnsData, - order: null, + order: null }; const horizontalBarChartConfigAxis = { rotated: true, x: { categories: groupedcCategories, - type: 'category', - }, + type: 'category' + } }; /** diff --git a/src/components/Chart/Stories/DonutChartStory.js b/src/components/Chart/Stories/DonutChartStory.js index f95db05b387..7970b183216 100644 --- a/src/components/Chart/Stories/DonutChartStory.js +++ b/src/components/Chart/Stories/DonutChartStory.js @@ -19,29 +19,29 @@ const pfGetUtilizationDonutTooltipContents = d => { const donutConfigData = { columns: [['MHz Used', 60], ['MHz Available', 40]], groups: [['used', 'available']], - order: null, + order: null }; const donutConfigTooltip = { - contents: pfGetUtilizationDonutTooltipContents, + contents: pfGetUtilizationDonutTooltipContents }; const donutData = { colors: { Cats: patternfly.pfPaletteColors.blue, Hamsters: patternfly.pfPaletteColors.green, Fish: patternfly.pfPaletteColors.orange, - Dogs: patternfly.pfPaletteColors.red, + Dogs: patternfly.pfPaletteColors.red }, - columns: [['Dogs', 2], ['Cats', 2], ['Fish', 3], ['Hamsters', 1]], + columns: [['Dogs', 2], ['Cats', 2], ['Fish', 3], ['Hamsters', 1]] }; const donutRightConfigData = donutData; const donutRightConfigLegend = { show: true, - position: 'right', + position: 'right' }; const donutRightConfigTooltip = { show: true, - contents: patternfly.pfDonutTooltipContents, + contents: patternfly.pfDonutTooltipContents }; const donutRightConfigTitle = { type: 'total', secondary: 'Animals' }; @@ -58,7 +58,7 @@ const donutChartAddWithInfo = stories => { id="donunt-chart-1" size={{ width: 210, - height: 210, + height: 210 }} data={donutConfigData} tooltip={donutConfigTooltip} @@ -72,7 +72,7 @@ const donutChartAddWithInfo = stories => { id="donunt-chart-2" size={{ width: 210, - height: 210, + height: 210 }} data={donutRightConfigData} tooltip={donutRightConfigTooltip} diff --git a/src/components/Chart/Stories/LineChartStory.js b/src/components/Chart/Stories/LineChartStory.js index a799d91d6df..131b6dadfab 100644 --- a/src/components/Chart/Stories/LineChartStory.js +++ b/src/components/Chart/Stories/LineChartStory.js @@ -10,25 +10,25 @@ const lineChartDataColumns = [ ['data2', 50, 220, 310, 240, 115, 25], ['data3', 70, 100, 390, 295, 170, 220], ['data4', 10, 340, 30, 290, 35, 20], - ['data5', 90, 150, 160, 165, 180, 5], + ['data5', 90, 150, 160, 165, 180, 5] ]; const lineChartConfigData = { - columns: lineChartDataColumns, + columns: lineChartDataColumns }; const singleLineChartDataColumns = [['data1', 30, 200, 100, 400, 150, 250]]; const singleLineChartConfigData = { - columns: singleLineChartDataColumns, + columns: singleLineChartDataColumns }; const splineChartConfigData = { columns: lineChartDataColumns, - type: 'spline', + type: 'spline' }; const singleSplineChartConfigData = { columns: singleLineChartDataColumns, - type: 'spline', + type: 'spline' }; /** diff --git a/src/components/Chart/Stories/PieChartStory.js b/src/components/Chart/Stories/PieChartStory.js index 874e2a829ad..11f1f32db94 100644 --- a/src/components/Chart/Stories/PieChartStory.js +++ b/src/components/Chart/Stories/PieChartStory.js @@ -11,13 +11,13 @@ const pieChartRightConfigData = { Cats: patternfly.pfPaletteColors.blue, Hamsters: patternfly.pfPaletteColors.green, Fish: patternfly.pfPaletteColors.orange, - Dogs: patternfly.pfPaletteColors.red, + Dogs: patternfly.pfPaletteColors.red }, - columns: [['Dogs', 2], ['Cats', 2], ['Fish', 3], ['Hamsters', 1]], + columns: [['Dogs', 2], ['Cats', 2], ['Fish', 3], ['Hamsters', 1]] }; const pieChartRightConfigLegend = { show: true, - position: 'right', + position: 'right' }; /** @@ -33,7 +33,7 @@ const pieChartAddWithInfo = stories => { id="pie-chart-1" size={{ width: 251, - height: 161, + height: 161 }} data={pieChartRightConfigData} legend={pieChartRightConfigLegend} diff --git a/src/components/Chart/constants.js b/src/components/Chart/constants.js index 42a61e9f097..a0106fb4d85 100644 --- a/src/components/Chart/constants.js +++ b/src/components/Chart/constants.js @@ -4,7 +4,7 @@ import { setDisplayName, mapProps, defaultProps, - setPropTypes, + setPropTypes } from 'recompose'; import C3Chart from 'react-c3js'; @@ -19,62 +19,62 @@ const CHART_CONFIG = { type: 'area', displayName: 'AreaChart', className: 'area-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultAreaConfig(), + defaultConfig: c3ChartDefaults.getDefaultAreaConfig() }, BAR_CHART: { type: 'bar', displayName: 'BarChart', className: 'bar-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultBarConfig(), + defaultConfig: c3ChartDefaults.getDefaultBarConfig() }, DONUT_CHART: { type: 'donut', displayName: 'DonutChart', className: 'donut-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultDonutConfig(), + defaultConfig: c3ChartDefaults.getDefaultDonutConfig() }, GROUPED_BAR_CHART: { type: 'bar', displayName: 'GroupedBarChart', className: 'bar-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultGroupedBarConfig(), + defaultConfig: c3ChartDefaults.getDefaultGroupedBarConfig() }, LINE_CHART: { type: 'line', displayName: 'LineChart', className: 'line-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultLineConfig(), + defaultConfig: c3ChartDefaults.getDefaultLineConfig() }, PIE_CHART: { type: 'pie', displayName: 'PieChart', className: 'pie-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultPieConfig(), + defaultConfig: c3ChartDefaults.getDefaultPieConfig() }, SINGLE_AREA_CHART: { type: 'area', displayName: 'SingleAreaChart', className: 'area-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultSingleAreaConfig(), + defaultConfig: c3ChartDefaults.getDefaultSingleAreaConfig() }, SINGLE_LINE_CHART: { type: 'line', displayName: 'SingleLineChart', className: 'line-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultSingleLineConfig(), + defaultConfig: c3ChartDefaults.getDefaultSingleLineConfig() }, SPARKLINE_CHART: { type: 'area', displayName: 'SparklineChart', className: 'chart-pf-sparkline', - defaultConfig: c3ChartDefaults.getDefaultSparklineConfig(), + defaultConfig: c3ChartDefaults.getDefaultSparklineConfig() }, STACKED_BAR_CHART: { type: 'bar', displayName: 'StackedBarChart', className: 'bar-chart-pf', - defaultConfig: c3ChartDefaults.getDefaultStackedBarConfig(), - }, + defaultConfig: c3ChartDefaults.getDefaultStackedBarConfig() + } }; /** @@ -99,14 +99,14 @@ const getComposer = name => { setDisplayName(config.displayName), setPropTypes({ data: PropTypes.object.isRequired, - ...C3Chart.propTypes, + ...C3Chart.propTypes }), defaultProps({ type: config.type, className: config.className, - ...config.defaultConfig, + ...config.defaultConfig }), - mapProps(props => mapChartProps(name, props)), + mapProps(props => mapChartProps(name, props)) ); }; diff --git a/src/components/DropdownKebab/DropdownKebab.js b/src/components/DropdownKebab/DropdownKebab.js index b91a88191d8..562f1fb96f9 100644 --- a/src/components/DropdownKebab/DropdownKebab.js +++ b/src/components/DropdownKebab/DropdownKebab.js @@ -26,6 +26,6 @@ DropdownKebab.propTypes = { /** kebab dropdown id */ id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired, /** menu right aligned */ - pullRight: PropTypes.bool, + pullRight: PropTypes.bool }; export default DropdownKebab; diff --git a/src/components/DropdownKebab/DropdownKebab.stories.js b/src/components/DropdownKebab/DropdownKebab.stories.js index c35a207f137..ff75fe6c27c 100644 --- a/src/components/DropdownKebab/DropdownKebab.stories.js +++ b/src/components/DropdownKebab/DropdownKebab.stories.js @@ -13,8 +13,8 @@ stories.addDecorator( defaultTemplate({ title: 'Kebab Dropdown', documentationLink: - 'http://www.patternfly.org/pattern-library/widgets/#kebabs', - }), + 'http://www.patternfly.org/pattern-library/widgets/#kebabs' + }) ); stories.addWithInfo( @@ -32,5 +32,5 @@ stories.addWithInfo( Separated link - ), + ) ); diff --git a/src/components/DropdownKebab/DropdownKebab.test.js b/src/components/DropdownKebab/DropdownKebab.test.js index 00773e50787..828f32ca055 100644 --- a/src/components/DropdownKebab/DropdownKebab.test.js +++ b/src/components/DropdownKebab/DropdownKebab.test.js @@ -14,7 +14,7 @@ test('Kebab dropdown renders properly', () => { Something else here Separated link - , + ); let tree = component.toJSON(); diff --git a/src/components/Grid/Grid.stories.js b/src/components/Grid/Grid.stories.js index 87e8d2c4688..0285439f582 100644 --- a/src/components/Grid/Grid.stories.js +++ b/src/components/Grid/Grid.stories.js @@ -29,14 +29,14 @@ const dummySentences = [ 'Nullam tristique diam non turpis.', 'Cras placerat accumsan nulla.', 'Nullam rutrum.', - 'Nam vestibulum accumsan nisl.', + 'Nam vestibulum accumsan nisl.' ]; stories.addDecorator( defaultTemplate({ title: 'Grid', - description: description, - }), + description: description + }) ); stories.addWithInfo('Basic Grid', '', () => ( diff --git a/src/components/Icon/Icon.js b/src/components/Icon/Icon.js index a0cb6233260..976d57fdc74 100644 --- a/src/components/Icon/Icon.js +++ b/src/components/Icon/Icon.js @@ -15,9 +15,9 @@ Icon.propTypes = { /** Icon type */ type: PropTypes.oneOf(['fa', 'pf']), /** Font awesome icon rendered if name prop is provided */ - name: PropTypes.string.isRequired, + name: PropTypes.string.isRequired }; Icon.defaultProps = { - type: 'fa', + type: 'fa' }; export default Icon; diff --git a/src/components/Icon/InnerComponents/PatternflyIcon.js b/src/components/Icon/InnerComponents/PatternflyIcon.js index fc48282737a..63c4eac0dff 100644 --- a/src/components/Icon/InnerComponents/PatternflyIcon.js +++ b/src/components/Icon/InnerComponents/PatternflyIcon.js @@ -16,6 +16,6 @@ PatternflyIcon.propTypes = { /** Patternfly Icon font name */ name: PropTypes.string.isRequired, /** additional classes */ - className: PropTypes.string, + className: PropTypes.string }; export default PatternflyIcon; diff --git a/src/components/Label/Label.stories.js b/src/components/Label/Label.stories.js index 3681c4b8e74..c7511f83281 100644 --- a/src/components/Label/Label.stories.js +++ b/src/components/Label/Label.stories.js @@ -19,8 +19,8 @@ stories.addDecorator( title: 'Label', documentationLink: 'http://www.patternfly.org/pattern-library/widgets/#labels', - description: description, - }), + description: description + }) ); stories.addWithInfo('Label', () => { diff --git a/src/components/ListGroup/ListGroup.stories.js b/src/components/ListGroup/ListGroup.stories.js index 96966aa4f65..22be8920296 100644 --- a/src/components/ListGroup/ListGroup.stories.js +++ b/src/components/ListGroup/ListGroup.stories.js @@ -21,8 +21,8 @@ stories.addDecorator( title: 'ListGroup', documentationLink: 'http://www.patternfly.org/pattern-library/widgets/#list-group', - description: description, - }), + description: description + }) ); stories.addWithInfo('Basic Example', '', () => ( diff --git a/src/components/ListView/ListView.js b/src/components/ListView/ListView.js index aca5e2bd7a4..0812c31fa13 100644 --- a/src/components/ListView/ListView.js +++ b/src/components/ListView/ListView.js @@ -67,7 +67,7 @@ ListView.propTypes = { /** Additional css classes */ className: PropTypes.string, /** Children nodes - ListViewGroupItem or ListViewItem instances */ - children: PropTypes.node, + children: PropTypes.node }; export default ListView; diff --git a/src/components/ListView/ListView.stories.js b/src/components/ListView/ListView.stories.js index 3fb21c3850d..f8199194e5a 100644 --- a/src/components/ListView/ListView.stories.js +++ b/src/components/ListView/ListView.stories.js @@ -18,8 +18,8 @@ stories.addDecorator( defaultTemplate({ title: 'ListView', documentationLink: - 'http://www.patternfly.org/pattern-library/content-views/list-view/', - }), + 'http://www.patternfly.org/pattern-library/content-views/list-view/' + }) ); const renderActions = () => ( @@ -36,7 +36,7 @@ const renderAdditionalInfoItems = itemProperties => { 'pficon-flavor': prop === 'hosts', 'pficon-cluster': prop === 'clusters', 'pficon-container-node': prop === 'nodes', - 'pficon-image': prop === 'images', + 'pficon-image': prop === 'images' }); return ( @@ -72,7 +72,7 @@ stories.addWithInfo( ))} ); - }, + } ); stories.addWithInfo('ListItem variants', `ListView usage example.`, () => ( @@ -94,7 +94,7 @@ stories.addWithInfo('ListItem variants', `ListView usage example.`, () => ( , Item 2 - , + ]} actions={
@@ -142,7 +142,7 @@ stories.addWithInfo('ListItem variants', `ListView usage example.`, () => ( 35% Service Two - , + ]} stacked={boolean('Stacked', false)} /> @@ -154,7 +154,7 @@ stories.addWithInfo('ListItem variants', `ListView usage example.`, () => ( , Info Items - , + ]} stacked={boolean('Stacked', false)} /> @@ -182,7 +182,7 @@ stories.addWithInfo('ListItem variants', `ListView usage example.`, () => ( 28 Clusters - , + ]} stacked={boolean('Stacked', false)} /> diff --git a/src/components/ListView/ListView.test.js b/src/components/ListView/ListView.test.js index a180d3664c0..75bc8659ef5 100644 --- a/src/components/ListView/ListView.test.js +++ b/src/components/ListView/ListView.test.js @@ -6,7 +6,7 @@ import { ListView } from './index'; import { mockListItems, renderActions, - renderAdditionalInfoItems, + renderAdditionalInfoItems } from './__mocks__/mockListItems'; test('ListView renders properly', () => { @@ -28,7 +28,7 @@ test('ListView renders properly', () => { ))} - , + ); const tree = component.toJSON(); diff --git a/src/components/ListView/ListViewActions.js b/src/components/ListView/ListViewActions.js index 714795a9d50..b70d03281fe 100644 --- a/src/components/ListView/ListViewActions.js +++ b/src/components/ListView/ListViewActions.js @@ -9,6 +9,6 @@ const ListViewActions = ({ children }) => ( ); ListViewActions.propTypes = { /** Child nodes which render individual actions - Buttons, DropdownKebab... */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewActions; diff --git a/src/components/ListView/ListViewAdditionalInfo.js b/src/components/ListView/ListViewAdditionalInfo.js index a4c4c2d2e87..f8fd3471c69 100644 --- a/src/components/ListView/ListViewAdditionalInfo.js +++ b/src/components/ListView/ListViewAdditionalInfo.js @@ -9,7 +9,7 @@ const ListViewAdditionalInfo = ({ children }) => ( ); ListViewAdditionalInfo.propTypes = { /** Child nodes - an array of ListViewInfoItem instances */ - children: PropTypes.arrayOf(PropTypes.node), + children: PropTypes.arrayOf(PropTypes.node) }; export default ListViewAdditionalInfo; diff --git a/src/components/ListView/ListViewBody.js b/src/components/ListView/ListViewBody.js index 9df0e0bfdc5..8b413bc25bf 100644 --- a/src/components/ListView/ListViewBody.js +++ b/src/components/ListView/ListViewBody.js @@ -9,6 +9,6 @@ const ListViewBody = ({ children }) => ( ); ListViewBody.propTypes = { /** Child nodes - ListViewDescription or ListViewAdditionalInfo instances */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewBody; diff --git a/src/components/ListView/ListViewCheckbox.js b/src/components/ListView/ListViewCheckbox.js index 7f7bba21805..1581ec09828 100644 --- a/src/components/ListView/ListViewCheckbox.js +++ b/src/components/ListView/ListViewCheckbox.js @@ -15,6 +15,6 @@ ListViewCheckbox.propTypes = { /** Child node - form input component */ children: PropTypes.node.isRequired, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default ListViewCheckbox; diff --git a/src/components/ListView/ListViewDescription.js b/src/components/ListView/ListViewDescription.js index b4a02f8301f..e31fa239d75 100644 --- a/src/components/ListView/ListViewDescription.js +++ b/src/components/ListView/ListViewDescription.js @@ -9,6 +9,6 @@ const ListViewDescription = ({ children }) => ( ); ListViewDescription.propTypes = { /** Child nodes - ListViewDescriptionHeading or ListViewDescriptionText instances */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewDescription; diff --git a/src/components/ListView/ListViewDescriptionHeading.js b/src/components/ListView/ListViewDescriptionHeading.js index 9ba4cf37997..391ea142d9a 100644 --- a/src/components/ListView/ListViewDescriptionHeading.js +++ b/src/components/ListView/ListViewDescriptionHeading.js @@ -9,6 +9,6 @@ const ListViewDescriptionHeading = ({ children }) => ( ); ListViewDescriptionHeading.propTypes = { /** Child node - content rendered as heading */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewDescriptionHeading; diff --git a/src/components/ListView/ListViewDescriptionText.js b/src/components/ListView/ListViewDescriptionText.js index 4eadbdf755d..dbf22175c62 100644 --- a/src/components/ListView/ListViewDescriptionText.js +++ b/src/components/ListView/ListViewDescriptionText.js @@ -9,6 +9,6 @@ const ListViewDescriptionText = ({ children }) => ( ); ListViewDescriptionText.propTypes = { /** Child node - content rendered in text section of ListViewItem */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewDescriptionText; diff --git a/src/components/ListView/ListViewExpand.js b/src/components/ListView/ListViewExpand.js index 38230dff739..d6b5de1d239 100644 --- a/src/components/ListView/ListViewExpand.js +++ b/src/components/ListView/ListViewExpand.js @@ -9,7 +9,7 @@ import PropTypes from 'prop-types'; const ListViewExpand = ({ children, expanded, toggleExpanded }) => { const classes = cx({ 'fa fa-angle-right': true, - 'fa-angle-down': expanded, + 'fa-angle-down': expanded }); return (
@@ -34,10 +34,10 @@ ListViewGroupItem.propTypes = { /** Toggles the item expanded */ expanded: PropTypes.bool.isRequired, /** Toggles the item stacked */ - stacked: PropTypes.bool.isRequired, + stacked: PropTypes.bool.isRequired }; ListViewGroupItem.defaultProps = { expanded: false, - stacked: false, + stacked: false }; export default ListViewGroupItem; diff --git a/src/components/ListView/ListViewGroupItemContainer.js b/src/components/ListView/ListViewGroupItemContainer.js index a37880599c0..411b48fc122 100644 --- a/src/components/ListView/ListViewGroupItemContainer.js +++ b/src/components/ListView/ListViewGroupItemContainer.js @@ -9,7 +9,7 @@ import PropTypes from 'prop-types'; const ListViewGroupItemContainer = ({ children, expanded, onClose }) => { const classes = cx({ 'list-group-item-container container-fluid': true, - hidden: !expanded, + hidden: !expanded }); return (
@@ -28,9 +28,9 @@ ListViewGroupItemContainer.propTypes = { /** Boolean indicating whether expandable content is visible */ expanded: PropTypes.bool.isRequired, /** Function to call when 'close icon' is clicked */ - onClose: PropTypes.func, + onClose: PropTypes.func }; ListViewGroupItemContainer.defaultProps = { - expanded: false, + expanded: false }; export default ListViewGroupItemContainer; diff --git a/src/components/ListView/ListViewGroupItemHeader.js b/src/components/ListView/ListViewGroupItemHeader.js index 1fea5759c2c..d4fc2c55bfc 100644 --- a/src/components/ListView/ListViewGroupItemHeader.js +++ b/src/components/ListView/ListViewGroupItemHeader.js @@ -28,6 +28,6 @@ ListViewGroupItemHeader.propTypes = { /** Children nodes */ children: PropTypes.node, /** Function to execute to trigger toggle */ - toggleExpanded: PropTypes.func.isRequired, + toggleExpanded: PropTypes.func.isRequired }; export default ListViewGroupItemHeader; diff --git a/src/components/ListView/ListViewIcon.js b/src/components/ListView/ListViewIcon.js index 7b64f11d524..ff435c31213 100644 --- a/src/components/ListView/ListViewIcon.js +++ b/src/components/ListView/ListViewIcon.js @@ -24,10 +24,10 @@ ListViewIcon.propTypes = { /** additional classes */ className: PropTypes.string, /** Icon size (sm, md, lg), defaults to 'sm' */ - size: PropTypes.oneOf(['sm', 'md', 'lg']), + size: PropTypes.oneOf(['sm', 'md', 'lg']) }; ListViewIcon.defaultProps = { type: 'fa', - size: 'sm', + size: 'sm' }; export default ListViewIcon; diff --git a/src/components/ListView/ListViewInfoItem.js b/src/components/ListView/ListViewInfoItem.js index e2857194d0f..530e3a930d8 100644 --- a/src/components/ListView/ListViewInfoItem.js +++ b/src/components/ListView/ListViewInfoItem.js @@ -9,7 +9,7 @@ const ListViewInfoItem = ({ children, className, stacked, ...rest }) => { const classes = cx( { 'list-view-pf-additional-info-item-stacked': stacked }, 'list-view-pf-additional-info-item', - className, + className ); return (
e.stopPropagation()} {...rest}> @@ -23,9 +23,9 @@ ListViewInfoItem.propTypes = { /** Additional css classes */ className: PropTypes.string, /** Toggle the InfoItem contents stacking */ - stacked: PropTypes.bool.isRequired, + stacked: PropTypes.bool.isRequired }; ListViewInfoItem.defaultProps = { - stacked: false, + stacked: false }; export default ListViewInfoItem; diff --git a/src/components/ListView/ListViewItem.js b/src/components/ListView/ListViewItem.js index ee43a15d64c..fc4f820da06 100644 --- a/src/components/ListView/ListViewItem.js +++ b/src/components/ListView/ListViewItem.js @@ -103,9 +103,9 @@ ListViewItem.propTypes = { /** Contents for left section of ListViewItem (usually ListViewIcon) */ leftContent: PropTypes.node, /** Checkbox form input component */ - checkboxInput: PropTypes.node, + checkboxInput: PropTypes.node }; ListViewItem.defaultProps = { - stacked: false, + stacked: false }; export default ListViewItem; diff --git a/src/components/ListView/ListViewLeft.js b/src/components/ListView/ListViewLeft.js index 4aacb326ac8..09832364d04 100644 --- a/src/components/ListView/ListViewLeft.js +++ b/src/components/ListView/ListViewLeft.js @@ -9,6 +9,6 @@ const ListViewLeft = ({ children }) => ( ); ListViewLeft.propTypes = { /** Child nodes - usually ListViewIcon instance */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewLeft; diff --git a/src/components/ListView/ListViewMainInfo.js b/src/components/ListView/ListViewMainInfo.js index 9b81ebfafda..740b9eaef14 100644 --- a/src/components/ListView/ListViewMainInfo.js +++ b/src/components/ListView/ListViewMainInfo.js @@ -9,6 +9,6 @@ const ListViewMainInfo = ({ children }) => ( ); ListViewMainInfo.propTypes = { /** Child nodes - instances of ListViewLeft and ListViewBody */ - children: PropTypes.node, + children: PropTypes.node }; export default ListViewMainInfo; diff --git a/src/components/ListView/ListViewRow.js b/src/components/ListView/ListViewRow.js index 4f59393e59c..4df979bad4e 100644 --- a/src/components/ListView/ListViewRow.js +++ b/src/components/ListView/ListViewRow.js @@ -21,7 +21,7 @@ const ListViewRow = ({ checkboxInput, leftContent, heading, - description, + description }) => (
{checkboxInput && {checkboxInput}} @@ -59,6 +59,6 @@ ListViewRow.propTypes = { /** Contents for left section of ListViewItem (usually ListViewIcon) */ leftContent: PropTypes.node, /** Checkbox form input component */ - checkboxInput: PropTypes.node, + checkboxInput: PropTypes.node }; export default ListViewRow; diff --git a/src/components/ListView/__mocks__/mockListItems.js b/src/components/ListView/__mocks__/mockListItems.js index af91cae041e..113621b8654 100644 --- a/src/components/ListView/__mocks__/mockListItems.js +++ b/src/components/ListView/__mocks__/mockListItems.js @@ -10,37 +10,37 @@ export const mockListItems = [ description: 'This is Item 1 description', properties: { hosts: 3, clusters: 1, nodes: 7, images: 4 }, expandedContentText: - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry', + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry' }, { title: 'Item 2', description: 'This is Item 2 description', properties: { hosts: 2, clusters: 1, nodes: 11, images: 8 }, expandedContentText: - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry', + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry' }, { title: 'Item 3', description: 'This is Item 3 description', properties: { hosts: 4, clusters: 2, nodes: 9, images: 8 }, expandedContentText: - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry', + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry' }, { description: 'This is Item without heading', expandedContentText: - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry', + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry' }, { properties: { hosts: 4, clusters: 2, nodes: 9, images: 8 }, expandedContentText: - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry', + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry' }, { title: 'Item without description', expandedContentText: - 'Lorem Ipsum is simply dummy text of the printing and typesetting industry', - }, + 'Lorem Ipsum is simply dummy text of the printing and typesetting industry' + } ]; export const renderActions = () => ( @@ -57,7 +57,7 @@ export const renderAdditionalInfoItems = itemProperties => { 'pficon-flavor': prop === 'hosts', 'pficon-cluster': prop === 'clusters', 'pficon-container-node': prop === 'nodes', - 'pficon-image': prop === 'images', + 'pficon-image': prop === 'images' }); return ( diff --git a/src/components/ListView/index.js b/src/components/ListView/index.js index f4c4393a89c..5739be96058 100644 --- a/src/components/ListView/index.js +++ b/src/components/ListView/index.js @@ -53,5 +53,5 @@ export { ListViewItem, ListViewLeft, ListViewMainInfo, - ListViewRow, + ListViewRow }; diff --git a/src/components/MenuItem/MenuItem.stories.js b/src/components/MenuItem/MenuItem.stories.js index 028f0fd03cc..2a007e2b921 100644 --- a/src/components/MenuItem/MenuItem.stories.js +++ b/src/components/MenuItem/MenuItem.stories.js @@ -20,8 +20,8 @@ const description = ( stories.addDecorator( defaultTemplate({ title: 'MenuItem', - description: description, - }), + description: description + }) ); stories.addWithInfo('MenuItem', '', () => ( diff --git a/src/components/Modal/InnerComponents/CustomModalDialog.js b/src/components/Modal/InnerComponents/CustomModalDialog.js index f797c1de344..e0ff28db215 100644 --- a/src/components/Modal/InnerComponents/CustomModalDialog.js +++ b/src/components/Modal/InnerComponents/CustomModalDialog.js @@ -20,7 +20,7 @@ const splitBsProps = utils.bootstrapUtils.splitBsProps; // React Bootstrap utils/StyleConfig Size is currently not exported const Size = { LARGE: 'large', - SMALL: 'small', + SMALL: 'small' }; class CustomModalDialog extends React.Component { @@ -42,7 +42,7 @@ class CustomModalDialog extends React.Component { const dialogClasses = { ...getClassSet(bsProps), [bsClassName]: false, - [prefix(bsProps, 'dialog')]: true, + [prefix(bsProps, 'dialog')]: true }; return ( @@ -76,10 +76,10 @@ CustomModalDialog.propTypes = { /** additional modal styles */ style: PropTypes.object, /** Children nodes */ - children: PropTypes.node, + children: PropTypes.node }; export default bsClass( 'modal', - bsSizes([Size.LARGE, Size.SMALL], CustomModalDialog), + bsSizes([Size.LARGE, Size.SMALL], CustomModalDialog) ); diff --git a/src/components/Modal/Modal.js b/src/components/Modal/Modal.js index d3d00aca97c..ed478739bff 100644 --- a/src/components/Modal/Modal.js +++ b/src/components/Modal/Modal.js @@ -12,7 +12,7 @@ class Modal extends BsModal { Modal.defaultProps = { ...BsModal.defaultProps, - dialogComponentClass: CustomModalDialog, + dialogComponentClass: CustomModalDialog }; export default Modal; diff --git a/src/components/Modal/Modal.stories.js b/src/components/Modal/Modal.stories.js index 79f7c75fb4e..dfe042b1bce 100644 --- a/src/components/Modal/Modal.stories.js +++ b/src/components/Modal/Modal.stories.js @@ -5,12 +5,12 @@ import { defaultTemplate } from '../../../storybook/decorators/storyTemplates'; import { MockModalManager, - basicExampleSource, + basicExampleSource } from './__mocks__/mockModalManager'; import { MockAboutModalManager, - aboutExampleSource, + aboutExampleSource } from './__mocks__/mockAboutModalManager'; const stories = storiesOf('Modal Overlay', module); @@ -30,8 +30,8 @@ stories.addDecorator( title: 'Modal Overlay', documentationLink: 'http://www.patternfly.org/pattern-library/forms-and-controls/modal-overlay/', - description: description, - }), + description: description + }) ); stories.add( @@ -44,8 +44,8 @@ stories.add(

Story Source

{basicExampleSource}
- ), - })(() => ), + ) + })(() => ) ); stories.add( @@ -58,6 +58,6 @@ stories.add(

Story Source

{aboutExampleSource}
- ), - })(() => ), + ) + })(() => ) ); diff --git a/src/components/Popover/Popover.stories.js b/src/components/Popover/Popover.stories.js index d74f05f20db..f8e29469e2a 100644 --- a/src/components/Popover/Popover.stories.js +++ b/src/components/Popover/Popover.stories.js @@ -20,8 +20,8 @@ stories.addDecorator( title: 'Popover', documentationLink: 'http://www.patternfly.org/pattern-library/widgets/#popover', - description: description, - }), + description: description + }) ); stories.addWithInfo('Popover', () => { @@ -35,8 +35,8 @@ stories.addWithInfo('Popover', () => { dangerouslySetInnerHTML={{ __html: text( 'Popover Content', - 'Holy guacamole! Check this info.', - ), + 'Holy guacamole! Check this info.' + ) }} /> ); @@ -48,12 +48,12 @@ stories.addWithInfo('Popover', () => { const placement = select( 'Placement', ['top', 'bottom', 'left', 'right'], - 'right', + 'right' ); const trigger = select( 'Trigger', ['hover', 'focus', 'hover focus', 'click'], - 'click', + 'click' ); const rootClose = boolean('Root Close', true); diff --git a/src/components/Spinner/Spinner.js b/src/components/Spinner/Spinner.js index 515e06ce69b..94d7f473f66 100644 --- a/src/components/Spinner/Spinner.js +++ b/src/components/Spinner/Spinner.js @@ -14,7 +14,7 @@ const Spinner = ({ if (loading) { const classes = cx(className, 'spinner', `spinner-${size}`, { 'spinner-inline': inline, - 'spinner-inverse': inverse, + 'spinner-inverse': inverse }); return
; @@ -29,7 +29,7 @@ Spinner.propTypes = { inverse: PropTypes.bool, size: PropTypes.oneOf(['lg', 'md', 'sm', 'xs']), children: PropTypes.node, - className: PropTypes.string, + className: PropTypes.string }; Spinner.defaultProps = { @@ -37,7 +37,7 @@ Spinner.defaultProps = { size: 'md', inline: false, inverse: false, - className: '', + className: '' }; export default Spinner; diff --git a/src/components/Spinner/Spinner.stories.js b/src/components/Spinner/Spinner.stories.js index f2c937c3cec..55e11d77d17 100644 --- a/src/components/Spinner/Spinner.stories.js +++ b/src/components/Spinner/Spinner.stories.js @@ -12,8 +12,8 @@ stories.addDecorator( defaultTemplate({ title: 'Spinner', documentationLink: - 'http://www.patternfly.org/pattern-library/widgets/#spinner', - }), + 'http://www.patternfly.org/pattern-library/widgets/#spinner' + }) ); stories.addWithInfo('Spinner', () => { @@ -25,14 +25,14 @@ stories.addWithInfo('Spinner', () => { const wrapperStyle = { backgroundColor: inverse ? 'black' : 'white', color: inverse ? 'white' : 'black', - padding: '15px', + padding: '15px' }; const spinnerProps = { loading, size, inline, - inverse, + inverse }; if (inline) { diff --git a/src/components/Spinner/Spinner.test.js b/src/components/Spinner/Spinner.test.js index 200a0375a60..62a9d85e99d 100644 --- a/src/components/Spinner/Spinner.test.js +++ b/src/components/Spinner/Spinner.test.js @@ -8,7 +8,7 @@ test('Spinner should not render children when loading', () => { const component = renderer.create( Children should not render. - , + ); let tree = component.toJSON(); @@ -19,7 +19,7 @@ test('Spinner should render children when not loading', () => { const component = renderer.create( Children should be rendered. - , + ); let tree = component.toJSON(); diff --git a/src/components/ToastNotification/TimedToastNotification.js b/src/components/ToastNotification/TimedToastNotification.js index 6b28895d5aa..8c946909845 100644 --- a/src/components/ToastNotification/TimedToastNotification.js +++ b/src/components/ToastNotification/TimedToastNotification.js @@ -87,12 +87,12 @@ TimedToastNotification.propTypes = { /** the type of alert */ type: PropTypes.oneOf(TOAST_NOTIFICATION_TYPES).isRequired, // eslint-disable-line react/no-unused-prop-types /** children nodes */ - children: PropTypes.node, + children: PropTypes.node }; TimedToastNotification.defaultProps = { paused: false, type: 'error', - timerdelay: 8000, + timerdelay: 8000 }; TimedToastNotification.TOAST_NOTIFICATION_TYPES = TOAST_NOTIFICATION_TYPES; diff --git a/src/components/ToastNotification/ToastNotification.js b/src/components/ToastNotification/ToastNotification.js index 3fc8f4abd12..fe24ad0c9e8 100644 --- a/src/components/ToastNotification/ToastNotification.js +++ b/src/components/ToastNotification/ToastNotification.js @@ -22,16 +22,16 @@ const ToastNotification = ({ 'alert-warning': type === 'warning', 'alert-success': type === 'success', 'alert-info': type === 'info', - 'alert-dismissable': onDismiss, + 'alert-dismissable': onDismiss }, - className, + className ); const iconClass = ClassNames({ pficon: true, 'pficon-error-circle-o': type === 'danger' || type === 'error', 'pficon-warning-triangle-o': type === 'warning', 'pficon-ok': type === 'success', - 'pficon-info': type === 'info', + 'pficon-info': type === 'info' }); return ( @@ -54,10 +54,10 @@ ToastNotification.propTypes = { /** the type of alert */ type: PropTypes.oneOf(TOAST_NOTIFICATION_TYPES).isRequired, /** children nodes */ - children: PropTypes.node, + children: PropTypes.node }; ToastNotification.defaultProps = { - type: 'error', + type: 'error' }; ToastNotification.TOAST_NOTIFICATION_TYPES = TOAST_NOTIFICATION_TYPES; diff --git a/src/components/ToastNotification/ToastNotification.stories.js b/src/components/ToastNotification/ToastNotification.stories.js index e10190acffa..81b42323d7d 100644 --- a/src/components/ToastNotification/ToastNotification.stories.js +++ b/src/components/ToastNotification/ToastNotification.stories.js @@ -9,7 +9,7 @@ import { MenuItem } from '../MenuItem'; import { ToastNotification, TimedToastNotification, - ToastNotificationList, + ToastNotificationList } from './index'; const stories = storiesOf('ToastNotification', module); @@ -18,8 +18,8 @@ stories.addDecorator( defaultTemplate({ title: 'Toast Notification', documentationLink: - 'http://www.patternfly.org/pattern-library/communication/toast-notifications/', - }), + 'http://www.patternfly.org/pattern-library/communication/toast-notifications/' + }) ); stories.addWithInfo( @@ -31,7 +31,7 @@ stories.addWithInfo( const type = select( 'Type', ['success', 'danger', 'warning', 'info'], - 'success', + 'success' ); const dismissEnabled = boolean('Dismiss', false); const menuEnabled = boolean('Menu', true); @@ -66,7 +66,7 @@ stories.addWithInfo(
); - }, + } ); class ToastNotificationStoryWrapper extends React.Component { @@ -75,7 +75,7 @@ class ToastNotificationStoryWrapper extends React.Component { this.state = { infoNotificationDismissed: false, warningNotificationDismissed: false, - successNotificationDismissed: false, + successNotificationDismissed: false }; this.infoNotificationDismissed = () => { @@ -97,7 +97,7 @@ class ToastNotificationStoryWrapper extends React.Component { this.setState({ infoNotificationDismissed: false, warningNotificationDismissed: false, - persistentNotificationDismissed: false, + persistentNotificationDismissed: false }); }; } @@ -123,7 +123,7 @@ class ToastNotificationStoryWrapper extends React.Component { {text( 'Message', - "By default, a toast notification's timer expires after eight seconds.", + "By default, a toast notification's timer expires after eight seconds." )} @@ -149,10 +149,10 @@ class ToastNotificationStoryWrapper extends React.Component { type="success" onDismiss={this.persistentNotificationDismissed} onMouseEnter={action( - 'persistent notification: onMouseEnter fired', + 'persistent notification: onMouseEnter fired' )} onMouseLeave={action( - 'persistent notification: onMouseLeave fired', + 'persistent notification: onMouseLeave fired' )} > @@ -172,5 +172,5 @@ stories.addWithInfo( `This is the Toast Notification List with a custom timer delay supplied.`, () => { return ; - }, + } ); diff --git a/src/components/ToastNotification/ToastNotification.test.js b/src/components/ToastNotification/ToastNotification.test.js index 4ab24be378b..64dc6f58c05 100644 --- a/src/components/ToastNotification/ToastNotification.test.js +++ b/src/components/ToastNotification/ToastNotification.test.js @@ -18,7 +18,7 @@ test('ToastNotification renders properly', () => { onMouseLeave={handleOnMouseLeave} > Danger Will Robinson! - , + ); let tree = component.toJSON(); expect(tree).toMatchSnapshot(); @@ -37,7 +37,7 @@ test('TimedToastNotification renders properly', () => { paused={false} > Danger Will Robinson! - , + ); let tree = component.toJSON(); expect(tree).toMatchSnapshot(); diff --git a/src/components/ToastNotification/ToastNotificationList.js b/src/components/ToastNotification/ToastNotificationList.js index c2b38de399e..5d0d77b5a14 100644 --- a/src/components/ToastNotification/ToastNotificationList.js +++ b/src/components/ToastNotification/ToastNotificationList.js @@ -33,7 +33,7 @@ class ToastNotificationList extends React.Component { * all child notifications from dismissing */ return React.cloneElement(child, { - paused: paused, + paused: paused }); } else { return child; @@ -61,10 +61,10 @@ ToastNotificationList.propTypes = { /** onMouseLeave callback */ onMouseLeave: PropTypes.func, /** children nodes */ - children: PropTypes.node, + children: PropTypes.node }; ToastNotificationList.defaultProps = { - className: 'toast-notifications-list-pf', + className: 'toast-notifications-list-pf' }; export default ToastNotificationList; diff --git a/src/components/ToastNotification/constants.js b/src/components/ToastNotification/constants.js index d8f0e86bb3b..14a1c44716e 100644 --- a/src/components/ToastNotification/constants.js +++ b/src/components/ToastNotification/constants.js @@ -3,5 +3,5 @@ export const TOAST_NOTIFICATION_TYPES = [ 'error', 'warning', 'success', - 'info', + 'info' ]; diff --git a/src/components/Tooltip/Tooltip.stories.js b/src/components/Tooltip/Tooltip.stories.js index 909ca8e5ab1..7e0e7f4d357 100644 --- a/src/components/Tooltip/Tooltip.stories.js +++ b/src/components/Tooltip/Tooltip.stories.js @@ -20,8 +20,8 @@ stories.addDecorator( title: 'Tooltip', documentationLink: 'http://www.patternfly.org/pattern-library/widgets/#tooltip', - description: description, - }), + description: description + }) ); stories.addWithInfo('Tooltip', () => { @@ -31,8 +31,8 @@ stories.addWithInfo('Tooltip', () => { dangerouslySetInnerHTML={{ __html: text( 'Tooltip', - 'Holy guacamole! Check this info.', - ), + 'Holy guacamole! Check this info.' + ) }} /> @@ -40,12 +40,12 @@ stories.addWithInfo('Tooltip', () => { const placement = select( 'Placement', ['top', 'bottom', 'left', 'right'], - 'right', + 'right' ); const trigger = select( 'Trigger', ['hover', 'focus', 'hover focus', 'click'], - 'hover focus', + 'hover focus' ); const rootClose = boolean('Root Close', false); diff --git a/src/components/Wizard/Wizard.js b/src/components/Wizard/Wizard.js index 2b7268f4c3f..f02f2da522f 100644 --- a/src/components/Wizard/Wizard.js +++ b/src/components/Wizard/Wizard.js @@ -10,7 +10,7 @@ const Wizard = ({ children, className, embedded, ...rest }) => { return React.Children.map(children, child => { if (child && child.type === WizardHeader) { return React.cloneElement(child, { - embedded: embedded, + embedded: embedded }); } else { return child; @@ -30,6 +30,6 @@ Wizard.propTypes = { /** Additional css classes */ className: PropTypes.string, /** Embedded wizard */ - embedded: PropTypes.bool, + embedded: PropTypes.bool }; export default Wizard; diff --git a/src/components/Wizard/Wizard.stories.js b/src/components/Wizard/Wizard.stories.js index 8d1bfba6474..d39e0aa7f91 100644 --- a/src/components/Wizard/Wizard.stories.js +++ b/src/components/Wizard/Wizard.stories.js @@ -9,12 +9,12 @@ import { mockWizardItems } from './__mocks__/mockWizardItems'; import { MockLoadingWizardManager, - mockLoadingWizardSource, + mockLoadingWizardSource } from './__mocks__/mockLoadingWizardManager'; import { MockModalWizardManager, - mockModalWizardSource, + mockModalWizardSource } from './__mocks__/mockModalWizardManager'; // import { @@ -28,8 +28,8 @@ stories.addDecorator( defaultTemplate({ title: 'Wizard', documentationLink: - 'http://www.patternfly.org/pattern-library/communication/wizard/#/overview', - }), + 'http://www.patternfly.org/pattern-library/communication/wizard/#/overview' + }) ); stories.add( @@ -42,14 +42,14 @@ stories.add(

Story Source

{mockLoadingWizardSource}
- ), + ) })(() => ( - )), + )) ); stories.add( @@ -62,14 +62,14 @@ stories.add(

Story Source

{mockModalWizardSource}
- ), + ) })(() => ( - )), + )) ); /** diff --git a/src/components/Wizard/Wizard.test.js b/src/components/Wizard/Wizard.test.js index 8179914ac60..7ac62fc86ac 100644 --- a/src/components/Wizard/Wizard.test.js +++ b/src/components/Wizard/Wizard.test.js @@ -6,13 +6,13 @@ import { Wizard } from './index'; import { mockWizardItems, - mockLoadingContents, + mockLoadingContents } from './__mocks__/mockWizardItems'; import { renderWizardSteps, renderSidebarItems, - renderWizardContents, + renderWizardContents } from './__mocks__/mockWizardRenderers'; test('Wizard loading renders properly', () => { @@ -39,7 +39,7 @@ test('Wizard loading renders properly', () => { - , + ); const tree = component.toJSON(); @@ -67,14 +67,14 @@ test('Wizard embedded renders properly', () => { mockWizardItems, activeStepIndex, activeSubStepIndex, - onSidebarItemClick, + onSidebarItemClick )} /> {renderWizardContents( mockWizardItems, activeStepIndex, - activeSubStepIndex, + activeSubStepIndex )} @@ -91,7 +91,7 @@ test('Wizard embedded renders properly', () => { Next - , + ); const tree = component.toJSON(); diff --git a/src/components/Wizard/WizardBody.js b/src/components/Wizard/WizardBody.js index abd4858d141..bf2b351cc22 100644 --- a/src/components/Wizard/WizardBody.js +++ b/src/components/Wizard/WizardBody.js @@ -17,6 +17,6 @@ WizardBody.propTypes = { /** Children nodes */ children: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardBody; diff --git a/src/components/Wizard/WizardContents.js b/src/components/Wizard/WizardContents.js index a4155ade54a..d415e272b4e 100644 --- a/src/components/Wizard/WizardContents.js +++ b/src/components/Wizard/WizardContents.js @@ -21,9 +21,9 @@ const WizardContents = ({ // OR if we have sub steps and this sub step is not active hidden: activeStepIndex !== stepIndex || - (activeSubStepIndex !== null && activeSubStepIndex !== subStepIndex), + (activeSubStepIndex !== null && activeSubStepIndex !== subStepIndex) }, - className, + className ); return (
@@ -43,6 +43,6 @@ WizardContents.propTypes = { /** The active wizard step index */ activeStepIndex: PropTypes.number, /** The active wizard sub step index */ - activeSubStepIndex: PropTypes.number, + activeSubStepIndex: PropTypes.number }; export default WizardContents; diff --git a/src/components/Wizard/WizardFooter.js b/src/components/Wizard/WizardFooter.js index d7d3cbf240d..2269d3c6f97 100644 --- a/src/components/Wizard/WizardFooter.js +++ b/src/components/Wizard/WizardFooter.js @@ -17,6 +17,6 @@ WizardFooter.propTypes = { /** Children nodes */ children: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardFooter; diff --git a/src/components/Wizard/WizardHeader.js b/src/components/Wizard/WizardHeader.js index 4ff4632a815..6ab0c2851bc 100644 --- a/src/components/Wizard/WizardHeader.js +++ b/src/components/Wizard/WizardHeader.js @@ -30,6 +30,6 @@ WizardHeader.propTypes = { /** Embedded wizard */ embedded: PropTypes.bool, /** The wizard title */ - title: PropTypes.string, + title: PropTypes.string }; export default WizardHeader; diff --git a/src/components/Wizard/WizardMain.js b/src/components/Wizard/WizardMain.js index a7872506517..25bf0d292dc 100644 --- a/src/components/Wizard/WizardMain.js +++ b/src/components/Wizard/WizardMain.js @@ -17,6 +17,6 @@ WizardMain.propTypes = { /** WizardStep nodes */ children: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardMain; diff --git a/src/components/Wizard/WizardReviewContent.js b/src/components/Wizard/WizardReviewContent.js index 864a21d2f7f..39e27a669c2 100644 --- a/src/components/Wizard/WizardReviewContent.js +++ b/src/components/Wizard/WizardReviewContent.js @@ -9,7 +9,7 @@ const WizardReviewContent = ({ children, className, collapsed, ...rest }) => { const classes = cx( 'wizard-pf-review-content', { collapse: collapsed }, - className, + className ); return (
@@ -23,6 +23,6 @@ WizardReviewContent.propTypes = { /** Additional css classes */ className: PropTypes.string, /** Step collapsed */ - collapsed: PropTypes.bool, + collapsed: PropTypes.bool }; export default WizardReviewContent; diff --git a/src/components/Wizard/WizardReviewItem.js b/src/components/Wizard/WizardReviewItem.js index 2cb910e897a..eaade818887 100644 --- a/src/components/Wizard/WizardReviewItem.js +++ b/src/components/Wizard/WizardReviewItem.js @@ -17,6 +17,6 @@ WizardReviewItem.propTypes = { /** Children nodes */ children: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardReviewItem; diff --git a/src/components/Wizard/WizardReviewStep.js b/src/components/Wizard/WizardReviewStep.js index 8e70282e6d9..1369eba3965 100644 --- a/src/components/Wizard/WizardReviewStep.js +++ b/src/components/Wizard/WizardReviewStep.js @@ -23,6 +23,6 @@ WizardReviewStep.propTypes = { /** Step title */ title: PropTypes.string, /** Step collapsed */ - collapsed: PropTypes.bool, + collapsed: PropTypes.bool }; export default WizardReviewStep; diff --git a/src/components/Wizard/WizardReviewSteps.js b/src/components/Wizard/WizardReviewSteps.js index 2e0c540988a..50e349e8c0f 100644 --- a/src/components/Wizard/WizardReviewSteps.js +++ b/src/components/Wizard/WizardReviewSteps.js @@ -18,6 +18,6 @@ WizardReviewSteps.propTypes = { /** Children nodes */ children: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardReviewSteps; diff --git a/src/components/Wizard/WizardReviewSubStep.js b/src/components/Wizard/WizardReviewSubStep.js index 2f012bd63b4..fe6c5f4aa71 100644 --- a/src/components/Wizard/WizardReviewSubStep.js +++ b/src/components/Wizard/WizardReviewSubStep.js @@ -33,6 +33,6 @@ WizardReviewSubStep.propTypes = { /** Review step title */ title: PropTypes.string, /** Step collapsed */ - collapsed: PropTypes.bool, + collapsed: PropTypes.bool }; export default WizardReviewSubStep; diff --git a/src/components/Wizard/WizardReviewSubSteps.js b/src/components/Wizard/WizardReviewSubSteps.js index 6f6e3804ff3..08ef84ef7d5 100644 --- a/src/components/Wizard/WizardReviewSubSteps.js +++ b/src/components/Wizard/WizardReviewSubSteps.js @@ -10,7 +10,7 @@ const WizardReviewSubSteps = ({ children, className, collapsed, ...rest }) => { const classes = cx( 'wizard-pf-review-substeps', { collapse: collapsed }, - className, + className ); return (
@@ -24,6 +24,6 @@ WizardReviewSubSteps.propTypes = { /** Additional css classes */ className: PropTypes.string, /** Step collapsed */ - collapsed: PropTypes.bool, + collapsed: PropTypes.bool }; export default WizardReviewSubSteps; diff --git a/src/components/Wizard/WizardRow.js b/src/components/Wizard/WizardRow.js index b3629c8cdbc..4276cc2b798 100644 --- a/src/components/Wizard/WizardRow.js +++ b/src/components/Wizard/WizardRow.js @@ -17,6 +17,6 @@ WizardRow.propTypes = { /** Children nodes */ children: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardRow; diff --git a/src/components/Wizard/WizardSidebar.js b/src/components/Wizard/WizardSidebar.js index aec1baae2ef..9b07d11aacf 100644 --- a/src/components/Wizard/WizardSidebar.js +++ b/src/components/Wizard/WizardSidebar.js @@ -17,6 +17,6 @@ WizardSidebar.propTypes = { /** Wizard sidebar items */ items: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardSidebar; diff --git a/src/components/Wizard/WizardSidebarGroup.js b/src/components/Wizard/WizardSidebarGroup.js index 59c444636d0..73bae0d9fe4 100644 --- a/src/components/Wizard/WizardSidebarGroup.js +++ b/src/components/Wizard/WizardSidebarGroup.js @@ -28,6 +28,6 @@ WizardSidebarGroup.propTypes = { /** The wizard step number for this step */ step: PropTypes.string, /** The active step */ - activeStep: PropTypes.string, + activeStep: PropTypes.string }; export default WizardSidebarGroup; diff --git a/src/components/Wizard/WizardSidebarGroupItem.js b/src/components/Wizard/WizardSidebarGroupItem.js index 0cdb8c1ad02..ef00e897a85 100644 --- a/src/components/Wizard/WizardSidebarGroupItem.js +++ b/src/components/Wizard/WizardSidebarGroupItem.js @@ -49,6 +49,6 @@ WizardSidebarGroupItem.propTypes = { /** The currently active wizard substep */ activeSubStep: PropTypes.string, /** Sidebar group item click handler */ - onClick: PropTypes.func, + onClick: PropTypes.func }; export default WizardSidebarGroupItem; diff --git a/src/components/Wizard/WizardStep.js b/src/components/Wizard/WizardStep.js index 92db57d1d80..d45b38aa34b 100644 --- a/src/components/Wizard/WizardStep.js +++ b/src/components/Wizard/WizardStep.js @@ -19,7 +19,7 @@ const WizardStep = ({ const classes = cx( 'wizard-pf-step', { active: step === activeStep }, - className, + className ); return (
  • @@ -53,6 +53,6 @@ WizardStep.propTypes = { /** The active step */ activeStep: PropTypes.string, /** Step click handler */ - onClick: PropTypes.func, + onClick: PropTypes.func }; export default WizardStep; diff --git a/src/components/Wizard/WizardSteps.js b/src/components/Wizard/WizardSteps.js index 33263eb7f4e..f6260db2038 100644 --- a/src/components/Wizard/WizardSteps.js +++ b/src/components/Wizard/WizardSteps.js @@ -17,6 +17,6 @@ WizardSteps.propTypes = { /** WizardStep nodes */ steps: PropTypes.node, /** Additional css classes */ - className: PropTypes.string, + className: PropTypes.string }; export default WizardSteps; diff --git a/src/components/Wizard/WizardSubStep.js b/src/components/Wizard/WizardSubStep.js index 1822908d229..23094e46133 100644 --- a/src/components/Wizard/WizardSubStep.js +++ b/src/components/Wizard/WizardSubStep.js @@ -15,7 +15,7 @@ const WizardSubStep = ({ const classes = cx( 'wizard-pf-step-title-substep', { active: subStep === activeSubStep }, - className, + className ); return ( @@ -31,6 +31,6 @@ WizardSubStep.propTypes = { /** The wizard sub step title */ title: PropTypes.string, /** The active step */ - activeSubStep: PropTypes.string, + activeSubStep: PropTypes.string }; export default WizardSubStep; diff --git a/src/components/Wizard/__mocks__/mockEmbeddedWizardManager.js b/src/components/Wizard/__mocks__/mockEmbeddedWizardManager.js index 33cfa711a08..29d601b4f7c 100644 --- a/src/components/Wizard/__mocks__/mockEmbeddedWizardManager.js +++ b/src/components/Wizard/__mocks__/mockEmbeddedWizardManager.js @@ -9,7 +9,7 @@ import { mockWizardItems } from './mockWizardItems'; import { renderWizardSteps, renderSidebarItems, - renderWizardContents, + renderWizardContents } from './mockWizardRenderers'; export class MockEmbeddedWizardManager extends MockWizardBase { @@ -25,7 +25,7 @@ export class MockEmbeddedWizardManager extends MockWizardBase { mockWizardItems, activeStepIndex, activeSubStepIndex, - this.onStepClick, + this.onStepClick )} /> @@ -34,14 +34,14 @@ export class MockEmbeddedWizardManager extends MockWizardBase { mockWizardItems, activeStepIndex, activeSubStepIndex, - this.onSidebarItemClick, + this.onSidebarItemClick )} /> {renderWizardContents( mockWizardItems, activeStepIndex, - activeSubStepIndex, + activeSubStepIndex )} diff --git a/src/components/Wizard/__mocks__/mockModalWizardManager.js b/src/components/Wizard/__mocks__/mockModalWizardManager.js index 05ccd085921..3f9cbd65d73 100644 --- a/src/components/Wizard/__mocks__/mockModalWizardManager.js +++ b/src/components/Wizard/__mocks__/mockModalWizardManager.js @@ -11,7 +11,7 @@ import { mockWizardItems } from './mockWizardItems'; import { renderWizardSteps, renderSidebarItems, - renderWizardContents, + renderWizardContents } from './mockWizardRenderers'; export class MockModalWizardManager extends MockWizardBase { @@ -57,7 +57,7 @@ export class MockModalWizardManager extends MockWizardBase { mockWizardItems, activeStepIndex, activeSubStepIndex, - this.onStepClick, + this.onStepClick )} /> @@ -66,14 +66,14 @@ export class MockModalWizardManager extends MockWizardBase { mockWizardItems, activeStepIndex, activeSubStepIndex, - this.onSidebarItemClick, + this.onSidebarItemClick )} /> {renderWizardContents( mockWizardItems, activeStepIndex, - activeSubStepIndex, + activeSubStepIndex )} diff --git a/src/components/Wizard/__mocks__/mockWizardBase.js b/src/components/Wizard/__mocks__/mockWizardBase.js index 437ff9d8ba8..1b0454fbfbb 100644 --- a/src/components/Wizard/__mocks__/mockWizardBase.js +++ b/src/components/Wizard/__mocks__/mockWizardBase.js @@ -7,19 +7,19 @@ class MockWizardBase extends React.Component { super(props); this.state = { activeStepIndex: props.initialStepIndex || 0, - activeSubStepIndex: props.initialSubStepIndex || 0, + activeSubStepIndex: props.initialSubStepIndex || 0 }; bindMethods(this, [ 'onSidebarItemClick', 'onStepClick', 'onNextButtonClick', - 'onBackButtonClick', + 'onBackButtonClick' ]); } onSidebarItemClick(stepIndex, subStepIndex) { this.setState({ activeStepIndex: stepIndex, - activeSubStepIndex: subStepIndex, + activeSubStepIndex: subStepIndex }); } onStepClick(stepIndex) { @@ -28,7 +28,7 @@ class MockWizardBase extends React.Component { } this.setState({ activeStepIndex: stepIndex, - activeSubStepIndex: 0, + activeSubStepIndex: 0 }); } onNextButtonClick() { @@ -38,12 +38,12 @@ class MockWizardBase extends React.Component { if (activeSubStepIndex < activeStep.subSteps.length - 1) { this.setState(prevState => ({ - activeSubStepIndex: prevState.activeSubStepIndex + 1, + activeSubStepIndex: prevState.activeSubStepIndex + 1 })); } else if (activeStepIndex < steps.length - 1) { this.setState(prevState => ({ activeStepIndex: prevState.activeStepIndex + 1, - activeSubStepIndex: 0, + activeSubStepIndex: 0 })); } } @@ -53,13 +53,13 @@ class MockWizardBase extends React.Component { if (activeSubStepIndex > 0) { this.setState(prevState => ({ - activeSubStepIndex: prevState.activeSubStepIndex - 1, + activeSubStepIndex: prevState.activeSubStepIndex - 1 })); } else if (activeStepIndex > 0) { this.setState(prevState => ({ activeStepIndex: prevState.activeStepIndex - 1, activeSubStepIndex: - steps[prevState.activeStepIndex - 1].subSteps.length - 1, + steps[prevState.activeStepIndex - 1].subSteps.length - 1 })); } } @@ -73,6 +73,6 @@ MockWizardBase.propTypes = { /** Initial sub step index */ initialSubStepIndex: PropTypes.number, /** Wizard steps */ - steps: PropTypes.array, + steps: PropTypes.array }; export default MockWizardBase; diff --git a/src/components/Wizard/__mocks__/mockWizardDeployContents.js b/src/components/Wizard/__mocks__/mockWizardDeployContents.js index 2537e8e0b07..a9182a8839c 100644 --- a/src/components/Wizard/__mocks__/mockWizardDeployContents.js +++ b/src/components/Wizard/__mocks__/mockWizardDeployContents.js @@ -50,6 +50,6 @@ class MockWizardDeployContents extends React.Component { } } MockWizardDeployContents.propTypes = { - active: PropTypes.bool, + active: PropTypes.bool }; export default MockWizardDeployContents; diff --git a/src/components/Wizard/__mocks__/mockWizardItems.js b/src/components/Wizard/__mocks__/mockWizardItems.js index 3463612ce82..1a3e7e86ac9 100644 --- a/src/components/Wizard/__mocks__/mockWizardItems.js +++ b/src/components/Wizard/__mocks__/mockWizardItems.js @@ -25,8 +25,8 @@ export const mockWizardItems = [ title: 'Details', contents: { label1: 'Name', - label2: 'Description', - }, + label2: 'Description' + } }, { subStep: '1.2', @@ -34,10 +34,10 @@ export const mockWizardItems = [ title: 'Settings', contents: { label1: 'Lorem ipsum', - label2: 'Dolor', - }, - }, - ], + label2: 'Dolor' + } + } + ] }, { step: '2', @@ -50,8 +50,8 @@ export const mockWizardItems = [ title: 'Details', contents: { label1: 'Aliquam', - label2: 'Fermentum', - }, + label2: 'Fermentum' + } }, { subStep: '2.2', @@ -59,10 +59,10 @@ export const mockWizardItems = [ title: 'Settings', contents: { label1: 'Consectetur', - label2: 'Adipiscing', - }, - }, - ], + label2: 'Adipiscing' + } + } + ] }, { step: '3', @@ -72,15 +72,15 @@ export const mockWizardItems = [ { subStep: '3.1', label: '3A.', - title: 'Summary', + title: 'Summary' }, { subStep: '3.2', label: '3B.', - title: 'Progress', - }, - ], - }, + title: 'Progress' + } + ] + } ]; export const mockWizardFormContents = (label1, label2) => { diff --git a/src/components/Wizard/__mocks__/mockWizardRenderers.js b/src/components/Wizard/__mocks__/mockWizardRenderers.js index d2938c8d475..6f22853703f 100644 --- a/src/components/Wizard/__mocks__/mockWizardRenderers.js +++ b/src/components/Wizard/__mocks__/mockWizardRenderers.js @@ -8,7 +8,7 @@ export const renderWizardSteps = ( wizardSteps, activeStepIndex, activeSubStepIndex, - onStepClick, + onStepClick ) => { const activeStep = wizardSteps[activeStepIndex]; const activeSubStep = activeStep.subSteps[activeSubStepIndex]; @@ -43,7 +43,7 @@ export const renderSidebarItems = ( wizardSteps, activeStepIndex, activeSubStepIndex, - onSidebarItemClick, + onSidebarItemClick ) => { const activeStep = wizardSteps[activeStepIndex]; const activeSubStep = activeStep.subSteps[activeSubStepIndex]; @@ -77,7 +77,7 @@ export const renderSidebarItems = ( export const renderWizardContents = ( wizardSteps, activeStepIndex, - activeSubStepIndex, + activeSubStepIndex ) => { return wizardSteps.map((step, stepIndex) => { return step.subSteps.map((sub, subStepIndex) => { diff --git a/src/components/Wizard/__mocks__/mockWizardReviewStepsManager.js b/src/components/Wizard/__mocks__/mockWizardReviewStepsManager.js index ab7a835f00c..34c98fd63b4 100644 --- a/src/components/Wizard/__mocks__/mockWizardReviewStepsManager.js +++ b/src/components/Wizard/__mocks__/mockWizardReviewStepsManager.js @@ -7,7 +7,7 @@ class MockWizardReviewStepsManager extends React.Component { constructor(props) { super(props); this.state = { - steps: [...props.steps], + steps: [...props.steps] }; bindMethods(this, ['stepClicked', 'subStepClicked']); } @@ -16,7 +16,7 @@ class MockWizardReviewStepsManager extends React.Component { const updated = [...this.state.steps]; updated[stepIndex].collapsed = !updated[stepIndex].collapsed; this.setState({ - steps: updated, + steps: updated }); } subStepClicked(e, stepIndex, subStepIndex) { @@ -25,7 +25,7 @@ class MockWizardReviewStepsManager extends React.Component { updated[stepIndex].subSteps[subStepIndex].collapsed = !updated[stepIndex] .subSteps[subStepIndex].collapsed; this.setState({ - steps: updated, + steps: updated }); } render() { @@ -86,6 +86,6 @@ class MockWizardReviewStepsManager extends React.Component { } MockWizardReviewStepsManager.propTypes = { /** Wizard steps */ - steps: PropTypes.array, + steps: PropTypes.array }; export default MockWizardReviewStepsManager; diff --git a/src/components/Wizard/index.js b/src/components/Wizard/index.js index e95f97a11e8..5c6850b736f 100644 --- a/src/components/Wizard/index.js +++ b/src/components/Wizard/index.js @@ -56,5 +56,5 @@ export { WizardSidebarGroupItem, WizardStep, WizardSteps, - WizardSubStep, + WizardSubStep }; diff --git a/storybook/webpack.config.js b/storybook/webpack.config.js index 276f9a694c5..5d5951865eb 100644 --- a/storybook/webpack.config.js +++ b/storybook/webpack.config.js @@ -9,8 +9,8 @@ module.exports = { loaders: ['style-loader', 'css-loader'], include: [ path.resolve(__dirname, '../src'), - path.resolve(__dirname, './'), - ], + path.resolve(__dirname, './') + ] }, // Sass { @@ -26,16 +26,16 @@ module.exports = { path.resolve(__dirname, '../node_modules/patternfly/dist/sass'), path.resolve( __dirname, - '../node_modules/patternfly/node_modules/bootstrap-sass/assets/stylesheets', + '../node_modules/patternfly/node_modules/bootstrap-sass/assets/stylesheets' ), path.resolve( __dirname, - '../node_modules/patternfly/node_modules/font-awesome-sass/assets/stylesheets', - ), - ], - }, - }, - ], + '../node_modules/patternfly/node_modules/font-awesome-sass/assets/stylesheets' + ) + ] + } + } + ] }, // Images { @@ -43,8 +43,8 @@ module.exports = { loader: 'url-loader', query: { limit: 8192, // inline base64 URLs for <=8k images, direct URLs for the rest - name: '[name].[ext]', - }, + name: '[name].[ext]' + } }, // Fonts and svg images @@ -54,8 +54,8 @@ module.exports = { query: { limit: 8192, mimetype: 'application/font-woff', - name: '[name].[ext]', - }, + name: '[name].[ext]' + } }, { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, @@ -63,13 +63,13 @@ module.exports = { query: { limit: 8192, mimetype: 'application/octet-stream', - name: '[name].[ext]', - }, + name: '[name].[ext]' + } }, { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file-loader', - query: { name: '[name].[ext]' }, + query: { name: '[name].[ext]' } }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, @@ -77,9 +77,9 @@ module.exports = { query: { limit: 8192, mimetype: 'image/svg+xml', - name: '[name].[ext]', - }, - }, - ], - }, + name: '[name].[ext]' + } + } + ] + } };