Skip to content

Commit

Permalink
Apply sort-import ESLint rule for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitblanc committed Feb 28, 2024
1 parent 27457d5 commit dc19a3d
Show file tree
Hide file tree
Showing 55 changed files with 673 additions and 336 deletions.
11 changes: 8 additions & 3 deletions plugins/API.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import React from 'react';
// absolute named imports
import {connect} from 'react-redux';
import {LayerRole} from '../actions/layers';
import LayerUtils from '../utils/LayerUtils';
// relative default imports
import CoordinatesUtils from '../utils/CoordinatesUtils';
import LayerUtils from '../utils/LayerUtils';
import ServiceLayerUtils from '../utils/ServiceLayerUtils';
import VectorLayerUtils from '../utils/VectorLayerUtils';
// relative named imports
import {LayerRole} from '../actions/layers';
// styles

import * as displayActions from '../actions/display';
import * as layerActions from '../actions/layers';
Expand Down
35 changes: 20 additions & 15 deletions plugins/AttributeTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,34 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import FileSaver from 'file-saver';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import React from 'react';
import isEmpty from 'lodash.isempty';
import FileSaver from 'file-saver';
import {getFeatureTemplate} from '../actions/editing';
import {LayerRole} from '../actions/layers';
import {zoomToExtent, zoomToPoint} from '../actions/map';
import {setCurrentTask, setCurrentTaskBlocked} from '../actions/task';
import EditComboField, {KeyValCache} from '../components/EditComboField';
import EditUploadField from '../components/EditUploadField';
import Icon from '../components/Icon';
import ResizeableWindow from '../components/ResizeableWindow';
import NavBar from '../components/widgets/NavBar';
import Spinner from '../components/Spinner';
import TextInput from '../components/widgets/TextInput';
// absolute named imports
import {connect} from 'react-redux';
// relative default imports
import ConfigUtils from '../utils/ConfigUtils';
import EditingInterface from '../utils/EditingInterface';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import EditUploadField from '../components/EditUploadField';
import EditingInterface from '../utils/EditingInterface';
import Icon from '../components/Icon';
import LayerUtils from '../utils/LayerUtils';
import LocaleUtils from '../utils/LocaleUtils';
import MapUtils from '../utils/MapUtils';
import NavBar from '../components/widgets/NavBar';
import ResizeableWindow from '../components/ResizeableWindow';
import Spinner from '../components/Spinner';
import TextInput from '../components/widgets/TextInput';
import VectorLayerUtils from '../utils/VectorLayerUtils';
// relative named imports
import {LayerRole} from '../actions/layers';
import {getFeatureTemplate} from '../actions/editing';
import EditComboField, {KeyValCache} from '../components/EditComboField';
import {setCurrentTask, setCurrentTaskBlocked} from '../actions/task';
import {zoomToExtent, zoomToPoint} from '../actions/map';
// styles
import './style/AttributeTable.css';

/**
Expand Down
9 changes: 7 additions & 2 deletions plugins/Authentication.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import React from 'react';
import url from 'url';
// absolute named imports
import {connect} from 'react-redux';
// relative default imports
import ConfigUtils from '../utils/ConfigUtils';
// relative named imports
// styles


/**
Expand Down
13 changes: 9 additions & 4 deletions plugins/BackgroundSwitcher.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import React from 'react';
import classnames from 'classnames';
import isEmpty from 'lodash.isempty';
import sortBy from 'lodash.sortby';
import {LayerRole, changeLayerProperty} from '../actions/layers';
import Icon from '../components/Icon';
// absolute named imports
import {connect} from 'react-redux';
// relative default imports
import ConfigUtils from '../utils/ConfigUtils';
import Icon from '../components/Icon';
import LocaleUtils from '../utils/LocaleUtils';
// relative named imports
import {LayerRole, changeLayerProperty} from '../actions/layers';
// styles
import './style/BackgroundSwitcher.css';


Expand Down
14 changes: 9 additions & 5 deletions plugins/Bookmark.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@
* LICENSE file in the root directory of this source tree.
*/

