Skip to content

Commit d0b0dd2

Browse files
committed
fix: satisfying the linter
Adjusting dependency arrays and ignoring a ‘forbidden’ prop type warning.
1 parent d4c9793 commit d0b0dd2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/plugins/PluginIframe.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default function PluginIframe({
5050
},
5151
}, url);
5252
}
53-
}, [iframeElement, mounted, width, height]);
53+
}, [iframeElement, mounted, width, height, url]);
5454

5555
usePluginEvent(iframeElement, PLUGIN_MOUNTED, () => {
5656
setMounted(true);

src/plugins/data/hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function useElementSize() {
8585

8686
const measuredRef = useCallback(_element => {
8787
setElement(_element);
88-
});
88+
}, []);
8989

9090
useEffect(() => {
9191
observerRef.current = new ResizeObserver(() => {

src/plugins/data/shapes.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ export const pluginShape = PropTypes.shape({
77
module: PropTypes.string,
88
url: PropTypes.string.isRequired,
99
type: PropTypes.oneOf([COMPONENT_PLUGIN, IFRAME_PLUGIN]).isRequired,
10-
props: PropTypes.object,
10+
// This is a place for us to put any generic props we want to pass to the component. We need it.
11+
props: PropTypes.object, // eslint-disable-line react/forbid-prop-types
1112
});

0 commit comments

Comments
 (0)