Skip to content

Commit e29a125

Browse files
committed
Build fixes
1 parent 6231534 commit e29a125

File tree

13 files changed

+32
-8
lines changed

13 files changed

+32
-8
lines changed

.eslintrc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
"jsx-a11y/anchor-is-valid": false,
55
"import/no-cycle": [2, { "maxDepth": 1 }],
66
"react/forbid-prop-types": false,
7-
"react/no-unknown-property": false
7+
"react/no-unknown-property": false,
8+
"react/jsx-no-bind": false,
9+
"react/destructuring-assignment": false,
10+
"react/no-array-index-key": false
811
},
912
"env": {
1013
"browser": true
11-
}
14+
}
1215
}

__tests__/shared/components/tc-communities/ArticleCard.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ test('render properly', () => {
4646
TU.renderIntoDocument((
4747
<Wrapper
4848
title="How Does An IOS 10 LCD Work"
49-
text={'<p>There are advances being made in science and technology everyday</p>'}
49+
text="<p>There are advances being made in science and technology everyday</p>"
5050
imageSrc="/themes/wipro/home/news-01.jpg"
5151
link={{
5252
title: 'Read More',
@@ -67,7 +67,7 @@ test('render properly', () => {
6767
TU.renderIntoDocument((
6868
<Wrapper
6969
title="How Does An IOS 10 LCD Work"
70-
text={'<p>There are advances being made in science and technology everyday</p>'}
70+
text="<p>There are advances being made in science and technology everyday</p>"
7171
imageSrc="/themes/wipro/home/news-01.jpg"
7272
link={{
7373
title: 'Read More',

config/jest/setup.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,15 @@ global.window.resizeTo = (width, height) => {
2626
global.window.innerHeight = height || global.window.innerHeight;
2727
global.window.dispatchEvent(new Event('resize'));
2828
};
29+
/* eslint-disable lines-between-class-members */
30+
/* eslint-disable no-empty-function */
31+
/* eslint-disable no-unused-vars */
32+
/* eslint-disable class-methods-use-this */
33+
/* eslint-disable no-useless-constructor */
34+
global.MutationObserver = class {
35+
constructor(callback) {}
36+
disconnect() {}
37+
observe(element, initObject) {}
38+
};
2939

3040
jest.mock('services/money');

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
"eslint-plugin-import": "^2.13.0",
209209
"eslint-plugin-jest": "^21.17.0",
210210
"eslint-plugin-jsx-a11y": "^6.0.3",
211-
"eslint-plugin-react": "^7.10.0",
211+
"eslint-plugin-react": "^7.32.2",
212212
"file-loader": "^1.1.11",
213213
"happypack": "^5.0.1",
214214
"husky": "^4.2.1",

src/client/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from '@topcoder-platform/tc-auth-lib';
1515
import { actions, logger, errors } from 'topcoder-react-lib';
1616
import { client, redux, config } from 'topcoder-react-utils';
17+
// eslint-disable-next-line import/no-unresolved
1718
import { sprig } from '@sprig-technologies/sprig-browser';
1819

1920
import './styles.scss';

src/shared/components/Contentful/ContentSlider/ContentSliderItem.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ function ContentSliderItem(props) {
4141
);
4242
}
4343

44+
ContentSliderItem.defaultProps = {
45+
spaceName: '',
46+
environment: '',
47+
};
48+
4449
ContentSliderItem.propTypes = {
4550
itemId: PT.string.isRequired,
4651
type: PT.string.isRequired,

src/shared/components/Contentful/SearchBar/SearchBar.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ export class SearchBarInner extends Component {
203203
className={theme.articleLink}
204204
href={(item.externalArticle && item.contentUrl) ? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.slug || item.title}`}
205205
target={(item.externalArticle && item.contentUrl) ? '_blank' : '_self'}
206+
rel="noreferrer"
206207
onClick={(e) => {
207208
e.nativeEvent.stopImmediatePropagation();
208209
e.stopPropagation();
@@ -254,6 +255,7 @@ export class SearchBarInner extends Component {
254255
className={theme.articleLink}
255256
href={(item.externalArticle && item.contentUrl) ? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.slug || item.title}`}
256257
target={(item.externalArticle && item.contentUrl) ? '_blank' : '_self'}
258+
rel="noreferrer"
257259
onClick={(e) => {
258260
e.nativeEvent.stopImmediatePropagation();
259261
e.stopPropagation();
@@ -300,6 +302,7 @@ export class SearchBarInner extends Component {
300302
className={theme.forumLink}
301303
href={(item.externalArticle && item.contentUrl) ? item.contentUrl : `${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/${item.slug || item.title}`}
302304
target={(item.externalArticle && item.contentUrl) ? '_blank' : '_self'}
305+
rel="noreferrer"
303306
>
304307
<span className={theme['cell-text']}>
305308
{item.title}

src/shared/components/Leaderboard/PodiumSpot/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable react/prop-types */
12
/**
23
* Leaderboard PodiumSpot
34
*

src/shared/components/SubmissionPage/Submit/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ const filestackDataProp = PT.shape({
339339
container: PT.string.isRequired,
340340
challengeId: PT.string.isRequired,
341341
fileUrl: PT.string.isRequired,
342+
fileType: PT.string,
342343
});
343344

344345
/**

src/shared/components/challenge-listing/ChallengeCard/Status/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ export default function ChallengeStatus(props) {
155155
onClick={() => false}
156156
styleName="register-button"
157157
target={openChallengesInNewTabs ? '_blank' : undefined}
158+
rel="noreferrer"
158159
>
159160
{ timeDiff.late
160161
? (

src/shared/components/challenge-listing/Tooltips/ProgressBarTooltip/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ Tip.defaultProps = {
175175
};
176176

177177
Tip.propTypes = {
178-
challenge: PT.shape({}).isRequired,
178+
challenge: PT.object.isRequired,
179179
isLoaded: PT.bool,
180180
};
181181

src/shared/containers/SubmissionPage.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { connect } from 'react-redux';
1919
import SubmissionsPage from 'components/SubmissionPage';
2020
import AccessDenied, { CAUSE as ACCESS_DENIED_REASON } from 'components/tc-communities/AccessDenied';
2121
import LoadingIndicator from 'components/LoadingIndicator';
22+
// eslint-disable-next-line import/no-unresolved
2223
import { sprig } from '@sprig-technologies/sprig-browser';
2324

2425
export const Sprig = sprig.configure({

src/shared/routes/Communities/ChallengeListing.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@ export default function ChallengeListingRoute({
4747
extraBucket={extraBucket}
4848
groupIds={meta.groupIds}
4949
hideSrm={hideSrm}
50-
5150
/* TODO: This is hacky! A better, generic way to achieve it
5251
* should be adopted. */
5352
hideTcLinksInSidebarFooter={meta.communityId === 'wipro'}
54-
5553
listingOnly={listingOnly}
5654
newChallengeDetails={newChallengeDetails}
5755
openChallengesInNewTabs={

0 commit comments

Comments
 (0)