chore: tree shaking - unused / redundant code (#43867)

This commit is contained in:
RobertoMSousa
2021-10-15 08:43:43 +01:00
committed by GitHub
parent 05af1bf09d
commit cb0a502d82
7 changed files with 4 additions and 29 deletions

View File

@ -35,7 +35,7 @@
"react": {
"version": "16.4.2",
"import/ignore": ["\\.json$"],
"import/extensions": [".js", ".jsx", ".tsx"]
"import/extensions": [".js", ".jsx", ".tsx", ".ts"]
},
"import/ignore": ["node_modules"]
},

View File

@ -1,8 +1,4 @@
// eslint-disable-next-line
import {
// prettier ignore
PassportConfigurator
} from '@freecodecamp/loopback-component-passport';
import { PassportConfigurator } from '@freecodecamp/loopback-component-passport';
import dedent from 'dedent';
import passport from 'passport';

View File

@ -6,6 +6,7 @@ import { flatten } from 'lodash';
// via the user object, then we should *not* store this so it can be garbage
// collected.
// eslint-disable-next-line import/no-unresolved
import curriculum from '../../../../config/curriculum.json';
export function getChallenges() {

View File

@ -3,18 +3,6 @@ import { useTranslation } from 'react-i18next';
import Link from '../helpers/link';
import './footer.css';
type ColHeaderProps = {
children: string | React.ReactNode | React.ReactElement;
};
// TODO: Figure out what ColHeader does: 'ColHeader' is declared but its value is never read.
// eslint-disable-next-line
const ColHeader = ({ children, ...other }: ColHeaderProps): JSX.Element => (
<div className='col-header' {...other}>
{children}
</div>
);
function Footer(): JSX.Element {
const { t } = useTranslation();

View File

@ -1,6 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
// @ts-nocheck
import React from 'react';
import { useTranslation } from 'react-i18next';

View File

@ -32,11 +32,8 @@ import { flashMessageSelector, removeFlashMessage } from '../Flash/redux';
import Footer from '../Footer';
import Header from '../Header';
import OfflineWarning from '../OfflineWarning';
// preload common fonts
// eslint-disable-next-line max-len
// eslint-disable-next-line max-len
// eslint-disable-next-line max-len
// preload common fonts
import './fonts.css';
import './global.css';
import './variables.css';

View File

@ -1,5 +0,0 @@
.powered-by-wrapper {
display: flex;
justify-content: center;
align-items: center;
}