Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions web/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@
"react/no-unknown-property": "error",
"react/jsx-no-useless-fragment": "error",
"react/no-unstable-nested-components": "error",
"react/prop-types": "warn", // 58 errors across 22 files
"react/no-unused-prop-types": "warn", // 9 errors across 9 files
"react/prop-types": "error",
"react/no-unused-prop-types": "error",
"default-param-last": "warn", // 42 errors across 34 files
"prefer-regex-literals": "error",
"no-promise-executor-return": "error"
Expand Down
1 change: 1 addition & 0 deletions web/js/components/animation-widget/gif-post-creation.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export default class GifResults extends Component {

GifResults.propTypes = {
boundaries: PropTypes.object,
closeBtn: PropTypes.object,
endDate: PropTypes.string,
gifObject: PropTypes.object,
increment: PropTypes.string,
Expand Down
1 change: 1 addition & 0 deletions web/js/components/date-selector/date-input-column.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ DateInputColumn.propTypes = {
date: PropTypes.object,
fontSize: PropTypes.number,
idSuffix: PropTypes.string,
isKioskModeActive: PropTypes.bool,
isValid: PropTypes.bool,
isStartDate: PropTypes.bool,
isEndDate: PropTypes.bool,
Expand Down
5 changes: 5 additions & 0 deletions web/js/components/layer/info/date-ranges.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from 'react';
import { ListGroup, ListGroupItem, Spinner } from 'reactstrap';
import PropTypes from 'prop-types';
import Scrollbar from '../../util/scrollbar';
import { coverageDateFormatter } from '../../../modules/date/util';

Expand Down Expand Up @@ -100,3 +101,7 @@ export default function DateRanges ({ layer }) {
</>
);
}

DateRanges.propTypes = {
layer: PropTypes.object,
};
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ CategoryGrid.propTypes = {
showMeasurements: PropTypes.func,
hasMeasurementSource: PropTypes.func,
measurementConfig: PropTypes.object,
width: PropTypes.number,
};

export default connect(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { useDispatch } from 'react-redux';
import { Button } from 'reactstrap';
import PropTypes from 'prop-types';
import BandSelectionMenu from './band-selection-menu';
import { toggleCustomContent } from '../../../../modules/modal/actions';

Expand Down Expand Up @@ -96,3 +97,7 @@ export default function BandSelectionParentInfoMenu({ layer }) {
</div>
);
}

BandSelectionParentInfoMenu.propTypes = {
layer: PropTypes.object,
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React, { useState } from 'react';
import {
Dropdown,
Expand Down Expand Up @@ -42,3 +43,11 @@ export default function BandsDropdown(props) {
</Dropdown>
);
}

BandsDropdown.propTypes = {
channel: PropTypes.string,
bandSelection: PropTypes.object,
setBandSelection: PropTypes.func,
layer: PropTypes.object,
setSelectedPreset: PropTypes.func,
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import {
Card, CardImg, CardBody, CardTitle, CardText,
} from 'reactstrap';
Expand Down Expand Up @@ -345,3 +346,10 @@ export default function PresetOptions(props) {
</div>
);
}

PresetOptions.propTypes = {
setBandSelection: PropTypes.func,
selectedPreset: PropTypes.object,
setSelectedPreset: PropTypes.func,
presetOptions: PropTypes.string,
};
5 changes: 5 additions & 0 deletions web/js/components/layer/settings/imagery-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useSelector, useDispatch } from 'react-redux';
import {
Spinner,
} from 'reactstrap';
import PropTypes from 'prop-types';
import { selectDate as selectDateAction } from '../../../modules/date/actions';

const dateOptions = {
Expand Down Expand Up @@ -170,3 +171,7 @@ export default function ImagerySearch({ layer }) {
</div>
);
}

ImagerySearch.propTypes = {
layer: PropTypes.object,
};
4 changes: 0 additions & 4 deletions web/js/components/layer/settings/layer-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ LayerSettings.defaultProps = {
};
LayerSettings.propTypes = {
clearCustomPalette: PropTypes.func,
clearStyle: PropTypes.func,
customPalettesIsActive: PropTypes.bool,
getCustomPalette: PropTypes.func,
getDefaultLegend: PropTypes.func,
Expand All @@ -452,19 +451,16 @@ LayerSettings.propTypes = {
globalTemperatureUnit: PropTypes.string,
groupName: PropTypes.string,
layer: PropTypes.object,
onCustomizeBandClick: PropTypes.func,
palettedAllowed: PropTypes.bool,
paletteOrder: PropTypes.array,
palettesTranslate: PropTypes.func,
resetGranuleLayerDates: PropTypes.func,
screenHeight: PropTypes.number,
setCustomPalette: PropTypes.func,
setOpacity: PropTypes.func,
setStyle: PropTypes.func,
setThresholdRange: PropTypes.func,
toggleClassification: PropTypes.func,
updateGranuleLayerOptions: PropTypes.func,
toggleAllClassifications: PropTypes.func,
vectorStyles: PropTypes.object,
zot: PropTypes.object,
};
6 changes: 4 additions & 2 deletions web/js/components/sidebar/charting-mode-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,6 @@ ChartingModeOptions.propTypes = {
activeLayer: PropTypes.string,
isChartingActive: PropTypes.bool,
isMobile: PropTypes.bool,
aoiSelected: PropTypes.bool,
chartRequestInProgress: PropTypes.bool,
aoiCoordinates: PropTypes.array,
timeSpanSelection: PropTypes.string,
Expand All @@ -1024,7 +1023,6 @@ ChartingModeOptions.propTypes = {
openChartingErrorModal: PropTypes.func,
olMap: PropTypes.object,
crs: PropTypes.string,
proj: PropTypes.object,
renderedPalettes: PropTypes.object,
projections: PropTypes.array,
aoiActive: PropTypes.bool,
Expand All @@ -1038,4 +1036,8 @@ ChartingModeOptions.propTypes = {
viewExtent: PropTypes.array,
maxExtent: PropTypes.array,
date: PropTypes.object,
screenHeight: PropTypes.number,
screenWidth: PropTypes.number,
onUpdateStartDate: PropTypes.func,
onUpdateEndDate: PropTypes.func,
};
2 changes: 2 additions & 0 deletions web/js/components/sidebar/paletteLegend.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ PaletteLegend.propTypes = {
paletteLegends: PropTypes.array,
palettes: PropTypes.object,
parentLayer: PropTypes.object,
showingVectorHand: PropTypes.bool,
showingChartingIcon: PropTypes.bool,
width: PropTypes.number,
toggleAllClassifications: PropTypes.func,
};
Expand Down
1 change: 1 addition & 0 deletions web/js/components/timeline/mobile-date-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ MobileDatePicker.propTypes = {
date: PropTypes.object,
endDateLimit: PropTypes.string,
hasSubdailyLayers: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
onDateChange: PropTypes.func,
startDateLimit: PropTypes.string,
};
Expand Down
1 change: 1 addition & 0 deletions web/js/components/timeline/timeline-axis/timeline-axis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1687,6 +1687,7 @@ TimelineAxis.propTypes = {
onDateChange: PropTypes.func,
parentOffset: PropTypes.number,
position: PropTypes.number,
proj: PropTypes.object,
showHover: PropTypes.func,
showHoverOff: PropTypes.func,
showHoverOn: PropTypes.func,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ DateChangeArrows.propTypes = {
arrowDown: PropTypes.string,
leftArrowDisabled: PropTypes.bool,
leftArrowDown: PropTypes.func,
isEmbedModeActive: PropTypes.bool,
isKioskModeActive: PropTypes.bool,
isMobile: PropTypes.bool,
nowButtonDisabled: PropTypes.bool,
Expand Down
1 change: 1 addition & 0 deletions web/js/components/util/custom-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ function CustomTooltip (props) {
}

CustomTooltip.propTypes = {
children: PropTypes.object,
id: PropTypes.string,
text: PropTypes.string,
hideTooltip: PropTypes.bool,
Expand Down
3 changes: 2 additions & 1 deletion web/js/containers/alerts.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ export default connect(
)(DismissableAlerts);

DismissableAlerts.propTypes = {
ddvZoomAlerts: PropTypes.array,
ddvLocationAlerts: PropTypes.array,
dismissVectorZoomAlert: PropTypes.func,
dismissVectorExceededAlert: PropTypes.func,
hasSubdailyLayers: PropTypes.bool,
Expand All @@ -265,5 +267,4 @@ DismissableAlerts.propTypes = {
isDDVLocationAlertPresent: PropTypes.bool,
openGranuleAlertModal: PropTypes.func,
openZoomAlertModal: PropTypes.func,
activeDDVLayer: PropTypes.object,
};
1 change: 1 addition & 0 deletions web/js/containers/animation-widget/animation-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ AnimationWidget.propTypes = {
isPortrait: PropTypes.bool,
isLandscape: PropTypes.bool,
looping: PropTypes.bool,
map: PropTypes.object,
maxDate: PropTypes.object,
minDate: PropTypes.object,
numberOfFrames: PropTypes.number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ CollapsedAnimationWidget.propTypes = {
collapsedWidgetPosition: PropTypes.object,
handleDragStart: PropTypes.func,
hasSubdailyLayers: PropTypes.bool,
isDistractionFreeModeActive: PropTypes.bool,
isLandscape: PropTypes.bool,
isMobile: PropTypes.bool,
isMobilePhone: PropTypes.bool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function KioskAnimationWidget(props) {
KioskAnimationWidget.propTypes = {
startDate: PropTypes.object,
endDate: PropTypes.object,
subDailyMode: PropTypes.bool,
hasSubdailyLayers: PropTypes.bool,
};

export default KioskAnimationWidget;
Expand Down
1 change: 1 addition & 0 deletions web/js/containers/notifications.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ export default connect(
Notifications.propTypes = {
object: PropTypes.object,
numberOutagesUnseen: PropTypes.number,
kioskModeEnabled: PropTypes.bool,
};
2 changes: 0 additions & 2 deletions web/js/containers/sidebar/add-layers-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,13 @@ export default connect(
)(AddLayersContent);

AddLayersContent.propTypes = {
compareState: PropTypes.string,
groupOverlays: PropTypes.bool,
isActive: PropTypes.bool,
isAnimating: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
isMobile: PropTypes.bool,
toggleOverlayGroups: PropTypes.func,
breakpoints: PropTypes.object,
isPlaying: PropTypes.bool,
screenWidth: PropTypes.number,
addLayers: PropTypes.func,
};
2 changes: 2 additions & 0 deletions web/js/containers/sidebar/charting.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,6 @@ ChartingLayerMenu.propTypes = {
isActive: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
updateActiveChartingLayer: PropTypes.func,
renderedPalettes: PropTypes.object,
activeChartingLayer: PropTypes.string,
};
4 changes: 0 additions & 4 deletions web/js/containers/sidebar/footer-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,5 @@ FooterContent.propTypes = {
openChartingInfoModal: PropTypes.func,
toggleCompare: PropTypes.func,
toggleCharting: PropTypes.func,
breakpoints: PropTypes.object,
isPlaying: PropTypes.bool,
screenWidth: PropTypes.number,
addLayers: PropTypes.func,
sidebarHeight: PropTypes.number,
};
3 changes: 3 additions & 0 deletions web/js/containers/sidebar/layer-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ function LayerList(props) {
}

LayerList.propTypes = {
activeChartingLayer: PropTypes.string,
activeLayers: PropTypes.array,
available: PropTypes.func,
collapsed: PropTypes.bool,
Expand All @@ -209,12 +210,14 @@ LayerList.propTypes = {
getNames: PropTypes.func,
groupId: PropTypes.string,
isAnimating: PropTypes.bool,
isChartingActive: PropTypes.bool,
isMobile: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
layers: PropTypes.array,
layerSplit: PropTypes.number,
numVisible: PropTypes.number,
projId: PropTypes.string,
removeGroup: PropTypes.func,
reorderLayers: PropTypes.func,
toggleCollapse: PropTypes.func,
toggleVisibility: PropTypes.func,
Expand Down
6 changes: 6 additions & 0 deletions web/js/containers/sidebar/layer-row.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,4 +865,10 @@ LayerRow.propTypes = {
isDDVLocationAlertPresent: PropTypes.bool,
isDDVZoomAlertPresent: PropTypes.bool,
openZoomAlertModal: PropTypes.func,
ddvLocationAlerts: PropTypes.array,
ddvZoomAlerts: PropTypes.array,
disableDDVLocationAlert: PropTypes.func,
disableDDVZoomAlert: PropTypes.func,
map: PropTypes.object,
selectedDate: PropTypes.instanceOf(Date),
};
2 changes: 2 additions & 0 deletions web/js/containers/sidebar/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ Sidebar.propTypes = {
chartingModeAccessible: PropTypes.bool,
collapseExpandToggle: PropTypes.func,
config: PropTypes.object,
displayStaticMap: PropTypes.bool,
eventsData: PropTypes.array,
eventsSources: PropTypes.array,
hasEventRequestError: PropTypes.bool,
Expand All @@ -555,6 +556,7 @@ Sidebar.propTypes = {
isDataDisabled: PropTypes.bool,
isDistractionFreeModeActive: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
isKioskModeActive: PropTypes.bool,
isLoadingEvents: PropTypes.bool,
isMobile: PropTypes.bool,
loadedCustomPalettes: PropTypes.func,
Expand Down
3 changes: 2 additions & 1 deletion web/js/containers/timeline/timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,7 @@ Timeline.propTypes = {
dateA: PropTypes.string,
dateB: PropTypes.string,
deltaChangeAmt: PropTypes.number,
displayStaticMap: PropTypes.bool,
draggerSelected: PropTypes.string,
hasFutureLayers: PropTypes.bool,
hasSubdailyLayers: PropTypes.bool,
Expand All @@ -1783,6 +1784,7 @@ Timeline.propTypes = {
isPortrait: PropTypes.bool,
isTourActive: PropTypes.bool,
leftArrowDisabled: PropTypes.bool,
newCustomDelta: PropTypes.number,
nowButtonDisabled: PropTypes.bool,
nowOverride: PropTypes.bool,
onPauseAnimation: PropTypes.func,
Expand All @@ -1802,7 +1804,6 @@ Timeline.propTypes = {
timeScale: PropTypes.string,
timeScaleChangeUnit: PropTypes.string,
toggleActiveCompareState: PropTypes.func,
toggleCustomModal: PropTypes.func,
triggerTodayButton: PropTypes.func,
updateAppNow: PropTypes.func,
proj: PropTypes.object,
Expand Down
3 changes: 2 additions & 1 deletion web/js/containers/tour.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,12 +643,13 @@ Tour.propTypes = {
currentStoryId: PropTypes.string,
endTour: PropTypes.func,
isActive: PropTypes.bool,
isEmbedModeActive: PropTypes.bool,
isKioskModeActive: PropTypes.bool,
processStepLink: PropTypes.func,
promiseImageryForTour: PropTypes.func,
preProcessStepLink: PropTypes.func,
renderedPalettes: PropTypes.object,
resetProductPicker: PropTypes.func,
screenHeight: PropTypes.number,
screenWidth: PropTypes.number,
startTour: PropTypes.func,
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React, { useState } from 'react';

import {
Expand Down Expand Up @@ -32,3 +33,9 @@ function TileImageTestModeDropdown({ activeLayers, layerSelection, setLayerSelec
}

export default TileImageTestModeDropdown;

TileImageTestModeDropdown.propTypes = {
activeLayers: PropTypes.array,
layerSelection: PropTypes.object,
setLayerSelection: PropTypes.func,
};
Loading
Loading