Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

remove individual jquery imports, add jquery to eslint env

Ed Platoe9fb736e4645
diff --git a/.eslintrc b/.eslintrc
index 73d56eaaf..46c1e33c5 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -2,7 +2,8 @@
"env": {
"browser": true,
"node": true,
- "jest/globals": true
+ "jest/globals": true,
+ "jquery": true
},
"parserOptions": {
"ecmaVersion": 2017,
diff --git a/web/js/animation/gif.js b/web/js/animation/gif.js
index 3262e0f82..89d2779fb 100644
--- a/web/js/animation/gif.js
+++ b/web/js/animation/gif.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-jcrop';
import React from 'react';
import ReactDOM from 'react-dom';
diff --git a/web/js/animation/range-select.js b/web/js/animation/range-select.js
index 770d30a74..82d22826e 100644
--- a/web/js/animation/range-select.js
+++ b/web/js/animation/range-select.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import React from 'react';
import ReactDOM from 'react-dom';
import RangeSelector from '../components/range-selection/range-selection';
diff --git a/web/js/animation/widget.js b/web/js/animation/widget.js
index 6d439bf1b..f3751257e 100644
--- a/web/js/animation/widget.js
+++ b/web/js/animation/widget.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import AnimationWidget from '../components/animation-widget/animation-widget';
import googleAnalytics from '../components/util/google-analytics';
import React from 'react';
diff --git a/web/js/data/cmr.js b/web/js/data/cmr.js
index e7545a1d0..87456e805 100644
--- a/web/js/data/cmr.js
+++ b/web/js/data/cmr.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import util from '../util/util';
import OlGeomPolygon from 'ol/geom/Polygon';
diff --git a/web/js/data/handler.js b/web/js/data/handler.js
index 2d32801f3..e75ef8c1c 100644
--- a/web/js/data/handler.js
+++ b/web/js/data/handler.js
@@ -1,5 +1,3 @@
-import $ from 'jquery';
-
import { dataCmrMockClient, dataCmrClient } from './cmr';
import util from '../util/util';
diff --git a/web/js/data/map.js b/web/js/data/map.js
index 07f2dc737..8f87fed5a 100644
--- a/web/js/data/map.js
+++ b/web/js/data/map.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashEach from 'lodash/each';
import OlStyleStyle from 'ol/style/Style';
import OlStyleIcon from 'ol/style/Icon';
diff --git a/web/js/data/model.js b/web/js/data/model.js
index ecdb300d3..f389d6a1d 100644
--- a/web/js/data/model.js
+++ b/web/js/data/model.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashEach from 'lodash/each';
import lodashFind from 'lodash/find';
import util from '../util/util';
diff --git a/web/js/data/results.js b/web/js/data/results.js
index 03b49201b..baff4d9e1 100644
--- a/web/js/data/results.js
+++ b/web/js/data/results.js
@@ -1,5 +1,3 @@
-import $ from 'jquery';
-
import OlGeomMultiPolygon from 'ol/geom/MultiPolygon';
import OlGeomMultiPoint from 'ol/geom/MultiPoint';
import OlFormatGeoJSON from 'ol/format/GeoJSON';
diff --git a/web/js/data/ui.js b/web/js/data/ui.js
index 714f59e02..45b42238e 100644
--- a/web/js/data/ui.js
+++ b/web/js/data/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashSize from 'lodash/size';
import lodashEach from 'lodash/each';
import googleAnalytics from '../components/util/google-analytics';
diff --git a/web/js/date/compare-picks.js b/web/js/date/compare-picks.js
index 90108db05..02d78e919 100644
--- a/web/js/date/compare-picks.js
+++ b/web/js/date/compare-picks.js
@@ -2,7 +2,6 @@ import React from 'react';
import ReactDOM from 'react-dom';
import TimelineDragger from '../components/compare/pick';
import { getMaxTimelineWidth } from './util';
-import $ from 'jquery';
import util from '../util/util';
const PICK_PATH =
diff --git a/web/js/date/config.js b/web/js/date/config.js
index ad50e08f5..37ea6b773 100644
--- a/web/js/date/config.js
+++ b/web/js/date/config.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import d3 from 'd3';
import util from '../util/util';
import moment from 'moment';
diff --git a/web/js/date/label.js b/web/js/date/label.js
index e4138f083..299d33a9c 100644
--- a/web/js/date/label.js
+++ b/web/js/date/label.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import util from '../util/util';
/**
diff --git a/web/js/date/timeline-data.js b/web/js/date/timeline-data.js
index 1828beeb1..e973a0cc3 100644
--- a/web/js/date/timeline-data.js
+++ b/web/js/date/timeline-data.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import d3 from 'd3';
export function timelineData(models, config, ui) {
diff --git a/web/js/date/timeline-input.js b/web/js/date/timeline-input.js
index 381a18659..87b9b25bc 100644
--- a/web/js/date/timeline-input.js
+++ b/web/js/date/timeline-input.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import util from '../util/util';
import DateSelector from '../components/date-selector/date-selector';
import React from 'react';
diff --git a/web/js/date/timeline-pick.js b/web/js/date/timeline-pick.js
index 14e781ddf..6e4c26d7e 100644
--- a/web/js/date/timeline-pick.js
+++ b/web/js/date/timeline-pick.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import d3 from 'd3';
/**
diff --git a/web/js/date/timeline-ticks.js b/web/js/date/timeline-ticks.js
index 5d4846888..4dc0fda17 100644
--- a/web/js/date/timeline-ticks.js
+++ b/web/js/date/timeline-ticks.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import d3 from 'd3';
import util from '../util/util';
/**
diff --git a/web/js/date/timeline-zoom.js b/web/js/date/timeline-zoom.js
index 7c6c0453e..71f94dc4e 100644
--- a/web/js/date/timeline-zoom.js
+++ b/web/js/date/timeline-zoom.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import uiMouse from '../ui/mouse';
import d3 from 'd3';
/**
diff --git a/web/js/date/timeline.js b/web/js/date/timeline.js
index 4f5b5686e..fa6ccbe3e 100644
--- a/web/js/date/timeline.js
+++ b/web/js/date/timeline.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import util from '../util/util';
import d3 from 'd3';
diff --git a/web/js/date/util.js b/web/js/date/util.js
index e6f5cbc36..52a4347d3 100644
--- a/web/js/date/util.js
+++ b/web/js/date/util.js
@@ -1,5 +1,4 @@
import d3 from 'd3';
-import $ from 'jquery';
export function timelineDataHightlight(layerId, isActivate) {
if (isActivate) {
diff --git a/web/js/date/wheels.js b/web/js/date/wheels.js
index 2bae0c972..ed75bcbaa 100644
--- a/web/js/date/wheels.js
+++ b/web/js/date/wheels.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'mobiscroll';
import util from '../util/util';
diff --git a/web/js/debug.js b/web/js/debug.js
index 17bb83322..31be23a0e 100644
--- a/web/js/debug.js
+++ b/web/js/debug.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashEach from 'lodash/each';
import lodashIsNaN from 'lodash/isNaN';
import lodashParseInt from 'lodash/parseInt';
diff --git a/web/js/image/panel.js b/web/js/image/panel.js
index c586743cc..b0b31fe63 100644
--- a/web/js/image/panel.js
+++ b/web/js/image/panel.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import * as olProj from 'ol/proj';
import ImageResSelection from '../components/image-panel/select';
diff --git a/web/js/image/rubberband.js b/web/js/image/rubberband.js
index f892115f1..f0690a3b9 100644
--- a/web/js/image/rubberband.js
+++ b/web/js/image/rubberband.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import 'jquery-jcrop';
import lodashFind from 'lodash/find';
diff --git a/web/js/layers/info.js b/web/js/layers/info.js
index 5b9812848..e2b950783 100644
--- a/web/js/layers/info.js
+++ b/web/js/layers/info.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import 'perfect-scrollbar/jquery';
import lodashForEachRight from 'lodash/forEachRight';
diff --git a/web/js/layers/modal.js b/web/js/layers/modal.js
index 0b86cd08d..419488839 100644
--- a/web/js/layers/modal.js
+++ b/web/js/layers/modal.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import 'icheck';
import jQueryBridget from 'jquery-bridget';
diff --git a/web/js/layers/options.js b/web/js/layers/options.js
index cb8ee3e03..c78215683 100644
--- a/web/js/layers/options.js
+++ b/web/js/layers/options.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import 'icheck';
import 'nouislider/distribute/jquery.nouislider';
diff --git a/web/js/link/model.js b/web/js/link/model.js
index 68285b6ea..077c5f29e 100644
--- a/web/js/link/model.js
+++ b/web/js/link/model.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashEach from 'lodash/each';
import lodashMap from 'lodash/map';
import lodashIsArray from 'lodash/isArray';
diff --git a/web/js/link/ui.js b/web/js/link/ui.js
index 9fa3e2d39..58f036f5d 100644
--- a/web/js/link/ui.js
+++ b/web/js/link/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import 'icheck';
import lodashThrottle from 'lodash/throttle';
diff --git a/web/js/map/compare/swipe.js b/web/js/map/compare/swipe.js
index b691af31e..35ca8ea8e 100644
--- a/web/js/map/compare/swipe.js
+++ b/web/js/map/compare/swipe.js
@@ -1,7 +1,6 @@
import lodashEach from 'lodash/each';
import lodashRound from 'lodash/round';
import util from '../../util/util';
-import $ from 'jquery';
var swipeOffset = null;
var line = null;
diff --git a/web/js/map/rotation.js b/web/js/map/rotation.js
index a6c596f1f..b15397445 100644
--- a/web/js/map/rotation.js
+++ b/web/js/map/rotation.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import util from '../util/util';
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index c5e48ac96..b46608260 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import lodashFindIndex from 'lodash/findIndex';
import lodashEach from 'lodash/each';
diff --git a/web/js/natural-events/request.js b/web/js/natural-events/request.js
index 7dd48b7fe..8f385ded4 100644
--- a/web/js/natural-events/request.js
+++ b/web/js/natural-events/request.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashOrderBy from 'lodash/orderBy';
import lodashUniqBy from 'lodash/uniqBy';
diff --git a/web/js/notifications/ui.js b/web/js/notifications/ui.js
index ecfdd53b6..15b7e57ba 100644
--- a/web/js/notifications/ui.js
+++ b/web/js/notifications/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import util from '../util/util';
import lodashIsEmpty from 'lodash/isEmpty';
import wvui from '../ui/ui';
diff --git a/web/js/palettes/palettes.js b/web/js/palettes/palettes.js
index aa442e8e2..11b39bc24 100644
--- a/web/js/palettes/palettes.js
+++ b/web/js/palettes/palettes.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashEach from 'lodash/each';
import lodashFind from 'lodash/find';
import util from '../util/util';
diff --git a/web/js/polyfill.js b/web/js/polyfill.js
index bca6fdd38..d316138d5 100644
--- a/web/js/polyfill.js
+++ b/web/js/polyfill.js
@@ -7,7 +7,6 @@
/* eslint-disable no-extend-native */
-import $ from 'jquery';
import util from './util/util';
export function polyfill () {
diff --git a/web/js/projection/ui.js b/web/js/projection/ui.js
index 36f8172f5..f60b17dc8 100644
--- a/web/js/projection/ui.js
+++ b/web/js/projection/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import lodashEach from 'lodash/each';
import wvui from '../ui/ui';
diff --git a/web/js/sidebar/ui.js b/web/js/sidebar/ui.js
index 8c407f078..12e399951 100644
--- a/web/js/sidebar/ui.js
+++ b/web/js/sidebar/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import lodashFind from 'lodash/find';
import lodashDebounce from 'lodash/debounce';
diff --git a/web/js/tour.js b/web/js/tour.js
index 45440e372..d26410aa6 100644
--- a/web/js/tour.js
+++ b/web/js/tour.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import 'jquery.joyride';
import util from './util/util';
diff --git a/web/js/ui/indicator.js b/web/js/ui/indicator.js
index d1b86b951..b9768666c 100644
--- a/web/js/ui/indicator.js
+++ b/web/js/ui/indicator.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashUniqueId from 'lodash/uniqueId';
import lodashIsString from 'lodash/isString';
import lodashEach from 'lodash/each';
diff --git a/web/js/ui/info.js b/web/js/ui/info.js
index e3342961b..433d6d085 100644
--- a/web/js/ui/info.js
+++ b/web/js/ui/info.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import wvui from './ui';
import util from '../util/util';
diff --git a/web/js/ui/ui.js b/web/js/ui/ui.js
index f75b8ae8c..a2da22631 100644
--- a/web/js/ui/ui.js
+++ b/web/js/ui/ui.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import 'jquery-ui-bundle/jquery-ui';
import loadingIndicator from './indicator';
import uiInfo from './info';
diff --git a/web/js/util/browser.js b/web/js/util/browser.js
index 3b6a8917e..0130417e0 100644
--- a/web/js/util/browser.js
+++ b/web/js/util/browser.js
@@ -1,5 +1,3 @@
-import $ from 'jquery';
-
export default (function() {
var self = {};
diff --git a/web/js/util/load.js b/web/js/util/load.js
index 7cd830357..130fe0740 100644
--- a/web/js/util/load.js
+++ b/web/js/util/load.js
@@ -1,4 +1,3 @@
-import $ from 'jquery';
import lodashSize from 'lodash/size';
import wvui from '../ui/ui';
import brand from '../brand';
diff --git a/web/js/util/util.js b/web/js/util/util.js
index c7d9128ad..dbdbd498d 100644
--- a/web/js/util/util.js
+++ b/web/js/util/util.js
@@ -5,7 +5,6 @@
* which is included via config.scripts in web/config/wv.json
*/
-import $ from 'jquery';
import lodashEach from 'lodash/each';
import lodashIsNull from 'lodash/isNull';
import wvui from '../ui/ui';