// absolute default imports
import PropTypes from 'prop-types';
import React from 'react';
import {connect} from 'react-redux';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import LocaleUtils from '../utils/LocaleUtils';
import isEmpty from 'lodash.isempty';
// absolute named imports
import {connect} from 'react-redux';
// relative default imports
import ConfigUtils from '../utils/ConfigUtils';
import Icon from '../components/Icon';
import LocaleUtils from '../utils/LocaleUtils';
import SideBar from '../components/SideBar';
import Spinner from '../components/Spinner';
// relative named imports
import {createBookmark, getUserBookmarks, removeBookmark, updateBookmark} from '../utils/PermaLinkUtils';
// styles
import './style/Bookmark.css';
import isEmpty from 'lodash.isempty';


/**
* Allows managing user bookmarks.
Expand Down
19 changes: 12 additions & 7 deletions plugins/BottomBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import React from 'react';
import pickBy from 'lodash.pickby';
// absolute named imports
import {connect} from 'react-redux';
import {createSelector} from 'reselect';
import pickBy from 'lodash.pickby';
import {changeMousePositionState} from '../actions/mousePosition';
import {changeZoomLevel, setBottombarHeight} from '../actions/map';
import {openExternalUrl} from '../actions/task';
// relative default imports
import CoordinateDisplayer from '../components/CoordinateDisplayer';
import InputContainer from '../components/InputContainer';
import displayCrsSelector from '../selectors/displaycrs';
import CoordinatesUtils from '../utils/CoordinatesUtils';
import InputContainer from '../components/InputContainer';
import LocaleUtils from '../utils/LocaleUtils';
import MapUtils from '../utils/MapUtils';
import displayCrsSelector from '../selectors/displaycrs';
// relative named imports
import {changeMousePositionState} from '../actions/mousePosition';
import {openExternalUrl} from '../actions/task';
import {changeZoomLevel, setBottombarHeight} from '../actions/map';
// styles
import './style/BottomBar.css';


Expand Down
17 changes: 11 additions & 6 deletions plugins/Cyclomedia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,23 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import React from 'react';
// absolute named imports
import {connect} from 'react-redux';
import {addLayer, addLayerFeatures, changeLayerProperty, removeLayer, LayerRole} from '../actions/layers';
import {setCurrentTask} from '../actions/task';
import ResizeableWindow from '../components/ResizeableWindow';
import Spinner from '../components/Spinner';
// relative default imports
import CoordinatesUtils from '../utils/CoordinatesUtils';
import LocaleUtils from '../utils/LocaleUtils';
import './style/Cyclomedia.css';
import MapUtils from 'qwc2/utils/MapUtils';
import ResizeableWindow from '../components/ResizeableWindow';
import ResourceRegistry from 'qwc2/utils/ResourceRegistry';
import Spinner from '../components/Spinner';
// relative named imports
import {setCurrentTask} from '../actions/task';
import {LayerRole, addLayer, addLayerFeatures, changeLayerProperty, removeLayer} from '../actions/layers';
// styles
import './style/Cyclomedia.css';


const Status = {LOGIN: 0, INITIALIZING: 1, INITIALIZED: 2, ERROR: 3, LOADPOS: 4, HAVEPOS: 5};
Expand Down
23 changes: 14 additions & 9 deletions plugins/DxfExport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import FileSaver from 'file-saver';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import React from 'react';
import axios from 'axios';
import isEmpty from 'lodash.isempty';
import formDataEntries from 'formdata-json';
import FileSaver from 'file-saver';
import {LayerRole} from '../actions/layers';
import {setCurrentTask} from '../actions/task';
import InputContainer from '../components/InputContainer';
import TaskBar from '../components/TaskBar';
import PrintFrame from '../components/PrintFrame';
import isEmpty from 'lodash.isempty';
// absolute named imports
import {connect} from 'react-redux';
// relative default imports
import CoordinatesUtils from '../utils/CoordinatesUtils';
import InputContainer from '../components/InputContainer';
import LocaleUtils from '../utils/LocaleUtils';
import MiscUtils from '../utils/MiscUtils';
import PrintFrame from '../components/PrintFrame';
import TaskBar from '../components/TaskBar';
// relative named imports
import {LayerRole} from '../actions/layers';
import {setCurrentTask} from '../actions/task';
// styles
import './style/DxfExport.css';


Expand Down
23 changes: 14 additions & 9 deletions plugins/Editing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,31 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import React from 'react';
import isEmpty from 'lodash.isempty';
import isEqual from 'lodash.isequal';
// absolute named imports
import {connect} from 'react-redux';
import {v1 as uuidv1} from 'uuid';
import {setEditContext, clearEditContext, getFeatureTemplate} from '../actions/editing';
import {setCurrentTask, setCurrentTaskBlocked} from '../actions/task';
import {LayerRole, addLayerFeatures, removeLayer, refreshLayer, changeLayerProperty} from '../actions/layers';
import {setSnappingConfig} from '../actions/map';
// relative default imports
import AttributeForm from '../components/AttributeForm';
import Icon from '../components/Icon';
import PickFeature from '../components/PickFeature';
import SideBar from '../components/SideBar';
import ButtonBar from '../components/widgets/ButtonBar';
import ConfigUtils from '../utils/ConfigUtils';
import EditingInterface from '../utils/EditingInterface';
import Icon from '../components/Icon';
import LayerUtils from '../utils/LayerUtils';
import LocaleUtils from '../utils/LocaleUtils';
import MapUtils from '../utils/MapUtils';
import PickFeature from '../components/PickFeature';
import SideBar from '../components/SideBar';
// relative named imports
import {setSnappingConfig} from '../actions/map';
import {LayerRole, addLayerFeatures, changeLayerProperty, refreshLayer, removeLayer} from '../actions/layers';
import {clearEditContext, getFeatureTemplate, setEditContext} from '../actions/editing';
import {setCurrentTask, setCurrentTaskBlocked} from '../actions/task';
// styles
import './style/Editing.css';


Expand Down
19 changes: 12 additions & 7 deletions plugins/FeatureForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@
* LICENSE file in the root directory of this source tree.
*/

