diff --git a/apps/comments-ui/src/App.tsx b/apps/comments-ui/src/App.tsx index 0a82a0c4d8..74635aa618 100644 --- a/apps/comments-ui/src/App.tsx +++ b/apps/comments-ui/src/App.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-shadow */ + import AuthFrame from './AuthFrame'; import ContentBox from './components/ContentBox'; import PopupBox from './components/PopupBox'; @@ -32,7 +34,7 @@ const App: React.FC = ({scriptTag}) => { siteUrl: options.siteUrl, apiUrl: options.apiUrl!, apiKey: options.apiKey! - }) + }); }, [options]); const [adminApi, setAdminApi] = useState(null); @@ -45,7 +47,7 @@ const App: React.FC = ({scriptTag}) => { return { ...state, ...newState - } + }; }); }, [setFullState]); @@ -55,7 +57,7 @@ const App: React.FC = ({scriptTag}) => { // because updates to state may be asynchronous // so calling dispatchAction('counterUp') multiple times, may yield unexpected results if we don't use a callback function setState((state) => { - return SyncActionHandler({action, data, state, api, adminApi: adminApi!, options}) + return SyncActionHandler({action, data, state, api, adminApi: adminApi!, options}); }); return; } @@ -66,7 +68,7 @@ const App: React.FC = ({scriptTag}) => { setState((state) => { ActionHandler({action, data, state, api, adminApi: adminApi!, options}).then((updatedState) => { setState({...updatedState}); - }).catch(console.error); + }).catch(console.error); // eslint-disable-line no-console // No immediate changes return {}; @@ -125,7 +127,7 @@ const App: React.FC = ({scriptTag}) => { pagination: data.meta.pagination, count: count }; - } + }; /** Initialize comments setup on load, fetch data and setup state*/ const initSetup = async () => { diff --git a/apps/comments-ui/src/AuthFrame.tsx b/apps/comments-ui/src/AuthFrame.tsx index a1de1483ec..8410eacb29 100644 --- a/apps/comments-ui/src/AuthFrame.tsx +++ b/apps/comments-ui/src/AuthFrame.tsx @@ -10,5 +10,5 @@ const AuthFrame: React.FC = ({adminUrl, onLoad}) => { return ( ); -} +}; export default AuthFrame; diff --git a/apps/comments-ui/src/components/IFrame.tsx b/apps/comments-ui/src/components/IFrame.tsx index ffb73b8a1c..3dc5e8de0c 100644 --- a/apps/comments-ui/src/components/IFrame.tsx +++ b/apps/comments-ui/src/components/IFrame.tsx @@ -37,7 +37,7 @@ export default class IFrame extends Component { if (this.props.onResize) { // eslint-disable-next-line @typescript-eslint/no-unused-vars - (new ResizeObserver(_ => { + (new ResizeObserver((_) => { window.requestAnimationFrame(() => { this.props.onResize(this.iframeRoot); }); diff --git a/apps/comments-ui/src/components/content/Pagination.tsx b/apps/comments-ui/src/components/content/Pagination.tsx index abf5d200d7..c933737f50 100644 --- a/apps/comments-ui/src/components/content/Pagination.tsx +++ b/apps/comments-ui/src/components/content/Pagination.tsx @@ -18,7 +18,7 @@ const Pagination = () => { return null; } - const text = left === 1 ? t('Show 1 previous comment') : t('Show {{amount}} previous comments', {amount: formatNumber(left)}) + const text = left === 1 ? t('Show 1 previous comment') : t('Show {{amount}} previous comments', {amount: formatNumber(left)}); return (