From 8443c2f75a62427da647f79fd8880ddd9c42ec8a Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Fri, 2 Sep 2016 21:04:25 -0700 Subject: [PATCH 1/2] chore(package): update eslint-plugin-react to version 6.2.0 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 91f773dbfc2..7260e6f9290 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "del": "^2.2.0", "eslint": "^3.1.0", "eslint-plugin-import": "^1.9.2", - "eslint-plugin-react": "^5.1.1", + "eslint-plugin-react": "^6.2.0", "gulp": "^3.9.0", "gulp-babel": "^6.1.1", "gulp-concat": "^2.6.0", From a3836bcd8a120dae28b83ff694e45ced2dc3a4f8 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Fri, 2 Sep 2016 22:09:21 -0700 Subject: [PATCH 2/2] Chore(lint): fix missing prop validations --- common/app/routes/challenges/components/Show.jsx | 1 + .../routes/challenges/components/classic/Classic.jsx | 1 + .../challenges/components/classic/Side-Panel.jsx | 6 ++++-- .../challenges/components/classic/Test-Suite.jsx | 2 +- .../challenges/components/classic/Tool-Panel.jsx | 11 ++++++----- .../routes/challenges/components/map/Challenge.jsx | 2 ++ common/app/routes/challenges/components/map/Map.jsx | 1 + .../routes/challenges/components/map/Super-Block.jsx | 2 +- .../challenges/components/project/Tool-Panel.jsx | 5 +++-- common/app/routes/challenges/components/step/Step.jsx | 8 ++++---- 10 files changed, 24 insertions(+), 15 deletions(-) diff --git a/common/app/routes/challenges/components/Show.jsx b/common/app/routes/challenges/components/Show.jsx index 38259ca51c8..06f73a9655f 100644 --- a/common/app/routes/challenges/components/Show.jsx +++ b/common/app/routes/challenges/components/Show.jsx @@ -62,6 +62,7 @@ export class Challenges extends PureComponent { static propTypes = { title: PropTypes.string, + viewType: PropTypes.string, isStep: PropTypes.bool, fetchChallenges: PropTypes.func.isRequired, replaceChallenge: PropTypes.func.isRequired, diff --git a/common/app/routes/challenges/components/classic/Classic.jsx b/common/app/routes/challenges/components/classic/Classic.jsx index cbfac6292cf..5d1617ea02c 100644 --- a/common/app/routes/challenges/components/classic/Classic.jsx +++ b/common/app/routes/challenges/components/classic/Classic.jsx @@ -51,6 +51,7 @@ export class Challenge extends PureComponent { showPreview: PropTypes.bool, content: PropTypes.string, mode: PropTypes.string, + file: PropTypes.object, updateFile: PropTypes.func, executeChallenge: PropTypes.func, loadCode: PropTypes.func diff --git a/common/app/routes/challenges/components/classic/Side-Panel.jsx b/common/app/routes/challenges/components/classic/Side-Panel.jsx index 3c45c6903b2..d777dacac4b 100644 --- a/common/app/routes/challenges/components/classic/Side-Panel.jsx +++ b/common/app/routes/challenges/components/classic/Side-Panel.jsx @@ -66,12 +66,14 @@ export class SidePanel extends PureComponent { tests: PropTypes.arrayOf(PropTypes.object), title: PropTypes.string, output: PropTypes.string, - hints: PropTypes.string, + hint: PropTypes.string, updateHint: PropTypes.func, makeToast: PropTypes.func, toggleHelpChat: PropTypes.func, openBugModal: PropTypes.func, - unlockUntrustedCode: PropTypes.func + unlockUntrustedCode: PropTypes.func, + isCodeLocked: PropTypes.bool, + executeChallenge: PropTypes.func }; renderDescription(description = [ 'Happy Coding!' ], descriptionRegex) { diff --git a/common/app/routes/challenges/components/classic/Test-Suite.jsx b/common/app/routes/challenges/components/classic/Test-Suite.jsx index 3059bdf0218..6a263d9755f 100644 --- a/common/app/routes/challenges/components/classic/Test-Suite.jsx +++ b/common/app/routes/challenges/components/classic/Test-Suite.jsx @@ -5,7 +5,7 @@ import { Col, Row } from 'react-bootstrap'; export default class extends PureComponent { static displayName = 'TestSuite'; - static proptTypes = { + static propTypes = { tests: PropTypes.arrayOf(PropTypes.object) }; diff --git a/common/app/routes/challenges/components/classic/Tool-Panel.jsx b/common/app/routes/challenges/components/classic/Tool-Panel.jsx index c501b2a2831..99769ea7fa2 100644 --- a/common/app/routes/challenges/components/classic/Tool-Panel.jsx +++ b/common/app/routes/challenges/components/classic/Tool-Panel.jsx @@ -18,13 +18,14 @@ export default class ToolPanel extends PureComponent { static displayName = 'ToolPanel'; static propTypes = { - executeChallenge: PropTypes.func, - updateHint: PropTypes.func, + executeChallenge: PropTypes.func.isRequired, + updateHint: PropTypes.func.isRequired, hint: PropTypes.string, isCodeLocked: PropTypes.bool, - toggleHelpChat: PropTypes.func, - openBugModal: PropTypes.func, - unlockUntrustedCode: PropTypes.func.isRequired + unlockUntrustedCode: PropTypes.func.isRequired, + toggleHelpChat: PropTypes.func.isRequired, + openBugModal: PropTypes.func.isRequired, + makeToast: PropTypes.func.isRequired }; makeHint() { diff --git a/common/app/routes/challenges/components/map/Challenge.jsx b/common/app/routes/challenges/components/map/Challenge.jsx index 05f3e88c90d..e9f2346e1cb 100644 --- a/common/app/routes/challenges/components/map/Challenge.jsx +++ b/common/app/routes/challenges/components/map/Challenge.jsx @@ -55,7 +55,9 @@ export class Challenge extends PureComponent { block: PropTypes.string, isLocked: PropTypes.bool, isRequired: PropTypes.bool, + isComingSoon: PropTypes.bool, isCompleted: PropTypes.bool, + isDev: PropTypes.bool, isHidden: PropTypes.bool, challenge: PropTypes.object, updateCurrentChallenge: PropTypes.func.isRequired, diff --git a/common/app/routes/challenges/components/map/Map.jsx b/common/app/routes/challenges/components/map/Map.jsx index 0123af5bc53..a0ff9d6d551 100644 --- a/common/app/routes/challenges/components/map/Map.jsx +++ b/common/app/routes/challenges/components/map/Map.jsx @@ -33,6 +33,7 @@ export class ShowMap extends PureComponent { superBlocks: PropTypes.array, height: PropTypes.number, updateTitle: PropTypes.func.isRequired, + params: PropTypes.object, fetchChallenges: PropTypes.func.isRequired }; diff --git a/common/app/routes/challenges/components/map/Super-Block.jsx b/common/app/routes/challenges/components/map/Super-Block.jsx index 1edc4a3ba4b..986c42534ff 100644 --- a/common/app/routes/challenges/components/map/Super-Block.jsx +++ b/common/app/routes/challenges/components/map/Super-Block.jsx @@ -49,7 +49,7 @@ export class SuperBlock extends PureComponent { isOpen: PropTypes.bool, isHidden: PropTypes.bool, message: PropTypes.string, - toggleThisPanl: PropTypes.func + toggleThisPanel: PropTypes.func }; handleSelect(eventKey, e) { diff --git a/common/app/routes/challenges/components/project/Tool-Panel.jsx b/common/app/routes/challenges/components/project/Tool-Panel.jsx index 1533ad6d4c9..db462070d99 100644 --- a/common/app/routes/challenges/components/project/Tool-Panel.jsx +++ b/common/app/routes/challenges/components/project/Tool-Panel.jsx @@ -44,8 +44,9 @@ export class ToolPanel extends PureComponent { isSimple: PropTypes.bool, isFrontEnd: PropTypes.bool, isSubmitting: PropTypes.bool, - toggleHelpChat: PropTypes.func, - openBugModal: PropTypes.func + toggleHelpChat: PropTypes.func.isRequired, + openBugModal: PropTypes.func.isRequired, + submitChallenge: PropTypes.func.isRequired }; renderSubmitButton(isSignedIn, submitChallenge) { diff --git a/common/app/routes/challenges/components/step/Step.jsx b/common/app/routes/challenges/components/step/Step.jsx index b2689fedb16..abf8420ac32 100644 --- a/common/app/routes/challenges/components/step/Step.jsx +++ b/common/app/routes/challenges/components/step/Step.jsx @@ -69,11 +69,11 @@ export class StepChallenge extends PureComponent { numOfSteps: PropTypes.number, stepForward: PropTypes.func, stepBackward: PropTypes.func, - completeAction: PropTypes.func, - submitChallenge: PropTypes.func, + completeAction: PropTypes.func.isRequired, + submitChallenge: PropTypes.func.isRequired, isLightBoxOpen: PropTypes.bool, - openlightBoxImage: PropTypes.func, - closeLightBoxImage: PropTypes.func + openLightBoxImage: PropTypes.func.isRequired, + closeLightBoxImage: PropTypes.func.isRequired }; handleLightBoxOpen(e) {