diff --git a/.eslintrc b/.eslintrc index 596e1115f..6d549eac2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -44,6 +44,7 @@ }], "react/jsx-uses-react": "off", "react/react-in-jsx-scope": "off", + "react/require-default-props": "off", "react-hooks/exhaustive-deps": "error", "testing-library/render-result-naming-convention": "off", "testing-library/no-render-in-lifecycle": [ diff --git a/src/components/MosaicRenderPreview.js b/src/components/MosaicRenderPreview.js index 201a650a3..a0ae3ea0c 100644 --- a/src/components/MosaicRenderPreview.js +++ b/src/components/MosaicRenderPreview.js @@ -2,25 +2,24 @@ import PropTypes from 'prop-types'; import MinimalWindow from '../containers/MinimalWindow'; /** - * MosaicRenderPreview is used to for the preview when dragging a mosaic window/tile -*/ -export function MosaicRenderPreview(props) { - const { - t, title, windowId, - } = props; - + * MosaicRenderPreview is used for the preview when dragging a mosaic window/tile + */ +export function MosaicRenderPreview({ + t = k => k, + title = '', + windowId = '', +}) { return ( - + ); } MosaicRenderPreview.propTypes = { t: PropTypes.func, title: PropTypes.string, - windowId: PropTypes.string.isRequired, // eslint-disable-line react/no-unused-prop-types -}; - -MosaicRenderPreview.defaultProps = { - t: k => k, - title: '', + windowId: PropTypes.string.isRequired, };