import React from 'react';
// absolute default imports
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import React from 'react';
import isEmpty from 'lodash.isempty';
import {setEditContext, clearEditContext} from '../actions/editing';
import {LayerRole} from '../actions/layers';
import {setCurrentTask} from '../actions/task';
// absolute named imports
import {connect} from 'react-redux';
// relative default imports
import AttributeForm from '../components/AttributeForm';
import ResizeableWindow from '../components/ResizeableWindow';
import TaskBar from '../components/TaskBar';
import EditingInterface from '../utils/EditingInterface';
import LayerUtils from '../utils/LayerUtils';
import LocaleUtils from '../utils/LocaleUtils';
import MapUtils from '../utils/MapUtils';
import ResizeableWindow from '../components/ResizeableWindow';
import TaskBar from '../components/TaskBar';
// relative named imports
import {LayerRole} from '../actions/layers';
import {setCurrentTask} from '../actions/task';
import {clearEditContext, setEditContext} from '../actions/editing';
// styles
import './style/FeatureForm.css';


Expand Down
14 changes: 9 additions & 5 deletions plugins/FeatureSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
* LICENSE file in the root directory of this source tree.
*/


// absolute default imports
import PropTypes from 'prop-types';
import React from 'react';
import axios from 'axios';
import PropTypes from 'prop-types';
import isEmpty from 'lodash.isempty';
// absolute named imports
import {connect} from 'react-redux';
import {v1 as uuidv1} from 'uuid';
import isEmpty from 'lodash.isempty';
// relative default imports
import IdentifyUtils from '../utils/IdentifyUtils';
import IdentifyViewer from '../components/IdentifyViewer';
import LocaleUtils from '../utils/LocaleUtils';
import SideBar from '../components/SideBar';
import Spinner from '../components/Spinner';
import IdentifyUtils from '../utils/IdentifyUtils';
import LocaleUtils from '../utils/LocaleUtils';
// relative named imports
// styles
import "./style/FeatureSearch.css";


Expand Down
Loading

0 comments on commit dc19a3d

Please sign in to comment.