Skip to content

Commit

Permalink
Run ESLint in components to sort imports
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitblanc committed Feb 29, 2024
1 parent 727965e commit a3eafa7
Show file tree
Hide file tree
Showing 69 changed files with 327 additions and 169 deletions.
15 changes: 9 additions & 6 deletions components/AppMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,25 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import mousetrap from 'mousetrap';

import classnames from 'classnames';
import {remove as removeDiacritics} from 'diacritics';
import isEmpty from 'lodash.isempty';
import classnames from 'classnames';
import {setMenuMargin} from '../actions/windows';
import isEqual from 'lodash.isequal';
import mousetrap from 'mousetrap';
import PropTypes from 'prop-types';

import {setCurrentTask} from '../actions/task';
import {setMenuMargin} from '../actions/windows';
import InputContainer from '../components/InputContainer';
import LocaleUtils from '../utils/LocaleUtils';
import ConfigUtils from '../utils/ConfigUtils';
import LocaleUtils from '../utils/LocaleUtils';
import MiscUtils from '../utils/MiscUtils';
import ThemeUtils from '../utils/ThemeUtils';
import Icon from './Icon';

import './style/AppMenu.css';
import isEqual from 'lodash.isequal';


class AppMenu extends React.Component {
Expand Down
15 changes: 9 additions & 6 deletions components/AttributeForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,23 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import isEmpty from 'lodash.isempty';

import clone from 'clone';
import isEmpty from 'lodash.isempty';
import PropTypes from 'prop-types';
import {v1 as uuidv1} from 'uuid';

import {setEditContext, clearEditContext, getFeatureTemplate} from '../actions/editing';
import {setCurrentTaskBlocked} from '../actions/task';
import {LayerRole, refreshLayer} from '../actions/layers';
import {setCurrentTaskBlocked} from '../actions/task';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import LocaleUtils from '../utils/LocaleUtils';
import AutoEditForm from './AutoEditForm';
import LinkFeatureForm from './LinkFeatureForm';
import QtDesignerForm from './QtDesignerForm';
import ButtonBar from './widgets/ButtonBar';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import LocaleUtils from '../utils/LocaleUtils';

import './style/AttributeForm.css';

class AttributeForm extends React.Component {
Expand Down Expand Up @@ -321,7 +324,7 @@ class AttributeForm extends React.Component {
}
}
};
checkValidity = (form, changed=false) => {
checkValidity = (form, changed = false) => {
if (form) {
this.setState({formValid: form.checkValidity()});
if (changed) {
Expand Down
7 changes: 5 additions & 2 deletions components/AutoEditForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import omit from 'lodash.omit';
import NumericInput from 'react-numeric-input2';

import omit from 'lodash.omit';
import PropTypes from 'prop-types';

import EditComboField from './EditComboField';
import EditUploadField from './EditUploadField';
import ToggleSwitch from './widgets/ToggleSwitch';

import './style/AutoEditForm.css';

export default class AutoEditForm extends React.Component {
Expand Down
4 changes: 3 additions & 1 deletion components/CoordinateDisplayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import PropTypes from 'prop-types';

import CoordinatesUtils from '../utils/CoordinatesUtils';
import LocaleUtils from '../utils/LocaleUtils';

Expand Down
2 changes: 2 additions & 0 deletions components/EditComboField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
*/

import React from 'react';

import PropTypes from 'prop-types';

import LocaleUtils from '../utils/LocaleUtils';


Expand Down
13 changes: 8 additions & 5 deletions components/EditUploadField.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
*/

import React from 'react';
import PropTypes from 'prop-types';

import mime from 'mime-to-extensions';
import Icon from './Icon';
import PropTypes from 'prop-types';
import {v1 as uuidv1} from 'uuid';
import ModalDialog from './ModalDialog';
import ButtonBar from './widgets/ButtonBar';

import ConfigUtils from '../utils/ConfigUtils';
import LocaleUtils from '../utils/LocaleUtils';
import {showImageEditor} from '../utils/ImageEditor';
import LocaleUtils from '../utils/LocaleUtils';
import Icon from './Icon';
import ModalDialog from './ModalDialog';
import ButtonBar from './widgets/ButtonBar';

import './style/EditUploadField.css';


Expand Down
5 changes: 4 additions & 1 deletion components/FullscreenSwitcher.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import PropTypes from 'prop-types';

import {toggleFullscreen} from '../actions/display';
import LocaleUtils from '../utils/LocaleUtils';

import './style/FullscreenSwitcher.css';

class FullscreenSwitcher extends React.Component {
Expand Down
5 changes: 4 additions & 1 deletion components/Icon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
*/

import React from 'react';
import PropTypes from 'prop-types';

import classnames from 'classnames';
import PropTypes from 'prop-types';

import ConfigUtils from '../utils/ConfigUtils';
import LocaleUtils from '../utils/LocaleUtils';

import './style/Icon.css';

export default class Icon extends React.Component {
Expand Down
19 changes: 11 additions & 8 deletions components/IdentifyViewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import isEmpty from 'lodash.isempty';

import clone from 'clone';
import FileSaver from 'file-saver';
import htmlReactParser, {domToReact} from 'html-react-parser';
import clone from 'clone';
import omit from 'lodash.omit';
import JSZip from 'jszip';
import {LayerRole, addLayerFeatures, removeLayer} from '../actions/layers';
import isEmpty from 'lodash.isempty';
import omit from 'lodash.omit';
import PropTypes from 'prop-types';

import {setActiveLayerInfo} from '../actions/layerinfo';
import {LayerRole, addLayerFeatures, removeLayer} from '../actions/layers';
import {zoomToExtent} from '../actions/map';
import {openExternalUrl} from '../actions/task';
import ConfigUtils from '../utils/ConfigUtils';
Expand All @@ -25,6 +27,7 @@ import LocaleUtils from '../utils/LocaleUtils';
import MiscUtils from '../utils/MiscUtils';
import VectorLayerUtils from '../utils/VectorLayerUtils';
import Icon from './Icon';

import './style/IdentifyViewer.css';


Expand Down Expand Up @@ -159,19 +162,19 @@ class IdentifyViewer extends React.Component {
displayResultTree: PropTypes.bool,
enableExport: PropTypes.oneOfType([PropTypes.bool, PropTypes.array]),
exportGeometry: PropTypes.bool,
highlightAllResults: PropTypes.bool,
identifyResults: PropTypes.object,
iframeDialogsInitiallyDocked: PropTypes.bool,
layers: PropTypes.array,
longAttributesDisplay: PropTypes.oneOf(['ellipsis', 'wrap']),
mapcrs: PropTypes.string,
openExternalUrl: PropTypes.func,
removeLayer: PropTypes.func,
replaceImageUrls: PropTypes.bool,
setActiveLayerInfo: PropTypes.func,
openExternalUrl: PropTypes.func,
showLayerTitles: PropTypes.bool,
theme: PropTypes.object,
zoomToExtent: PropTypes.func,
highlightAllResults: PropTypes.bool
zoomToExtent: PropTypes.func
};
static defaultProps = {
longAttributesDisplay: 'ellipsis',
Expand Down
21 changes: 12 additions & 9 deletions components/ImportLayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,28 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import isEmpty from 'lodash.isempty';

import axios from 'axios';
import url from 'url';
import Proj4js from 'proj4';
import isEmpty from 'lodash.isempty';
import {WorkerMessageHandler} from "pdfjs-dist/build/pdf.worker";
import LayerCatalogWidget from './widgets/LayerCatalogWidget';
import Spinner from './Spinner';
import EditableSelect from '../components/widgets/EditableSelect';
import Proj4js from 'proj4';
import PropTypes from 'prop-types';
import url from 'url';

import {addLayer, addLayerFeatures} from '../actions/layers';
import FileSelector from './widgets/FileSelector';
import EditableSelect from '../components/widgets/EditableSelect';
import ConfigUtils from '../utils/ConfigUtils';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import LocaleUtils from '../utils/LocaleUtils';
import MiscUtils from '../utils/MiscUtils';
import ServiceLayerUtils from '../utils/ServiceLayerUtils';
import VectorLayerUtils from '../utils/VectorLayerUtils';
import Spinner from './Spinner';
import FileSelector from './widgets/FileSelector';
import LayerCatalogWidget from './widgets/LayerCatalogWidget';

import './style/ImportLayer.css';
import MiscUtils from '../utils/MiscUtils';


class ImportLayer extends React.Component {
Expand Down
4 changes: 3 additions & 1 deletion components/InputContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
*/

import React from 'react';
import PropTypes from 'prop-types';

import classnames from 'classnames';
import PropTypes from 'prop-types';

import './style/InputContainer.css';

export default class InputContainer extends React.Component {
Expand Down
7 changes: 5 additions & 2 deletions components/LayerInfoWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import PropTypes from 'prop-types';

import {setActiveLayerInfo} from '../actions/layerinfo';
import ResizeableWindow from '../components/ResizeableWindow';
import {Image} from './widgets/Primitives';
import LayerUtils from '../utils/LayerUtils';
import LocaleUtils from '../utils/LocaleUtils';
import MapUtils from '../utils/MapUtils';
import MiscUtils from '../utils/MiscUtils';
import {Image} from './widgets/Primitives';

import './style/LayerInfoWindow.css';

class LayerInfoWindow extends React.Component {
Expand Down
7 changes: 5 additions & 2 deletions components/LinkFeatureForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import PropTypes from 'prop-types';

import {setEditContext, getFeatureTemplate} from '../actions/editing';
import {LayerRole, addLayerFeatures, removeLayer} from '../actions/layers';
import AttributeForm from './AttributeForm';
import LocaleUtils from '../utils/LocaleUtils';
import MapUtils from '../utils/MapUtils';
import AttributeForm from './AttributeForm';

import './style/LinkFeatureForm.css';

class LinkFeatureForm extends React.Component {
Expand Down
4 changes: 2 additions & 2 deletions components/Localized.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* LICENSE file in the root directory of this source tree.
*/
import React from 'react';
import PropTypes from 'prop-types';
import {IntlProvider} from 'react-intl';
import {connect} from 'react-redux';

import {IntlProvider} from 'react-intl';
import PropTypes from 'prop-types';

class Localized extends React.Component {
static propTypes = {
Expand Down
4 changes: 3 additions & 1 deletion components/MapSelection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import ol from 'openlayers';
import PropTypes from 'prop-types';

import FeatureStyles from '../utils/FeatureStyles';
import MapUtils from '../utils/MapUtils';
import MeasureUtils from '../utils/MeasureUtils';
Expand Down
5 changes: 4 additions & 1 deletion components/MessageBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import PropTypes from 'prop-types';

import Icon from './Icon';

import './style/MessageBar.css';

class MessageBar extends React.Component {
Expand Down
3 changes: 3 additions & 0 deletions components/ModalDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@

import React from 'react';
import ReactDOM from 'react-dom';

import PropTypes from 'prop-types';

import Icon from './Icon';

import './style/ModalDialog.css';


Expand Down
13 changes: 8 additions & 5 deletions components/NumericInputWindow.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@
*/

import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';

import PropTypes from 'prop-types';
import {createSelector} from 'reselect';

import {addLayerFeatures, LayerRole, removeLayer} from '../actions/layers';
import ResizeableWindow from './ResizeableWindow';
import displayCrsSelector from '../selectors/displaycrs';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import LocaleUtils from '../utils/LocaleUtils';
import './style/NumericInputWindow.css';
import VectorLayerUtils from '../utils/VectorLayerUtils';
import Icon from './Icon';
import ResizeableWindow from './ResizeableWindow';
import TextInput from './widgets/TextInput';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import VectorLayerUtils from '../utils/VectorLayerUtils';

import './style/NumericInputWindow.css';


class NumericInputWindow extends React.Component {
Expand Down
Loading

0 comments on commit a3eafa7

Please sign in to comment.