diff --git a/package-lock.json b/package-lock.json index 459855d79..56e30d718 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6390,16 +6390,20 @@ "dev": true }, "eslint-plugin-react": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", - "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.0.tgz", + "integrity": "sha512-MbPYPGsOteqqnFZx4lGLw6izxcWv6onLsil/6iX6+CaZAzMxOwsPja1Xg25cVCJ4jwKBDhJXe+ZAn6HAjGHSCw==", "dev": true, "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.2" + "jsx-ast-utils": "^2.1.0", + "object.entries": "^1.1.0", + "object.fromentries": "^2.0.0", + "object.values": "^1.1.0", + "prop-types": "^15.7.2", + "resolve": "^1.10.1" }, "dependencies": { "doctrine": { diff --git a/package.json b/package.json index 834a744a0..0569629f3 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "eslint-plugin-import": "2.18.0", "eslint-plugin-jsx-a11y": "6.2.1", "eslint-plugin-loosely-restrict-imports": "^0.1.15", - "eslint-plugin-react": "7.11.1", + "eslint-plugin-react": "7.14.0", "file-loader": "4.0.0", "fork-ts-checker-webpack-plugin-alt": "0.4.14", "fs-extra": "8.0.1", diff --git a/src/ActionBar/ActionBar.js b/src/ActionBar/ActionBar.js index 5d089950f..c5dfbd8a9 100644 --- a/src/ActionBar/ActionBar.js +++ b/src/ActionBar/ActionBar.js @@ -27,6 +27,7 @@ const ActionBar = ({ mobile, width, children, className, ...props }) => { ActionBar.displayName = 'ActionBar'; ActionBar.propTypes = { + children: PropTypes.node, className: PropTypes.string, mobile: PropTypes.bool, width: PropTypes.string diff --git a/src/Alert/Alert.js b/src/Alert/Alert.js index df7369f3b..fe46a490a 100644 --- a/src/Alert/Alert.js +++ b/src/Alert/Alert.js @@ -80,6 +80,7 @@ Alert.displayName = 'Alert'; Alert.propTypes = { buttonProps: PropTypes.object, + children: PropTypes.node, className: PropTypes.string, dismissible: PropTypes.bool, link: PropTypes.string, diff --git a/src/Badge/Badge.js b/src/Badge/Badge.js index 61af091a0..e8ddbff6d 100644 --- a/src/Badge/Badge.js +++ b/src/Badge/Badge.js @@ -23,6 +23,7 @@ const Badge = ({ type, modifier, children, className, ...props }) => { Badge.displayName = 'Badge'; Badge.propTypes = { + children: PropTypes.node, className: PropTypes.string, modifier: PropTypes.oneOf(BADGE_MODIFIERS), type: PropTypes.oneOf(BADGE_TYPES) diff --git a/src/Badge/Counter.js b/src/Badge/Counter.js index 12dc2e26d..09118c8b8 100644 --- a/src/Badge/Counter.js +++ b/src/Badge/Counter.js @@ -22,6 +22,7 @@ const Counter = ({ localizedText, notification, children, className, ...props }) Counter.displayName = 'Counter'; Counter.propTypes = { + children: PropTypes.node, className: PropTypes.string, localizedText: CustomPropTypes.i18n({ counterLabel: PropTypes.string diff --git a/src/Badge/Label.js b/src/Badge/Label.js index d6467cc01..7e68e3049 100644 --- a/src/Badge/Label.js +++ b/src/Badge/Label.js @@ -17,6 +17,7 @@ const Label = ({ type, children, className, ...props }) => { Label.displayName = 'Label'; Label.propTypes = { + children: PropTypes.node, className: PropTypes.string, type: PropTypes.oneOf(LABEL_TYPES) }; diff --git a/src/Badge/Status.js b/src/Badge/Status.js index 7e018cca2..1d0ea905e 100644 --- a/src/Badge/Status.js +++ b/src/Badge/Status.js @@ -24,6 +24,7 @@ const Status = ({ type, glyph, children, className, ...props }) => { Status.displayName = 'Status'; Status.propTypes = { + children: PropTypes.node, className: PropTypes.string, glyph: PropTypes.string, type: PropTypes.oneOf(STATUS_TYPES) diff --git a/src/Breadcrumb/_BreadcrumbItem.js b/src/Breadcrumb/_BreadcrumbItem.js index 870fcdd20..11005870c 100644 --- a/src/Breadcrumb/_BreadcrumbItem.js +++ b/src/Breadcrumb/_BreadcrumbItem.js @@ -30,6 +30,8 @@ const BreadcrumbItem = ({ url, name, className, children, ...props }) => { BreadcrumbItem.displayName = 'Breadcrumb.Item'; BreadcrumbItem.propTypes = { + children: PropTypes.node, + className: PropTypes.string, name: PropTypes.string, url: PropTypes.string }; diff --git a/src/Identifier/Identifier.js b/src/Identifier/Identifier.js index 2bd0ddcd5..359b9cbf5 100644 --- a/src/Identifier/Identifier.js +++ b/src/Identifier/Identifier.js @@ -38,6 +38,7 @@ Identifier.displayName = 'Identifier'; Identifier.propTypes = { backgroundImageUrl: PropTypes.string, + children: PropTypes.node, className: PropTypes.string, color: CustomPropTypes.range(1, 9), glyph: PropTypes.string, diff --git a/src/Menu/Menu.js b/src/Menu/Menu.js index 85f2573c4..aca902ba0 100644 --- a/src/Menu/Menu.js +++ b/src/Menu/Menu.js @@ -25,6 +25,7 @@ Menu.displayName = 'Menu'; Menu.propTypes = { addonBefore: PropTypes.bool, + children: PropTypes.node, className: PropTypes.string }; diff --git a/src/Menu/_MenuGroup.js b/src/Menu/_MenuGroup.js index ac067fad8..636d054ec 100644 --- a/src/Menu/_MenuGroup.js +++ b/src/Menu/_MenuGroup.js @@ -23,6 +23,7 @@ MenuGroup.displayName = 'Menu.Group'; MenuGroup.propTypes = { title: PropTypes.string.isRequired, + children: PropTypes.node, className: PropTypes.string, headingLevel: CustomPropTypes.range(2, 6), titleProps: PropTypes.object diff --git a/src/Menu/_MenuItem.js b/src/Menu/_MenuItem.js index feef89230..362252e81 100644 --- a/src/Menu/_MenuItem.js +++ b/src/Menu/_MenuItem.js @@ -55,8 +55,10 @@ MenuItem.displayName = 'Menu.Item'; MenuItem.propTypes = { addon: PropTypes.string, addonProps: PropTypes.object, + children: PropTypes.node, className: PropTypes.string, isLink: PropTypes.bool, + onclick: PropTypes.func, separator: PropTypes.bool, url: PropTypes.string, urlProps: PropTypes.object diff --git a/src/Modal/Modal.js b/src/Modal/Modal.js index c7c5bb09a..4e8016f6b 100644 --- a/src/Modal/Modal.js +++ b/src/Modal/Modal.js @@ -104,6 +104,8 @@ Modal.propTypes = { title: PropTypes.string.isRequired, actions: PropTypes.node, bodyProps: PropTypes.object, + children: PropTypes.node, + className: PropTypes.string, closeProps: PropTypes.object, contentProps: PropTypes.object, footerProps: PropTypes.object, diff --git a/src/Pagination/Pagination.js b/src/Pagination/Pagination.js index 01b7b1fad..20cfd4a26 100644 --- a/src/Pagination/Pagination.js +++ b/src/Pagination/Pagination.js @@ -144,6 +144,7 @@ Pagination.propTypes = { onClick: PropTypes.func.isRequired, className: PropTypes.string, displayTotal: PropTypes.bool, + displayTotalProps: PropTypes.object, initialPage: PropTypes.number, itemsPerPage: PropTypes.number, linkProps: PropTypes.object, diff --git a/src/Panel/Panel.js b/src/Panel/Panel.js index 1eca6fc63..178314f4b 100644 --- a/src/Panel/Panel.js +++ b/src/Panel/Panel.js @@ -26,6 +26,7 @@ const Panel = props => { Panel.displayName = 'Panel'; Panel.propTypes = { + children: PropTypes.node, className: PropTypes.string, colSpan: CustomPropTypes.range(1, 6) }; diff --git a/src/Panel/PanelGrid.js b/src/Panel/PanelGrid.js index c990636bc..b810f0365 100644 --- a/src/Panel/PanelGrid.js +++ b/src/Panel/PanelGrid.js @@ -27,6 +27,7 @@ const PanelGrid = props => { PanelGrid.displayName = 'PanelGrid'; PanelGrid.propTypes = { + children: PropTypes.node, className: PropTypes.string, cols: CustomPropTypes.range(1, 6), nogap: PropTypes.bool diff --git a/src/Panel/_PanelActions.js b/src/Panel/_PanelActions.js index b78f6936f..1e7afd27a 100644 --- a/src/Panel/_PanelActions.js +++ b/src/Panel/_PanelActions.js @@ -16,6 +16,7 @@ const PanelActions = props => { PanelActions.displayName = 'Panel.Actions'; PanelActions.propTypes = { + children: PropTypes.node, className: PropTypes.string }; diff --git a/src/Panel/_PanelBody.js b/src/Panel/_PanelBody.js index f1437ae8f..f66d97779 100644 --- a/src/Panel/_PanelBody.js +++ b/src/Panel/_PanelBody.js @@ -16,6 +16,7 @@ const PanelBody = props => { PanelBody.displayName = 'Panel.Body'; PanelBody.propTypes = { + children: PropTypes.node, className: PropTypes.string }; diff --git a/src/Panel/_PanelFilters.js b/src/Panel/_PanelFilters.js index f79389274..8e5f23e89 100644 --- a/src/Panel/_PanelFilters.js +++ b/src/Panel/_PanelFilters.js @@ -20,6 +20,7 @@ const PanelFilters = props => { PanelFilters.displayName = 'Panel.Filters'; PanelFilters.propTypes = { + children: PropTypes.node, className: PropTypes.string }; diff --git a/src/Panel/_PanelFooter.js b/src/Panel/_PanelFooter.js index 5ef761991..9deadbe3a 100644 --- a/src/Panel/_PanelFooter.js +++ b/src/Panel/_PanelFooter.js @@ -16,6 +16,7 @@ const PanelFooter = props => { PanelFooter.displayName = 'Panel.Footer'; PanelFooter.propTypes = { + children: PropTypes.node, className: PropTypes.string }; diff --git a/src/Panel/_PanelHeader.js b/src/Panel/_PanelHeader.js index 1486da143..bda072149 100644 --- a/src/Panel/_PanelHeader.js +++ b/src/Panel/_PanelHeader.js @@ -16,6 +16,7 @@ const PanelHeader = props => { PanelHeader.displayName = 'Panel.Header'; PanelHeader.propTypes = { + children: PropTypes.node, className: PropTypes.string }; diff --git a/src/Tabs/TabGroup.js b/src/Tabs/TabGroup.js index db3dce6e2..39203f202 100644 --- a/src/Tabs/TabGroup.js +++ b/src/Tabs/TabGroup.js @@ -101,6 +101,7 @@ TabGroup.propTypes = { children: PropTypes.node, className: PropTypes.string, selectedIndex: PropTypes.number, + tabGroupProps: PropTypes.object, onTabClick: PropTypes.func }; diff --git a/src/Tile/Tile.js b/src/Tile/Tile.js index ac85a04a4..536d3bc34 100644 --- a/src/Tile/Tile.js +++ b/src/Tile/Tile.js @@ -60,6 +60,7 @@ Tile.displayName = 'Tile'; Tile.propTypes = { backgroundColor: PropTypes.number, backgroundImage: PropTypes.string, + children: PropTypes.node, className: PropTypes.string, colorAccent: PropTypes.number, columnSpan: CustomPropTypes.range(1, 6), diff --git a/src/Tile/_TileContent.js b/src/Tile/_TileContent.js index 2dd509fd7..336cf1c6a 100644 --- a/src/Tile/_TileContent.js +++ b/src/Tile/_TileContent.js @@ -36,8 +36,10 @@ TileContent.displayName = 'Tile.Content'; TileContent.propTypes = { title: PropTypes.string.isRequired, + children: PropTypes.node, className: PropTypes.string, headingLevel: CustomPropTypes.range(2, 6), + productTile: PropTypes.bool, titleProps: PropTypes.object }; diff --git a/src/Tile/_TileMedia.js b/src/Tile/_TileMedia.js index b89fa0d3c..40884c3cb 100644 --- a/src/Tile/_TileMedia.js +++ b/src/Tile/_TileMedia.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import React from 'react'; const TileMedia = props => { - const { children, className, productTile, ...rest } = props; + const { children, className, ...rest } = props; const tileMediaClasses = classnames( 'fd-tile__media', diff --git a/src/Tile/__snapshots__/Tile.test.js.snap b/src/Tile/__snapshots__/Tile.test.js.snap index 1ebd7ecc2..f99116a4a 100644 --- a/src/Tile/__snapshots__/Tile.test.js.snap +++ b/src/Tile/__snapshots__/Tile.test.js.snap @@ -182,6 +182,7 @@ exports[` create tile component 7`] = ` />
create tile component 8`] = ` />