chore(deps): upgrade eslint, prettier & related packages

This commit is contained in:
Mrugesh Mohapatra
2021-03-11 00:31:46 +05:30
committed by Mrugesh Mohapatra
parent 0a53a1d7f0
commit 6c91f81b0e
94 changed files with 1462 additions and 1411 deletions

View File

@@ -24,7 +24,4 @@ AppMountNotifier.propTypes = {
render: PropTypes.func.isRequired
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(AppMountNotifier);
export default connect(mapStateToProps, mapDispatchToProps)(AppMountNotifier);

View File

@@ -163,7 +163,4 @@ function DonateModal({
DonateModal.displayName = 'DonateModal';
DonateModal.propTypes = propTypes;
export default connect(
mapStateToProps,
mapDispatchToProps
)(DonateModal);
export default connect(mapStateToProps, mapDispatchToProps)(DonateModal);

View File

@@ -13,7 +13,7 @@ describe('<UniversalNav />', () => {
displayMenu: false,
menuButtonRef: {},
searchBarRef: {},
toggleDisplayMenu: function() {},
toggleDisplayMenu: function () {},
pathName: '/',
fetchState: {
pending: false

View File

@@ -10,12 +10,9 @@ import { apiLocation, homeLocation } from '../../../../../config/env.json';
import './login.css';
const mapStateToProps = createSelector(
isSignedInSelector,
isSignedIn => ({
isSignedIn
})
);
const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({
isSignedIn
}));
function Login(props) {
const { t } = useTranslation();

View File

@@ -207,7 +207,4 @@ export class NavLinks extends Component {
NavLinks.propTypes = propTypes;
NavLinks.displayName = 'NavLinks';
export default connect(
null,
mapDispatchToProps
)(withTranslation()(NavLinks));
export default connect(null, mapDispatchToProps)(withTranslation()(NavLinks));

View File

@@ -22,7 +22,7 @@ function OfflineWarning({ isOnline, isSignedIn }) {
}
function timeout() {
id = setTimeout(function() {
id = setTimeout(function () {
setShowWarning(true);
}, delayInMilliSeconds);
}

View File

@@ -7,10 +7,7 @@ const createLanguageRedirect = ({ clientLocale, lang }) => {
.filter(item => (item !== clientLocale && item !== lang ? item : ''))
.join('/');
const hostTail = window?.location?.host
.split('.')
.slice(1)
.join('.');
const hostTail = window?.location?.host.split('.').slice(1).join('.');
const nextClient = lang !== 'chinese' ? 'www' : 'chinese';
const nextLocation = `${window?.location?.protocol}//${nextClient}.${hostTail}`;

View File

@@ -6,12 +6,9 @@ import { fetchUser, isSignedInSelector, executeGA } from '../../redux';
import { createSelector } from 'reselect';
import Helmet from 'react-helmet';
const mapStateToProps = createSelector(
isSignedInSelector,
isSignedIn => ({
isSignedIn
})
);
const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({
isSignedIn
}));
const mapDispatchToProps = { fetchUser, executeGA };

View File

@@ -90,7 +90,4 @@ LearnLayout.propTypes = {
})
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(LearnLayout);
export default connect(mapStateToProps, mapDispatchToProps)(LearnLayout);

View File

@@ -336,9 +336,17 @@ function useIdToNameMap() {
certPath: getPathFromID(id)
});
}
edges.forEach(({ node: { id, title, fields: { slug } } }) => {
idToNameMap.set(id, { challengeTitle: title, challengePath: slug });
});
edges.forEach(
({
node: {
id,
title,
fields: { slug }
}
}) => {
idToNameMap.set(id, { challengeTitle: title, challengePath: slug });
}
);
return idToNameMap;
}

View File

@@ -386,9 +386,7 @@ export class CertificationSettings extends Component {
newChallengeFound = true;
}
const valuesSaved = values(formChalObj)
.filter(Boolean)
.filter(isString);
const valuesSaved = values(formChalObj).filter(Boolean).filter(isString);
const isProjectSectionComplete = valuesSaved.length === oldSubmissions;
@@ -409,7 +407,7 @@ export class CertificationSettings extends Component {
const initialObject = {};
let filledforms = 0;
legacyProjectMap[certName].forEach(project => {
let completedProject = find(completedChallenges, function(challenge) {
let completedProject = find(completedChallenges, function (challenge) {
return challenge['id'] === project['id'];
});
if (!completedProject) {

View File

@@ -14,12 +14,9 @@ import Spacer from '../helpers/Spacer';
import ToggleSetting from './ToggleSetting';
import SectionHeader from './SectionHeader';
const mapStateToProps = createSelector(
userSelector,
user => ({
user
})
);
const mapStateToProps = createSelector(userSelector, user => ({
user
}));
const mapDispatchToProps = dispatch =>
bindActionCreators({ submitProfileUI }, dispatch);