Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fix `import/no-unresolved` errors

Jason Kent0283e29762f1
diff --git a/.eslintrc b/.eslintrc
index 95ccdf262..6f5af9316 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -81,8 +81,8 @@
"no-shadow": "warn",
"prefer-const": "warn",
"prefer-destructuring": "warn",
+ "class-methods-use-this": "warn",
- "class-methods-use-this": "off",
"max-len": "off",
"no-multi-assign": "off",
"consistent-return": "off",
@@ -96,8 +96,7 @@
// Import rules overrides
"import/prefer-default-export": "off",
- "import/no-cycle": "off",
- "import/no-unresolved": "off",
+ "import/no-cycle": "warn",
// Accesibility rules overrides
"jsx-a11y/no-noninteractive-tabindex": "off",
diff --git a/tasks/dist.js b/tasks/dist.js
index b7d91bc7b..edfe83a97 100755
--- a/tasks/dist.js
+++ b/tasks/dist.js
@@ -12,7 +12,7 @@ shell.mkdir('-p', 'build/worldview');
shell.cp('-rf', 'web/*', 'build/worldview');
console.log('Branding');
-const brand = require('../build/worldview/brand/brand.json');
+const brand = require('../build/options/brand.json');
const applyTo = [
'build/worldview/index.html',
diff --git a/web/js/app.js b/web/js/app.js
index 77af2f5e3..78a2974d1 100644
--- a/web/js/app.js
+++ b/web/js/app.js
@@ -2,7 +2,10 @@ import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { each as lodashEach } from 'lodash';
+
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
+
// Utils
import { calculateResponsiveState } from 'redux-responsive';
import util from './util/util';
diff --git a/web/js/components/animation-widget/gif-post-creation.js b/web/js/components/animation-widget/gif-post-creation.js
index 45f38e282..3733f6b0a 100644
--- a/web/js/components/animation-widget/gif-post-creation.js
+++ b/web/js/components/animation-widget/gif-post-creation.js
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { capitalize as lodashCapitalize } from 'lodash';
import FileSaver from 'file-saver';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { Modal, ModalBody, ModalHeader } from 'reactstrap';
import util from '../../util/util';
diff --git a/web/js/components/image-download/panel.js b/web/js/components/image-download/panel.js
index 779203511..fd1f06e49 100644
--- a/web/js/components/image-download/panel.js
+++ b/web/js/components/image-download/panel.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import {
imageSizeValid,
diff --git a/web/js/components/layer/product-picker/product-picker.js b/web/js/components/layer/product-picker/product-picker.js
index fa6772f38..65a2bff19 100644
--- a/web/js/components/layer/product-picker/product-picker.js
+++ b/web/js/components/layer/product-picker/product-picker.js
@@ -8,6 +8,7 @@ import {
includes as lodashIncludes,
} from 'lodash';
import lodashDebounce from 'lodash/debounce';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import {
ModalBody,
diff --git a/web/js/components/measure-tool/measure-button.js b/web/js/components/measure-tool/measure-button.js
index 074d315e3..038321bd0 100644
--- a/web/js/components/measure-tool/measure-button.js
+++ b/web/js/components/measure-tool/measure-button.js
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Button } from 'reactstrap';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faRuler } from '@fortawesome/free-solid-svg-icons';
diff --git a/web/js/components/sidebar/event.js b/web/js/components/sidebar/event.js
index 59f2639cc..dc5cf4b2c 100644
--- a/web/js/components/sidebar/event.js
+++ b/web/js/components/sidebar/event.js
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import lodashFind from 'lodash/find';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
diff --git a/web/js/components/sidebar/product.js b/web/js/components/sidebar/product.js
index 930b17088..aa9c26d6c 100644
--- a/web/js/components/sidebar/product.js
+++ b/web/js/components/sidebar/product.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import util from '../../util/util';
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 0375f22f3..8171a1dcf 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -5,6 +5,7 @@ import {
get as lodashGet,
cloneDeep as lodashCloneDeep
} from 'lodash';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import PropTypes from 'prop-types';
import Slider, { Handle } from 'rc-slider';
diff --git a/web/js/containers/info.js b/web/js/containers/info.js
index abbccec5f..4c1fe96a7 100644
--- a/web/js/containers/info.js
+++ b/web/js/containers/info.js
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import {
requestTemplate,
diff --git a/web/js/containers/projection.js b/web/js/containers/projection.js
index 0a7f2893a..001c17f25 100644
--- a/web/js/containers/projection.js
+++ b/web/js/containers/projection.js
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { get as lodashGet } from 'lodash';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { changeProjection } from '../modules/projection/actions';
import { onToggle } from '../modules/modal/actions';
diff --git a/web/js/containers/share.js b/web/js/containers/share.js
index f84dcdc1b..a3e30ba57 100644
--- a/web/js/containers/share.js
+++ b/web/js/containers/share.js
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import {
diff --git a/web/js/containers/sidebar/footer-content.js b/web/js/containers/sidebar/footer-content.js
index 418b81526..c82989fc4 100644
--- a/web/js/containers/sidebar/footer-content.js
+++ b/web/js/containers/sidebar/footer-content.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { get as lodashGet } from 'lodash';
import { connect } from 'react-redux';
diff --git a/web/js/containers/sidebar/layer.js b/web/js/containers/sidebar/layer.js
index f73b805dd..1e05e769f 100644
--- a/web/js/containers/sidebar/layer.js
+++ b/web/js/containers/sidebar/layer.js
@@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Draggable } from 'react-beautiful-dnd';
import { isEmpty as lodashIsEmpty, get as lodashGet } from 'lodash';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { connect } from 'react-redux';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
diff --git a/web/js/containers/sidebar/sidebar.js b/web/js/containers/sidebar/sidebar.js
index 1d1008984..d93d92955 100644
--- a/web/js/containers/sidebar/sidebar.js
+++ b/web/js/containers/sidebar/sidebar.js
@@ -3,6 +3,7 @@ import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { get as lodashGet } from 'lodash';
import { TabContent, TabPane } from 'reactstrap';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import Layers from './layers';
import Events from './events';
diff --git a/web/js/containers/timeline/timeline.js b/web/js/containers/timeline/timeline.js
index 55f99ccbe..9c52c5e70 100644
--- a/web/js/containers/timeline/timeline.js
+++ b/web/js/containers/timeline/timeline.js
@@ -3,6 +3,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import moment from 'moment';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import {
diff --git a/web/js/containers/tour.js b/web/js/containers/tour.js
index d359315f9..b35692e00 100644
--- a/web/js/containers/tour.js
+++ b/web/js/containers/tour.js
@@ -1,6 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { findIndex as lodashFindIndex, get as lodashGet, uniqBy } from 'lodash';
import update from 'immutability-helper';
diff --git a/web/js/map/data/model.test-old.js b/web/js/map/data/model.test-old.js
index c44989853..5fc890d8c 100644
--- a/web/js/map/data/model.test-old.js
+++ b/web/js/map/data/model.test-old.js
@@ -1,3 +1,4 @@
+/* eslint-disable import/no-unresolved */
/* eslint-disable import/extensions */
import { dataModel } from './model';
import { projectionModel } from '../projection/model';
diff --git a/web/js/map/data/ui.js b/web/js/map/data/ui.js
index 4640d25d9..107d1a6cc 100644
--- a/web/js/map/data/ui.js
+++ b/web/js/map/data/ui.js
@@ -1,6 +1,7 @@
import lodashSize from 'lodash/size';
import lodashEach from 'lodash/each';
import lodashFind from 'lodash/find';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import * as olExtent from 'ol/extent';
import { dataHandlerGetByName } from './handler';
diff --git a/web/js/map/measure/ui.js b/web/js/map/measure/ui.js
index 4507470ee..9884615e4 100644
--- a/web/js/map/measure/ui.js
+++ b/web/js/map/measure/ui.js
@@ -4,7 +4,7 @@ import {
LineString as OlLineString,
Polygon as OlGeomPolygon,
} from 'ol/geom';
-import { Draw as OlInteractionDraw } from 'ol/interaction/';
+import { Draw as OlInteractionDraw } from 'ol/interaction';
import { Vector as OlVectorLayer } from 'ol/layer';
import { Vector as OlVectorSource } from 'ol/source';
import {
diff --git a/web/js/map/natural-events/markers.js b/web/js/map/natural-events/markers.js
index 754cabc82..7bc8c579f 100644
--- a/web/js/map/natural-events/markers.js
+++ b/web/js/map/natural-events/markers.js
@@ -9,6 +9,7 @@ import OlLayerVector from 'ol/layer/Vector';
import OlSourceVector from 'ol/source/Vector';
import OlGeomPolygon from 'ol/geom/Polygon';
import * as olProj from 'ol/proj';
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import { selectEvent as selectEventAction } from '../../modules/natural-events/actions';
diff --git a/web/js/map/natural-events/request.js b/web/js/map/natural-events/request.js
index b1dd4efc7..75dfd92e8 100644
--- a/web/js/map/natural-events/request.js
+++ b/web/js/map/natural-events/request.js
@@ -1,7 +1,7 @@
/* eslint-disable import/extensions */
import lodashOrderBy from 'lodash/orderBy';
import lodashUniqBy from 'lodash/uniqBy';
-import util from '../util/util';
+import util from '../../util/util';
export default function naturalEventsRequest(models, ui, config) {
const self = {};
diff --git a/web/js/modules/tour/util.js b/web/js/modules/tour/util.js
index 4305de337..f7d54b7b7 100644
--- a/web/js/modules/tour/util.js
+++ b/web/js/modules/tour/util.js
@@ -1,3 +1,4 @@
+// eslint-disable-next-line import/no-unresolved
import googleTagManager from 'googleTagManager';
import update from 'immutability-helper';
import util from '../../util/util';