Skip to content

Commit 3876ff5

Browse files
fix lint
1 parent 51c37ce commit 3876ff5

File tree

8 files changed

+46
-50
lines changed

8 files changed

+46
-50
lines changed

src/components/DateRangePicker/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ function DateRangePicker(props) {
298298
});
299299

300300
setIsComponentVisible(false);
301-
}
301+
};
302302

303303
/**
304304
* Event handler on date selection changes

src/components/challenge-detail/Header/ChallengeTags.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ export default function ChallengeTags(props) {
127127
onClick={() =>
128128
setImmediate(() => setChallengeListingFilter({ tags: [tag] }))
129129
}
130-
to={`${challengesUrl}${filterByTag}&tags[]=${encodeURIComponent(tag)}`}
130+
to={`${challengesUrl}${filterByTag}&tags[]=${encodeURIComponent(
131+
tag
132+
)}`}
131133
>
132134
{tag}
133135
</Tag>

src/containers/Challenges/Listing/ChallengeItem/index.jsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import * as utils from "../../../../utils";
1212
import ProgressTooltip from "../tooltips/ProgressTooltip";
1313
import PlacementsTooltip from "../tooltips/PlacementsTooltip";
1414
import TagsMoreTooltip from "../tooltips/TagsMoreTooltip";
15-
import { CHALLENGES_URL } from 'constants';
16-
import { Link } from '@reach/router';
15+
import { CHALLENGES_URL } from "constants";
16+
import { Link } from "@reach/router";
1717

1818
import "./styles.scss";
1919

@@ -45,9 +45,7 @@ const ChallengeItem = ({ challenge, onClickTag, onClickTrack, isLoggedIn }) => {
4545
<div styleName="info">
4646
<div styleName="name-container">
4747
<h6 styleName="name">
48-
<Link
49-
to={`${CHALLENGES_URL}/${challenge.id}`}
50-
>
48+
<Link to={`${CHALLENGES_URL}/${challenge.id}`}>
5149
{challenge.name}
5250
</Link>
5351
</h6>
@@ -72,9 +70,7 @@ const ChallengeItem = ({ challenge, onClickTag, onClickTrack, isLoggedIn }) => {
7270
/>
7371
</div>
7472
<div styleName="nums">
75-
<Link
76-
to={`${CHALLENGES_URL}/${challenge.id}?tab=registrants`}
77-
>
73+
<Link to={`${CHALLENGES_URL}/${challenge.id}?tab=registrants`}>
7874
<NumRegistrants numOfRegistrants={challenge.numOfRegistrants} />
7975
</Link>
8076
<Link to={submissionLink}>

src/containers/Challenges/index.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import Listing from "./Listing";
55
import actions from "../../actions";
66
// import ChallengeRecommendedError from "./Listing/errors/ChallengeRecommendedError";
77
import * as constants from "../../constants";
8-
import IconListView from "../../assets/icons/list-view.svg";
9-
import IconCardView from "../../assets/icons/card-view.svg";
8+
// import IconListView from "../../assets/icons/list-view.svg";
9+
// import IconCardView from "../../assets/icons/card-view.svg";
1010
import { Banner } from "@topcoder/micro-frontends-earn-app";
1111
import * as utils from "../../utils";
1212

@@ -76,14 +76,14 @@ const Challenges = ({
7676
<Banner />
7777
<h1 styleName="title">
7878
<span>CHALLENGES</span>
79-
<span styleName="view-mode">
79+
{/* <span styleName="view-mode">
8080
<button styleName="button-icon active">
8181
<IconListView />
8282
</button>
8383
<button styleName="button-icon">
8484
<IconCardView />
8585
</button>
86-
</span>
86+
</span> */}
8787
</h1>
8888
{initialized && (
8989
<>

src/containers/Filter/ChallengeFilter/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const ChallengeFilter = ({
121121
updateFilter(filterChange);
122122
}}
123123
/>
124-
<span>{track.replace('Quality Assurance', 'QA')}</span>
124+
<span>{track.replace("Quality Assurance", "QA")}</span>
125125
</span>
126126
))}
127127
</div>

