Interactive interface for browsing global, full-resolution satellite imagery
Replace proptype warn w error #2576
Benjamin King634b2b234a95
diff --git a/.eslintrc b/.eslintrcindex 4a2d288e6..e0e2ba2bf 100644--- a/.eslintrc+++ b/.eslintrc@@ -101,7 +101,7 @@"always"],"react/no-danger": "warn",- "react/prop-types": "warn",+ "react/prop-types": "error","react/no-did-update-set-state": "warn","react/no-render-return-value": "warn","react/sort-prop-types": [diff --git a/web/js/app.js b/web/js/app.jsindex 60ee40e55..a85d08a9a 100644--- a/web/js/app.js+++ b/web/js/app.js@@ -206,6 +206,7 @@ App.propTypes = {keyPressAction: PropTypes.func,locationKey: PropTypes.string,mapMouseEvents: PropTypes.object,+ modalId: PropTypes.string,parameters: PropTypes.object,state: PropTypes.object};diff --git a/web/js/components/layer/info/info.js b/web/js/components/layer/info/info.jsindex 38a493424..8c617e872 100644--- a/web/js/components/layer/info/info.js+++ b/web/js/components/layer/info/info.js@@ -127,5 +127,6 @@ class LayerInfo extends React.Component {export default LayerInfo;LayerInfo.propTypes = {- layer: PropTypes.object+ layer: PropTypes.object,+ screenHeight: PropTypes.number};diff --git a/web/js/components/layer/product-picker/measurement-row.js b/web/js/components/layer/product-picker/measurement-row.jsindex 940c8406d..9db771af5 100644--- a/web/js/components/layer/product-picker/measurement-row.js+++ b/web/js/components/layer/product-picker/measurement-row.js@@ -347,9 +347,13 @@ LayerRow.propTypes = {activeLayers: PropTypes.array,addLayer: PropTypes.func,category: PropTypes.object,+ checked: PropTypes.bool,getSourceMetadata: PropTypes.func,hasMeasurementSetting: PropTypes.func,id: PropTypes.string,+ isDateRangesExpanded: PropTypes.bool,+ isEnabled: PropTypes.bool,+ isMetadataExpanded: PropTypes.bool,isSelected: PropTypes.bool,layerConfig: PropTypes.object,measurement: PropTypes.object,diff --git a/web/js/components/layer/settings/classification-toggle.js b/web/js/components/layer/settings/classification-toggle.jsindex c0af1cced..6f3bd5947 100644--- a/web/js/components/layer/settings/classification-toggle.js+++ b/web/js/components/layer/settings/classification-toggle.js@@ -42,9 +42,14 @@ ClassificationToggle.defaultProps = {start: 100};ClassificationToggle.propTypes = {+ active: PropTypes.bool,+ height: PropTypes.number,layer: PropTypes.object,+ legend: PropTypes.object,+ palette: PropTypes.object,setOpacity: PropTypes.func,- start: PropTypes.number+ start: PropTypes.number,+ toggle: PropTypes.func};export default ClassificationToggle;diff --git a/web/js/components/layer/settings/palette-threshold.js b/web/js/components/layer/settings/palette-threshold.jsindex ec9659a7a..5c5bb9dfc 100644--- a/web/js/components/layer/settings/palette-threshold.js+++ b/web/js/components/layer/settings/palette-threshold.js@@ -136,6 +136,7 @@ ThresholdSelect.propTypes = {legend: PropTypes.object,max: PropTypes.number,min: PropTypes.number,+ palette: PropTypes.object,setRange: PropTypes.func,squashed: PropTypes.bool,start: PropTypes.numberdiff --git a/web/js/components/layer/settings/settings.js b/web/js/components/layer/settings/settings.jsindex ad6039d92..733bcf7fb 100644--- a/web/js/components/layer/settings/settings.js+++ b/web/js/components/layer/settings/settings.js@@ -392,5 +392,6 @@ LayerSettings.propTypes = {setStyle: PropTypes.func,setThresholdRange: PropTypes.func,title: PropTypes.string,+ toggleClassification: PropTypes.func,vectorStyles: PropTypes.object};diff --git a/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js b/web/js/components/timeline/timeline-axis/grid-range/tile-rect.jsindex 0cf7e2418..6628257a9 100644--- a/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js+++ b/web/js/components/timeline/timeline-axis/grid-range/tile-rect.js@@ -12,9 +12,9 @@ const tileRectTimeScaleOptions = {lineLengthY: (item) => {const timeScaleUnit = item.dateObject.minutes;const lineLengthY = timeScaleUnit === 0 ||- timeScaleUnit === 15 ||- timeScaleUnit === 30 ||- timeScaleUnit === 45 ? 62 : timeScaleUnit % 5 === 0 ? 20 : 10;+ timeScaleUnit === 15 ||+ timeScaleUnit === 30 ||+ timeScaleUnit === 45 ? 62 : timeScaleUnit % 5 === 0 ? 20 : 10;return lineLengthY;}};@@ -116,6 +116,7 @@ TileRect.propTypes = {gridWidth: PropTypes.number,index: PropTypes.number,item: PropTypes.object,+ showHover: PropTypes.func,timeScale: PropTypes.string};diff --git a/web/js/components/timeline/timeline-controls/animation-button.js b/web/js/components/timeline/timeline-controls/animation-button.jsindex 12e5a37d5..acd4fd71c 100644--- a/web/js/components/timeline/timeline-controls/animation-button.js+++ b/web/js/components/timeline/timeline-controls/animation-button.js@@ -21,7 +21,8 @@ class AnimationButton extends PureComponent {AnimationButton.propTypes = {clickAnimationButton: PropTypes.func,- disabled: PropTypes.bool+ disabled: PropTypes.bool,+ title: PropTypes.string};export default AnimationButton;diff --git a/web/js/components/tour/modal-tour-start.js b/web/js/components/tour/modal-tour-start.jsindex d4365f4d7..afbd9192f 100644--- a/web/js/components/tour/modal-tour-start.js+++ b/web/js/components/tour/modal-tour-start.js@@ -123,7 +123,8 @@ ModalStart.propTypes = {stories: PropTypes.object.isRequired,storyOrder: PropTypes.array.isRequired,toggleModalStart: PropTypes.func.isRequired,- className: PropTypes.string+ className: PropTypes.string,+ height: PropTypes.number};export default ModalStart;diff --git a/web/js/components/util/switch.js b/web/js/components/util/switch.jsindex 6d0d7e6a0..058d1a312 100644--- a/web/js/components/util/switch.js+++ b/web/js/components/util/switch.js@@ -1,4 +1,6 @@import React, { useState } from 'react';+import PropTypes from 'prop-types';+// https://upmostly.com/tutorials/build-a-react-switch-toggle-componentconst Switch = (props) => {const { color, id, active, toggle, label } = props;@@ -32,5 +34,11 @@ const Switch = (props) => {</div>);};-+Switch.propTypes = {+ active: PropTypes.bool,+ color: PropTypes.string,+ id: PropTypes.string,+ label: PropTypes.string,+ toggle: PropTypes.func+};export default Switch;diff --git a/web/js/components/vector-metadata/tooltip.js b/web/js/components/vector-metadata/tooltip.jsindex c7c1f61c8..c603a654b 100644--- a/web/js/components/vector-metadata/tooltip.js+++ b/web/js/components/vector-metadata/tooltip.js@@ -55,6 +55,7 @@ export default class VectorMetaTooltip extends React.Component {}VectorMetaTooltip.propTypes = {+ id: PropTypes.string.isRequired,index: PropTypes.number.isRequired,description: PropTypes.string};diff --git a/web/js/modules/palettes/util.js b/web/js/modules/palettes/util.jsindex f45b4b51f..a114eb048 100644--- a/web/js/modules/palettes/util.js+++ b/web/js/modules/palettes/util.js@@ -351,7 +351,6 @@ export function loadPalettes(permlinkState, state) {var max = [];var squash = [];var count = 0;- console.log(layerDef);if (layerDef.custom) {lodashEach(layerDef.custom, function(value, index) {try {