diff --git a/client/src/assets/icons/FreeCodeCamp-logo.tsx b/client/src/assets/icons/FreeCodeCamp-logo.tsx index b325af856f..4885512957 100644 --- a/client/src/assets/icons/FreeCodeCamp-logo.tsx +++ b/client/src/assets/icons/FreeCodeCamp-logo.tsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/client/src/assets/icons/certification-icon.tsx b/client/src/assets/icons/certification-icon.tsx index 83e1af3870..10df0b2b84 100644 --- a/client/src/assets/icons/certification-icon.tsx +++ b/client/src/assets/icons/certification-icon.tsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React from 'react'; function CertificationIcon(): JSX.Element { diff --git a/client/src/assets/icons/donate-with-PayPal.tsx b/client/src/assets/icons/donate-with-PayPal.tsx index c9f8cbce0a..c0af22775e 100644 --- a/client/src/assets/icons/donate-with-PayPal.tsx +++ b/client/src/assets/icons/donate-with-PayPal.tsx @@ -1,4 +1,3 @@ -/* eslint-disable max-len */ import React, { Fragment } from 'react'; import { useTranslation } from 'react-i18next'; diff --git a/client/src/assets/icons/spacer.tsx b/client/src/assets/icons/spacer.tsx index d6dff8c718..8ff0c4a7c3 100644 --- a/client/src/assets/icons/spacer.tsx +++ b/client/src/assets/icons/spacer.tsx @@ -1,17 +1,21 @@ import React, { Fragment } from 'react'; import { useTranslation } from 'react-i18next'; -// eslint-disable-next-line -function Spacer(props: any): JSX.Element { +interface SpacerPropTypes { + style: Record; +} + +function Spacer(props: SpacerPropTypes): JSX.Element { const { t } = useTranslation(); + props.style = { paddingTop: '5', ...props.style }; + return ( {t('icons.spacer')} { } = props; if (!signedInUserName || signedInUserName !== username) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-call if (isEmpty(user) && username) { fetchProfileForUser(username); } @@ -272,8 +267,8 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => { @@ -294,10 +289,10 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => { block={true} bsSize='lg' bsStyle='primary' - target='_blank' href={`https://www.linkedin.com/profile/add?startTask=CERTIFICATION_NAME&name=${certTitle}&organizationId=4831032&issueYear=${certYear}&issueMonth=${ certMonth + 1 }&certUrl=${certURL}`} + target='_blank' > {t('profile.add-linkedin')} @@ -306,11 +301,11 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => { block={true} bsSize='lg' bsStyle='primary' - target='_blank' href={`https://twitter.com/intent/tweet?text=${t('profile.tweet', { certTitle: certTitle, certURL: certURL })}`} + target='_blank' > {t('profile.add-twitter')} @@ -331,7 +326,7 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => { -
+
{t('certification.issued')}  {certDate.toLocaleString([localeCode, 'en-US'], { @@ -346,7 +341,7 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => {
- +

placeholder

{{ user: displayName }} @@ -383,7 +378,7 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => { {signedInUserName === username ? shareCertBtns : ''} - + ); @@ -391,4 +386,8 @@ const ShowCertification = (props: IShowCertificationProps): JSX.Element => { ShowCertification.displayName = 'ShowCertification'; -export default connect(mapStateToProps, mapDispatchToProps)(ShowCertification); +export default connect( + mapStateToProps, + mapDispatchToProps + // eslint-disable-next-line @typescript-eslint/no-explicit-any +)(ShowCertification as any); diff --git a/client/src/client-only-routes/show-profile-or-four-oh-four.tsx b/client/src/client-only-routes/show-profile-or-four-oh-four.tsx index e327f3d716..838290f56e 100644 --- a/client/src/client-only-routes/show-profile-or-four-oh-four.tsx +++ b/client/src/client-only-routes/show-profile-or-four-oh-four.tsx @@ -63,7 +63,6 @@ const mapDispatchToProps: { class ShowProfileOrFourOhFour extends Component { componentDidMount() { const { requestedUser, maybeUser, fetchProfileForUser } = this.props; - // eslint-disable-next-line @typescript-eslint/no-unsafe-call if (isEmpty(requestedUser)) { fetchProfileForUser(maybeUser); } @@ -75,7 +74,6 @@ class ShowProfileOrFourOhFour extends Component { } const { isSessionUser, requestedUser, showLoading } = this.props; - // eslint-disable-next-line @typescript-eslint/no-unsafe-call if (isEmpty(requestedUser)) { if (showLoading) { // We don't know if /:maybeUser is a user or not, we will show @@ -100,7 +98,6 @@ class ShowProfileOrFourOhFour extends Component { // @ts-ignore ShowProfileOrFourOhFour.displayName = 'ShowProfileOrFourOhFour'; -// eslint-disable-next-line @typescript-eslint/no-unsafe-call export default connect( makeMapStateToProps, mapDispatchToProps diff --git a/client/src/client-only-routes/show-project-links.tsx b/client/src/client-only-routes/show-project-links.tsx index 2945caa7c6..074f1c5e5f 100644 --- a/client/src/client-only-routes/show-project-links.tsx +++ b/client/src/client-only-routes/show-project-links.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-sort-props */ import React, { useState } from 'react'; import '../components/layouts/project-links.css'; import { maybeUrlRE } from '../utils'; @@ -44,7 +43,6 @@ const ShowProjectLinks = (props: IShowProjectLinksProps): JSX.Element => { const { user: { completedChallenges } } = props; - // eslint-disable-next-line @typescript-eslint/no-unsafe-call const completedProject = find( completedChallenges, ({ id }) => projectId === id @@ -66,8 +64,8 @@ const ShowProjectLinks = (props: IShowProjectLinksProps): JSX.Element => { if (challengeFiles) { return ( @@ -127,8 +125,8 @@ const ShowProjectLinks = (props: IShowProjectLinksProps): JSX.Element => { return (
  • @@ -143,8 +141,7 @@ const ShowProjectLinks = (props: IShowProjectLinksProps): JSX.Element => { // @ts-expect-error Error expected until projectMap is typed ({ link, title, id }) => (
  • - {/* @ts-expect-error Link needs to be typed */} - + {t(`certification.project.title.${title as string}`, title)} : {getProjectSolution(id, title)} @@ -187,16 +184,16 @@ const ShowProjectLinks = (props: IShowProjectLinksProps): JSX.Element => { If you suspect that any of these projects violate the{' '} academic honesty policy , please{' '} report this to our team diff --git a/client/src/client-only-routes/show-settings.test.tsx b/client/src/client-only-routes/show-settings.test.tsx index b8d4754c76..5bed35ded7 100644 --- a/client/src/client-only-routes/show-settings.test.tsx +++ b/client/src/client-only-routes/show-settings.test.tsx @@ -55,4 +55,3 @@ const loggedInProps = { }; const loggedOutProps = { ...loggedInProps }; loggedOutProps.isSignedIn = false; -/* eslint-disable */ diff --git a/client/src/client-only-routes/show-settings.tsx b/client/src/client-only-routes/show-settings.tsx index 3831ea954b..2a58d8621a 100644 --- a/client/src/client-only-routes/show-settings.tsx +++ b/client/src/client-only-routes/show-settings.tsx @@ -26,7 +26,7 @@ import Certification from '../components/settings/Certification'; import { UserType } from '../redux/prop-types'; import DangerZone from '../components/settings/danger-zone'; -const { apiLocation } = envData as Record; +const { apiLocation } = envData; // TODO: update types for actions interface IShowSettingsProps { @@ -42,6 +42,7 @@ interface IShowSettingsProps { updateQuincyEmail: (isSendQuincyEmail: boolean) => void; user: UserType; verifyCert: () => void; + path?: string; } const mapStateToProps = createSelector( @@ -165,6 +166,7 @@ export function ShowSettings(props: IShowSettingsProps): JSX.Element { website={website} /> + {/* @ts-expect-error Portfolio types mismatch */} @@ -200,5 +202,5 @@ export function ShowSettings(props: IShowSettingsProps): JSX.Element { } ShowSettings.displayName = 'ShowSettings'; -// eslint-disable-next-line @typescript-eslint/no-unsafe-call + export default connect(mapStateToProps, mapDispatchToProps)(ShowSettings); diff --git a/client/src/client-only-routes/show-unsubscribed.tsx b/client/src/client-only-routes/show-unsubscribed.tsx index 5e16d1c87d..9a130c7ebc 100644 --- a/client/src/client-only-routes/show-unsubscribed.tsx +++ b/client/src/client-only-routes/show-unsubscribed.tsx @@ -7,7 +7,7 @@ import envData from '../../../config/env.json'; import FullWidthRow from '../components/helpers/full-width-row'; import { Spacer } from '../components/helpers'; -const { apiLocation } = envData as Record; +const { apiLocation } = envData; function ShowUnsubscribed({ unsubscribeId diff --git a/client/src/client-only-routes/show-user.tsx b/client/src/client-only-routes/show-user.tsx index 558a26b923..835852ebfb 100644 --- a/client/src/client-only-routes/show-user.tsx +++ b/client/src/client-only-routes/show-user.tsx @@ -166,6 +166,5 @@ class ShowUser extends Component { ShowUser.displayName = 'ShowUser'; export default withTranslation()( - // eslint-disable-next-line @typescript-eslint/no-unsafe-call connect(mapStateToProps, mapDispatchToProps)(ShowUser) ); diff --git a/client/src/components/Header/components/Login.tsx b/client/src/components/Header/components/Login.tsx index 6045ce46cb..8b166d7c6d 100644 --- a/client/src/components/Header/components/Login.tsx +++ b/client/src/components/Header/components/Login.tsx @@ -1,8 +1,3 @@ -/* eslint-disable react/prop-types */ -/* eslint-disable @typescript-eslint/no-unsafe-call */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ -/* eslint-disable import/no-unresolved */ -/* eslint-disable @typescript-eslint/no-unsafe-assignment */ import React from 'react'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; diff --git a/client/src/components/Header/components/auth-or-profile.tsx b/client/src/components/Header/components/auth-or-profile.tsx index 29efaf69ab..0d104c0648 100644 --- a/client/src/components/Header/components/auth-or-profile.tsx +++ b/client/src/components/Header/components/auth-or-profile.tsx @@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/ban-types */ -/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/ban-ts-comment */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ @@ -10,7 +8,7 @@ import { useTranslation } from 'react-i18next'; import Login from './Login'; export interface AuthOrProfileProps { - user?: Object; + user?: Record; } const AuthOrProfile = ({ user }: AuthOrProfileProps): JSX.Element => { const { t } = useTranslation(); @@ -30,7 +28,7 @@ const AuthOrProfile = ({ user }: AuthOrProfileProps): JSX.Element => { <> ; onClick?: React.MouseEventHandler | undefined; - user?: Object; + user?: Record; } const MenuButton = ({ diff --git a/client/src/components/Header/components/universal-nav.tsx b/client/src/components/Header/components/universal-nav.tsx index 88e3b15312..701fda03fc 100644 --- a/client/src/components/Header/components/universal-nav.tsx +++ b/client/src/components/Header/components/universal-nav.tsx @@ -8,13 +8,13 @@ import { Link, SkeletonSprite } from '../../helpers'; import NavLogo from './nav-logo'; import MenuButton from './menu-button'; import NavLinks from './nav-links'; -import './universalNav.css'; +import './universal-nav.css'; import { isLanding } from '../../../utils/path-parsers'; import Loadable from '@loadable/component'; const SearchBar = Loadable(() => import('../../search/searchBar/search-bar')); -const SearchBarOptimized = Loadable(() => - import('../../search/searchBar/search-bar-optimized') +const SearchBarOptimized = Loadable( + () => import('../../search/searchBar/search-bar-optimized') ); export interface UniversalNavProps { diff --git a/client/src/components/Header/index.tsx b/client/src/components/Header/index.tsx index faaef88a1e..42e0989e2c 100644 --- a/client/src/components/Header/index.tsx +++ b/client/src/components/Header/index.tsx @@ -1,9 +1,7 @@ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/unbound-method */ -/* eslint-disable @typescript-eslint/ban-types */ import React from 'react'; import Helmet from 'react-helmet'; @@ -41,7 +39,7 @@ export class Header extends React.Component< document.removeEventListener('click', this.handleClickOutside); } - handleClickOutside(event: any): void { + handleClickOutside(event: globalThis.MouseEvent): void { if ( this.state.displayMenu && this.menuButtonRef.current && diff --git a/client/src/components/helpers/form/block-save-button.tsx b/client/src/components/helpers/form/block-save-button.tsx index 7726171639..186d0dfbcc 100644 --- a/client/src/components/helpers/form/block-save-button.tsx +++ b/client/src/components/helpers/form/block-save-button.tsx @@ -7,6 +7,7 @@ function BlockSaveButton({ ...restProps }: { children?: React.ReactNode; + disabled?: boolean; }): JSX.Element { const { t } = useTranslation(); diff --git a/client/src/components/helpers/full-width-row.tsx b/client/src/components/helpers/full-width-row.tsx index 36f81585c9..dfb3d4de31 100644 --- a/client/src/components/helpers/full-width-row.tsx +++ b/client/src/components/helpers/full-width-row.tsx @@ -5,7 +5,7 @@ function FullWidthRow({ children, className }: { - children?: JSX.Element[]; + children?: React.ReactNode; className?: string; }): JSX.Element { return ( diff --git a/client/src/components/helpers/image-loader.tsx b/client/src/components/helpers/image-loader.tsx index 53ec38b38f..8010f7f545 100644 --- a/client/src/components/helpers/image-loader.tsx +++ b/client/src/components/helpers/image-loader.tsx @@ -1,8 +1,6 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import React, { useState } from 'react'; import './image-loader.css'; -// @ts-ignore import LazyLoad from 'react-lazy-load'; interface ImageLoaderProps { diff --git a/client/src/components/helpers/link.test.tsx b/client/src/components/helpers/link.test.tsx index c6612a214e..a4d0aee267 100644 --- a/client/src/components/helpers/link.test.tsx +++ b/client/src/components/helpers/link.test.tsx @@ -5,7 +5,6 @@ import { create } from 'react-test-renderer'; import Link from './link'; describe('', () => { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const externalLink = create().toJSON(); const gatsbyLink = create().toJSON(); diff --git a/client/src/components/helpers/link.tsx b/client/src/components/helpers/link.tsx index 0f30fe9d12..f60dcb363a 100644 --- a/client/src/components/helpers/link.tsx +++ b/client/src/components/helpers/link.tsx @@ -2,12 +2,14 @@ import React from 'react'; import { Link as GatsbyLink } from 'gatsby'; interface LinkProps { - children?: JSX.ElementChildrenAttribute; + children?: React.ReactNode; + className?: string; external?: boolean; sameTab?: boolean; + state?: Record; to: string; // TODO: figure out what these actually should be - other?: any[]; + other?: unknown[]; } const Link = ({ diff --git a/client/src/components/helpers/toggle-button.tsx b/client/src/components/helpers/toggle-button.tsx index 9ffdecb2ed..256d20a44f 100644 --- a/client/src/components/helpers/toggle-button.tsx +++ b/client/src/components/helpers/toggle-button.tsx @@ -14,7 +14,7 @@ interface ButtonProps { onChange: (value: string) => void; onLabel: string; value: boolean; - condition: boolean; + condition?: boolean; } type ActiveClass = Pick; diff --git a/client/src/components/profile/components/SocialIcons.tsx b/client/src/components/profile/components/SocialIcons.tsx index 5d4ba9feac..d8cad06034 100644 --- a/client/src/components/profile/components/SocialIcons.tsx +++ b/client/src/components/profile/components/SocialIcons.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import PropTypes from 'prop-types'; import { Row, Col } from '@freecodecamp/react-bootstrap'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { diff --git a/client/src/components/profile/components/TimeLine.test.tsx b/client/src/components/profile/components/TimeLine.test.tsx index 1065b857c4..2c57aaedcf 100644 --- a/client/src/components/profile/components/TimeLine.test.tsx +++ b/client/src/components/profile/components/TimeLine.test.tsx @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ import React from 'react'; import { render } from '@testing-library/react'; import TimeLine from './TimeLine'; diff --git a/client/src/components/profile/components/TimeLine.tsx b/client/src/components/profile/components/TimeLine.tsx index 8f47bf8a8b..9f38d0586c 100644 --- a/client/src/components/profile/components/TimeLine.tsx +++ b/client/src/components/profile/components/TimeLine.tsx @@ -1,3 +1,9 @@ +/* eslint-disable @typescript-eslint/ban-ts-comment */ +/* eslint-disable @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +/* eslint-disable @typescript-eslint/no-unsafe-assignment */ +/* eslint-disable @typescript-eslint/restrict-template-expressions */ +/* eslint-disable @typescript-eslint/unbound-method */ import React, { Component, useMemo } from 'react'; import { reverse, sortBy } from 'lodash-es'; import { @@ -304,17 +310,15 @@ class TimelineInner extends Component< {`${username}'s Solution to ${ - // @ts-ignore + // @ts-expect-error Need better TypeDef for this idToNameMap.get(id).challengeTitle }`} - {/* @ts-ignore */} @@ -377,6 +381,7 @@ function useIdToNameMap(): Map { idToNameMap.set(id, { challengeTitle: title, challengePath: slug }); } ); + // eslint-disable-next-line @typescript-eslint/no-unsafe-return return idToNameMap; } diff --git a/client/src/components/profile/components/TimelinePagination.tsx b/client/src/components/profile/components/TimelinePagination.tsx index 8ff0aaaff9..1c903ff3f5 100644 --- a/client/src/components/profile/components/TimelinePagination.tsx +++ b/client/src/components/profile/components/TimelinePagination.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import PropTypes from 'prop-types'; import { useTranslation } from 'react-i18next'; diff --git a/client/src/components/search/searchBar/no-hits-suggestion.tsx b/client/src/components/search/searchBar/no-hits-suggestion.tsx index a2bcea8db4..3962b7ae79 100644 --- a/client/src/components/search/searchBar/no-hits-suggestion.tsx +++ b/client/src/components/search/searchBar/no-hits-suggestion.tsx @@ -6,7 +6,7 @@ interface noHitsSuggestionPropType { title: string; } -const NoHitsSuggestion = ({ title }: noHitsSuggestionPropType) => { +const NoHitsSuggestion = ({ title }: noHitsSuggestionPropType): JSX.Element => { return (
    {title} diff --git a/client/src/components/search/searchBar/search-bar.tsx b/client/src/components/search/searchBar/search-bar.tsx index a359d66018..7f539df45b 100644 --- a/client/src/components/search/searchBar/search-bar.tsx +++ b/client/src/components/search/searchBar/search-bar.tsx @@ -27,7 +27,7 @@ const searchUrl: string = searchPageUrl as string; const mapStateToProps = createSelector( isSearchDropdownEnabledSelector, isSearchBarFocusedSelector, - (isDropdownEnabled, isSearchFocused) => ({ + (isDropdownEnabled: boolean, isSearchFocused: boolean) => ({ isDropdownEnabled, isSearchFocused }) @@ -184,7 +184,7 @@ export class SearchBar extends Component { } }; - render() { + render(): JSX.Element { const { isDropdownEnabled, isSearchFocused, innerRef, t } = this.props; const { index } = this.state; const placeholder = t ? t('search.placeholder') : ''; diff --git a/client/src/components/search/searchBar/search-hits.tsx b/client/src/components/search/searchBar/search-hits.tsx index 01826e40fe..54c8c531fc 100644 --- a/client/src/components/search/searchBar/search-hits.tsx +++ b/client/src/components/search/searchBar/search-hits.tsx @@ -9,6 +9,7 @@ import NoHitsSuggestion from './no-hits-suggestion'; const searchUrl = searchPageUrl as string; interface customHitsPropTypes { + // eslint-disable-next-line @typescript-eslint/no-explicit-any hits: Array; searchQuery: string; handleMouseEnter: (e: React.SyntheticEvent) => void; diff --git a/client/src/components/search/searchBar/search-suggestion.tsx b/client/src/components/search/searchBar/search-suggestion.tsx index 4709048a4e..9fdf8ed793 100644 --- a/client/src/components/search/searchBar/search-suggestion.tsx +++ b/client/src/components/search/searchBar/search-suggestion.tsx @@ -12,7 +12,7 @@ const Suggestion = ({ hit, handleMouseEnter, handleMouseLeave -}: suggestionPropTypes) => { +}: suggestionPropTypes): JSX.Element => { const dropdownFooter = hit.objectID.includes('footer-'); return ( {t('search.try')}
    ; diff --git a/client/src/components/search/searchPage/no-results.tsx b/client/src/components/search/searchPage/no-results.tsx index 8c4296d687..6552c68705 100644 --- a/client/src/components/search/searchPage/no-results.tsx +++ b/client/src/components/search/searchPage/no-results.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Trans } from 'react-i18next'; -function NoResults({ query }: { query: string }) { +function NoResults({ query }: { query: string }): JSX.Element { return (

    diff --git a/client/src/components/search/searchPage/search-page-hits.tsx b/client/src/components/search/searchPage/search-page-hits.tsx index 993abca6e9..617ce54f37 100644 --- a/client/src/components/search/searchPage/search-page-hits.tsx +++ b/client/src/components/search/searchPage/search-page-hits.tsx @@ -15,6 +15,7 @@ type allHitType = { handleClick?: EventHandler; }; +// eslint-disable-next-line @typescript-eslint/no-explicit-any const AllHits: React.ComponentClass = connectAutoComplete(({ hits, currentRefinement }) => { const isHitsEmpty = !hits.length; diff --git a/client/src/components/settings/about.tsx b/client/src/components/settings/about.tsx index 64901ddd5c..5eb6e9ac1e 100644 --- a/client/src/components/settings/about.tsx +++ b/client/src/components/settings/about.tsx @@ -31,7 +31,7 @@ type AboutProps = { points: number; submitNewAbout: (formValues: FormValues) => void; t: (str: string) => string; - toggleNightMode: () => void; + toggleNightMode: (theme: string) => void; username: string; }; diff --git a/client/src/components/settings/portfolio.tsx b/client/src/components/settings/portfolio.tsx index 870909f240..3798362c75 100644 --- a/client/src/components/settings/portfolio.tsx +++ b/client/src/components/settings/portfolio.tsx @@ -1,4 +1,4 @@ -import React, { Component, Fragment } from 'react'; +import React, { Component, FormEvent, Fragment } from 'react'; import { nanoid } from 'nanoid'; import { Button, @@ -107,7 +107,7 @@ class PortfolioSettings extends Component { state => ({ portfolio: state.portfolio.filter(p => p.id !== id) }), - () => this.handleSubmit(mockEvent) + () => this.handleSubmit(mockEvent as FormEvent) ); }; diff --git a/client/src/declarations.d.ts b/client/src/declarations.d.ts index 81745bc8f3..dceb9ae3f8 100644 --- a/client/src/declarations.d.ts +++ b/client/src/declarations.d.ts @@ -4,3 +4,4 @@ declare module '@freecodecamp/strip-comments'; declare module '@types/react-redux'; declare module '@types/validator'; declare module '@types/lodash-es'; +declare module 'react-lazy-load'; diff --git a/client/src/pages/challenges.test.ts b/client/src/pages/challenges.test.ts index 0d86029ab0..2dc85df4c1 100644 --- a/client/src/pages/challenges.test.ts +++ b/client/src/pages/challenges.test.ts @@ -1,3 +1,11 @@ +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-nocheck +/** + * TODO: + * Passing incomplete objects here is causing TS to be angry. + * We should either make the expected properties optional, or reevaluate + * these tests. + */ import toLearnPath from '../utils/to-learn-path'; import { withPrefix } from 'gatsby'; diff --git a/client/src/pages/email-sign-up.tsx b/client/src/pages/email-sign-up.tsx index 3cb2a76166..4b98a2c4bd 100644 --- a/client/src/pages/email-sign-up.tsx +++ b/client/src/pages/email-sign-up.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from 'react'; import { bindActionCreators } from 'redux'; import type { Dispatch } from 'redux'; import { connect } from 'react-redux'; -import SectionHeader from '../components/settings/SectionHeader'; +import SectionHeader from '../components/settings/section-header'; import IntroDescription from '../components/Intro/components/IntroDescription'; import { withTranslation } from 'react-i18next'; diff --git a/client/src/pages/user.tsx b/client/src/pages/user.tsx index 9ac7eb1140..7e50f75b68 100644 --- a/client/src/pages/user.tsx +++ b/client/src/pages/user.tsx @@ -8,6 +8,7 @@ import ShowUser from '../client-only-routes/show-user'; function User(): JSX.Element { return ( + {/* @ts-expect-error Adding path property breaks username typing */} {/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */} {/* @ts-ignore */}