chore(deps): upgrade eslint, prettier & related packages
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
0a53a1d7f0
commit
6c91f81b0e
@@ -24,7 +24,4 @@ AppMountNotifier.propTypes = {
|
||||
render: PropTypes.func.isRequired
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(AppMountNotifier);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(AppMountNotifier);
|
||||
|
@@ -163,7 +163,4 @@ function DonateModal({
|
||||
DonateModal.displayName = 'DonateModal';
|
||||
DonateModal.propTypes = propTypes;
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(DonateModal);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(DonateModal);
|
||||
|
@@ -13,7 +13,7 @@ describe('<UniversalNav />', () => {
|
||||
displayMenu: false,
|
||||
menuButtonRef: {},
|
||||
searchBarRef: {},
|
||||
toggleDisplayMenu: function() {},
|
||||
toggleDisplayMenu: function () {},
|
||||
pathName: '/',
|
||||
fetchState: {
|
||||
pending: false
|
||||
|
@@ -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();
|
||||
|
@@ -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));
|
||||
|
@@ -22,7 +22,7 @@ function OfflineWarning({ isOnline, isSignedIn }) {
|
||||
}
|
||||
|
||||
function timeout() {
|
||||
id = setTimeout(function() {
|
||||
id = setTimeout(function () {
|
||||
setShowWarning(true);
|
||||
}, delayInMilliSeconds);
|
||||
}
|
||||
|
@@ -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}`;
|
||||
|
||||
|
@@ -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 };
|
||||
|
||||
|
@@ -90,7 +90,4 @@ LearnLayout.propTypes = {
|
||||
})
|
||||
};
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(LearnLayout);
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(LearnLayout);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user