Skip to content

Commit

Permalink
chore: fix minor lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Apr 4, 2024
1 parent b56b5e9 commit 5b08ae2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/data/configureStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ function composeMiddleware() {
if (getConfig().ENVIRONMENT === 'development') {
const loggerMiddleware = createLogger({
collapsed: true,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
}) as any; // TODO: why is this type not accepted?
return composeWithDevTools(applyMiddleware(thunkMiddleware, sagaMiddleware, loggerMiddleware));
}
Expand Down
2 changes: 2 additions & 0 deletions src/edx-frontend-missing-types.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
// Declare some very minimal types for @edx packages that don't have types
declare module '@edx/frontend-platform' {
const APP_INIT_ERROR: string;
Expand All @@ -19,6 +20,7 @@ declare module '@edx/frontend-platform/i18n' {
injectIntl,
intlShape,
defineMessages,
IntlProvider,
} from 'react-intl';
}

Expand Down
27 changes: 13 additions & 14 deletions src/head/Head.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { Helmet } from 'react-helmet';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { useIntl } from '@edx/frontend-platform/i18n';
import { getConfig } from '@edx/frontend-platform';

import messages from './messages';

const Head = ({ intl }) => (
<Helmet>
<title>
{intl.formatMessage(messages['profile.page.title'], { siteName: getConfig().SITE_NAME })}
</title>
<link rel="shortcut icon" href={getConfig().FAVICON_URL} type="image/x-icon" />
</Helmet>
);
const Head = () => {
const intl = useIntl();
return (
<Helmet>
<title>
{intl.formatMessage(messages['profile.page.title'], { siteName: getConfig().SITE_NAME })}
</title>
<link rel="shortcut icon" href={getConfig().FAVICON_URL} type="image/x-icon" />
</Helmet>
);
}

Head.propTypes = {
intl: intlShape.isRequired,
};

export default injectIntl(Head);
export default Head;
2 changes: 1 addition & 1 deletion src/profile/ProfilePage.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const requiredProfilePageProps = {
};

// Mock language cookie
Object.defineProperty(global.document, 'cookie', {
Object.defineProperty(globalThis.document, 'cookie', {
writable: true,
value: `${getConfig().LANGUAGE_PREFERENCE_COOKIE_NAME}=en`,
});
Expand Down

0 comments on commit 5b08ae2

Please sign in to comment.