Skip to content

Commit

Permalink
fix: satisfying the linter
Browse files Browse the repository at this point in the history
Adjusting dependency arrays and ignoring a ‘forbidden’ prop type warning.
  • Loading branch information
davidjoy committed May 26, 2023
1 parent 12abf8b commit aa5f8aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/plugins/PluginIframe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default function PluginIframe({
},
}, url);
}
}, [iframeElement, mounted, width, height]);
}, [iframeElement, mounted, width, height, url]);

usePluginEvent(iframeElement, PLUGIN_MOUNTED, () => {
setMounted(true);
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/data/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function useElementSize() {

const measuredRef = useCallback(_element => {
setElement(_element);
});
}, []);

useEffect(() => {
observerRef.current = new ResizeObserver(() => {
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/data/shapes.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ export const pluginShape = PropTypes.shape({
module: PropTypes.string,
url: PropTypes.string.isRequired,
type: PropTypes.oneOf([COMPONENT_PLUGIN, IFRAME_PLUGIN]).isRequired,
props: PropTypes.object,
// This is a place for us to put any generic props we want to pass to the component. We need it.
props: PropTypes.object, // eslint-disable-line react/forbid-prop-types
});

0 comments on commit aa5f8aa

Please sign in to comment.