src/containers/challenge-detail/index.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -977,9 +977,7 @@ const mapDispatchToProps = (dispatch) => {
977977
change.types = constants.FILTER_CHALLENGE_TYPES;
978978
}
979979
dispatch(updateFilter(change));
980-
dispatch(
981-
updateQuery({ ...stateProps.filter.challenge, ...change })
982-
);
980+
dispatch(updateQuery({ ...stateProps.filter.challenge, ...change }));
983981
},
984982
setSpecsTabState: (state) =>
985983
dispatch(pageActions.page.challengeDetails.setSpecsTabState(state)),

src/utils/challenge.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,47 @@ import { initialChallengeFilter } from "../reducers/filter";
88
Joi.optionalId = () => Joi.string().uuid();
99

1010
Joi.page = () =>
11-
Joi.alternatives()
12-
.try(
13-
Joi.number()
14-
.min(1),
15-
Joi.any().custom(() => 1)
16-
);
11+
Joi.alternatives().try(
12+
Joi.number().min(1),
13+
Joi.any().custom(() => 1)
14+
);
1715

1816
Joi.perPage = () =>
19-
Joi.alternatives()
20-
.try(
21-
Joi.number()
22-
.integer()
23-
.min(1)
24-
.max(100)
25-
.valid(...constants.PAGINATION_PER_PAGES),
26-
Joi.any().custom(() => constants.PAGINATION_PER_PAGES[0])
27-
);
17+
Joi.alternatives().try(
18+
Joi.number()
19+
.integer()
20+
.min(1)
21+
.max(100)
22+
.valid(...constants.PAGINATION_PER_PAGES),
23+
Joi.any().custom(() => constants.PAGINATION_PER_PAGES[0])
24+
);
2825

2926
Joi.bucket = () =>
30-
Joi.string().custom((param) =>
31-
constants.FILTER_BUCKETS.find(
32-
(bucket) => param && param.toLowerCase() === bucket.toLowerCase()
33-
) || null
27+
Joi.string().custom(
28+
(param) =>
29+
constants.FILTER_BUCKETS.find(
30+
(bucket) => param && param.toLowerCase() === bucket.toLowerCase()
31+
) || null
3432
);
3533

3634
Joi.track = () =>
37-
Joi.string().custom((param) =>
38-
_.findKey(
39-
constants.FILTER_CHALLENGE_TRACK_ABBREVIATIONS,
40-
(trackAbbreviation) =>
41-
param && param.toLowerCase() === trackAbbreviation.toLowerCase()
42-
) || null
35+
Joi.string().custom(
36+
(param) =>
37+
_.findKey(
38+
constants.FILTER_CHALLENGE_TRACK_ABBREVIATIONS,
39+
(trackAbbreviation) =>
40+
param && param.toLowerCase() === trackAbbreviation.toLowerCase()
41+
) || null
4342
);
4443

4544
Joi.type = () =>
46-
Joi.string().custom((param) =>
47-
_.findKey(
48-
constants.FILTER_CHALLENGE_TYPE_ABBREVIATIONS,
49-
(typeAbbreviation) =>
50-
param && param.toLowerCase() === typeAbbreviation.toLowerCase()
51-
) || null
45+
Joi.string().custom(
46+
(param) =>
47+
_.findKey(
48+
constants.FILTER_CHALLENGE_TYPE_ABBREVIATIONS,
49+
(typeAbbreviation) =>
50+
param && param.toLowerCase() === typeAbbreviation.toLowerCase()
51+
) || null
5252
);
5353

5454
export function getCurrencySymbol(prizeSets) {

src/utils/lifeCycle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import store from "../store";
22
import action from "../actions/initApp";
33
import * as utils from "../utils";
4-
import { CHALLENGES_URL } from '../constants';
4+
import { CHALLENGES_URL } from "../constants";
55

66
export default function appInit() {
77
let initialQuery;

0 commit comments

Comments
 (0)