Skip to content

Commit 7b658c6

Browse files
authored
Merge pull request scratchfoundation#4786 from paulkaplan/update-eslint-react
Update eslint-plugin-react and fix newly discovered lint errors.
2 parents 0c68103 + ffeebb0 commit 7b658c6

File tree

8 files changed

+19
-4
lines changed

8 files changed

+19
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"eslint": "^5.0.1",
5757
"eslint-config-scratch": "^5.0.0",
5858
"eslint-plugin-import": "^2.8.0",
59-
"eslint-plugin-react": "7.11.1",
59+
"eslint-plugin-react": "^7.12.4",
6060
"file-loader": "2.0.0",
6161
"get-float-time-domain-data": "0.1.0",
6262
"get-user-media-promise": "1.1.4",

src/components/menu-bar/menu-bar.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ MenuBar.propTypes = {
715715
isShowingProject: PropTypes.bool,
716716
isUpdating: PropTypes.bool,
717717
languageMenuOpen: PropTypes.bool,
718+
locale: PropTypes.string.isRequired,
718719
loginMenuOpen: PropTypes.bool,
719720
onClickAccount: PropTypes.func,
720721
onClickEdit: PropTypes.func,
@@ -744,6 +745,7 @@ MenuBar.propTypes = {
744745
sessionExists: PropTypes.bool,
745746
shouldSaveBeforeTransition: PropTypes.func,
746747
showComingSoon: PropTypes.bool,
748+
userOwnsProject: PropTypes.bool,
747749
username: PropTypes.string,
748750
vm: PropTypes.instanceOf(VM).isRequired
749751
};

src/containers/stage.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ class Stage extends React.Component {
423423
Stage.propTypes = {
424424
isColorPicking: PropTypes.bool,
425425
isFullScreen: PropTypes.bool.isRequired,
426+
isStarted: PropTypes.bool,
426427
micIndicator: PropTypes.bool,
427428
onActivateColorPicker: PropTypes.func,
428429
onDeactivateColorPicker: PropTypes.func,

src/lib/app-state-hoc.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ const AppStateHOC = function (WrappedComponent, localesOnly) {
113113
}
114114
AppStateWrapper.propTypes = {
115115
isFullScreen: PropTypes.bool,
116-
isPlayerOnly: PropTypes.bool
116+
isPlayerOnly: PropTypes.bool,
117+
showTelemetryModal: PropTypes.bool
117118
};
118119
return AppStateWrapper;
119120
};

src/lib/project-fetcher-hoc.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ const ProjectFetcherHOC = function (WrappedComponent) {
115115
assetHost: PropTypes.string,
116116
canSave: PropTypes.bool,
117117
intl: intlShape.isRequired,
118+
isCreatingNew: PropTypes.bool,
118119
isFetchingWithId: PropTypes.bool,
119120
isLoadingProject: PropTypes.bool,
121+
isShowingProject: PropTypes.bool,
120122
loadingState: PropTypes.oneOf(LoadingStates),
121123
onActivateTab: PropTypes.func,
122124
onError: PropTypes.func,

src/lib/project-saver-hoc.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
343343
}
344344

345345
ProjectSaverComponent.propTypes = {
346+
autoSaveIntervalSecs: PropTypes.number.isRequired,
346347
autoSaveTimeoutId: PropTypes.number,
347348
canCreateNew: PropTypes.bool,
348349
canSave: PropTypes.bool,
@@ -358,12 +359,16 @@ const ProjectSaverHOC = function (WrappedComponent) {
358359
isShowingWithoutId: PropTypes.bool,
359360
isUpdating: PropTypes.bool,
360361
loadingState: PropTypes.oneOf(LoadingStates),
362+
locale: PropTypes.string.isRequired,
361363
onAutoUpdateProject: PropTypes.func,
362364
onCreateProject: PropTypes.func,
363365
onCreatedProject: PropTypes.func,
364366
onProjectError: PropTypes.func,
365367
onProjectTelemetryEvent: PropTypes.func,
366368
onRemixing: PropTypes.func,
369+
onSetProjectSaver: PropTypes.func.isRequired,
370+
onSetProjectThumbnailer: PropTypes.func.isRequired,
371+
onSetProjectUnchanged: PropTypes.func.isRequired,
367372
onShowAlert: PropTypes.func,
368373
onShowCopySuccessAlert: PropTypes.func,
369374
onShowCreatingCopyAlert: PropTypes.func,
@@ -377,6 +382,7 @@ const ProjectSaverHOC = function (WrappedComponent) {
377382
projectChanged: PropTypes.bool,
378383
reduxProjectId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
379384
reduxProjectTitle: PropTypes.string,
385+
setAutoSaveTimeoutId: PropTypes.func.isRequired,
380386
vm: PropTypes.instanceOf(VM).isRequired
381387
};
382388
ProjectSaverComponent.defaultProps = {

src/lib/vm-listener-hoc.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ const vmListenerHOC = function (WrappedComponent) {
6060
this.props.vm.postIOData('userData', {username: this.props.username});
6161
}
6262

63-
// Re-request a targets update when the shouldEmitTargetsUpdate state changes to true
63+
// Re-request a targets update when the shouldEmitUpdate state changes to true
6464
// i.e. when the editor transitions out of fullscreen/player only modes
65-
if (this.props.shouldEmitTargetsUpdate && !prevProps.shouldEmitTargetsUpdate) {
65+
if (this.props.shouldEmitUpdates && !prevProps.shouldEmitUpdates) {
6666
this.props.vm.emitTargetsUpdate(false /* Emit the event, but do not trigger project change */);
6767
}
6868
}
@@ -148,8 +148,10 @@ const vmListenerHOC = function (WrappedComponent) {
148148
onKeyUp: PropTypes.func,
149149
onMicListeningUpdate: PropTypes.func.isRequired,
150150
onMonitorsUpdate: PropTypes.func.isRequired,
151+
onProjectChanged: PropTypes.func.isRequired,
151152
onProjectRunStart: PropTypes.func.isRequired,
152153
onProjectRunStop: PropTypes.func.isRequired,
154+
onProjectSaved: PropTypes.func.isRequired,
153155
onRuntimeStarted: PropTypes.func.isRequired,
154156
onShowExtensionAlert: PropTypes.func.isRequired,
155157
onTargetsUpdate: PropTypes.func.isRequired,

src/lib/vm-manager-hoc.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ const vmManagerHOC = function (WrappedComponent) {
107107
fontsLoaded: PropTypes.bool,
108108
isLoadingWithId: PropTypes.bool,
109109
isPlayerOnly: PropTypes.bool,
110+
isStarted: PropTypes.bool,
110111
loadingState: PropTypes.oneOf(LoadingStates),
111112
locale: PropTypes.string,
112113
messages: PropTypes.objectOf(PropTypes.string),

0 commit comments

Comments
 (0)