Skip to content

Commit

Permalink
style: fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed May 23, 2022
1 parent 8af8fef commit 6e079f5
Show file tree
Hide file tree
Showing 47 changed files with 129 additions and 126 deletions.
6 changes: 3 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useD2 } from '@dhis2/app-runtime-adapter-d2'
import React from 'react'
import AppContainer from './components/app/AppContainer'
import store from './store'
import './locales'
import AppContainer from './components/app/AppContainer.js'
import store from './store/index.js'
import './locales/index.js'

const App = () => {
const { d2 } = useD2()
Expand Down
2 changes: 1 addition & 1 deletion src/actions/dialogActions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as actions from '../constants/actionTypes'
import * as actions from '../constants/actionTypes.js'

/**
* openDialog - Action creator helper method for creating dialogs
Expand Down
6 changes: 3 additions & 3 deletions src/actions/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { hashHistory } from 'react-router'
import * as actions from '../constants/actionTypes'
import api from '../utils/api'
import * as navigationAction from './navigationActions'
import * as actions from '../constants/actionTypes.js'
import api from '../utils/api.js'
import * as navigationAction from './navigationActions.js'

/**
* receiveNamespaces - Deliver namespaces returned from request
Expand Down
2 changes: 1 addition & 1 deletion src/actions/jsonEditorActions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as actions from '../constants/jsonEditorTypes'
import * as actions from '../constants/jsonEditorTypes.js'

/**
* searchJSON - Search action in json editor
Expand Down
2 changes: 1 addition & 1 deletion src/actions/navigationActions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SET_IGNORE_NEXT_CONFIRM_NAVIGATION } from '../constants/actionTypes'
import { SET_IGNORE_NEXT_CONFIRM_NAVIGATION } from '../constants/actionTypes.js'

export function setIgnoreNextNavigationConfirm() {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/actions/sidebarActions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as actions from '../constants/actionTypes'
import * as actions from '../constants/actionTypes.js'

/**
* searchSidebarChange - signal search bar in sidebar change
Expand Down
10 changes: 5 additions & 5 deletions src/components/app/AppContainer.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { PropTypes } from '@dhis2/prop-types'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider.js'
import React, { Component } from 'react'
import { Provider } from 'react-redux'
import { Router, Route, hashHistory, IndexRoute } from 'react-router'
import Theme from '../../utils/theme'
import EditDisplay from '../display/edit/EditDisplay'
import EmptyDisplay from '../display/empty/EmptyDisplay'
import Layout from './Layout'
import Theme from '../../utils/theme.js'
import EditDisplay from '../display/edit/EditDisplay.js'
import EmptyDisplay from '../display/empty/EmptyDisplay.js'
import Layout from './Layout.js'

class AppContainer extends Component {
shouldComponentUpdate() {
Expand Down
20 changes: 10 additions & 10 deletions src/components/app/Layout.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import * as dialog from '../../constants/dialogTypes'
import ConfirmDeleteKeyDialog from '../dialog/ConfirmDeleteKeyDialog'
import ConfirmDeleteNamespaceDialog from '../dialog/ConfirmDeleteNamespaceDialog'
import DialogRoute from '../dialog/DialogRoute'
import DialogRouter from '../dialog/DialogRouter'
import ErrorDialog from '../dialog/ErrorDialog'
import NewKeyDialog from '../dialog/NewKeyDialog'
import NewNamespaceDialog from '../dialog/NewNamespaceDialog'
import Sidebar from '../sidebar/Sidebar'
import Snackbar from '../utils/Snackbar'
import * as dialog from '../../constants/dialogTypes.js'
import ConfirmDeleteKeyDialog from '../dialog/ConfirmDeleteKeyDialog.js'
import ConfirmDeleteNamespaceDialog from '../dialog/ConfirmDeleteNamespaceDialog.js'
import DialogRoute from '../dialog/DialogRoute.js'
import DialogRouter from '../dialog/DialogRouter.js'
import ErrorDialog from '../dialog/ErrorDialog.js'
import NewKeyDialog from '../dialog/NewKeyDialog.js'
import NewNamespaceDialog from '../dialog/NewNamespaceDialog.js'
import Sidebar from '../sidebar/Sidebar.js'
import Snackbar from '../utils/Snackbar.js'
import styles from './Layout.module.css'

class Layout extends Component {
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog/ConfirmDeleteKeyDialog.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { deleteKey } from '../../actions'
import DialogRoot from './DialogRoot'
import { deleteKey } from '../../actions/index.js'
import DialogRoot from './DialogRoot.js'

export class ConfirmDeleteKeyDialog extends Component {
handleConfirmed = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog/ConfirmDeleteNamespaceDialog.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { deleteNamespace } from '../../actions'
import DialogRoot from './DialogRoot'
import { deleteNamespace } from '../../actions/index.js'
import DialogRoot from './DialogRoot.js'

export class ConfirmDeleteNamespaceDialog extends Component {
handleConfirmed = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/dialog/ConfirmNavigationDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { PropTypes } from '@dhis2/prop-types'
import Dialog from 'material-ui/Dialog'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import * as navigationActions from '../../actions/navigationActions'
import DialogRoot from './DialogRoot'
import * as navigationActions from '../../actions/navigationActions.js'
import DialogRoot from './DialogRoot.js'

export class ConfirmNavigationDialog extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/DialogRoot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Dialog from 'material-ui/Dialog'
import FlatButton from 'material-ui/FlatButton'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { closeDialog } from '../../actions/dialogActions'
import { closeDialog } from '../../actions/dialogActions.js'

class DialogRoot extends Component {
static buildButton(action, text, primary = false) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/dialog/ErrorDialog.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import DialogRoot from './DialogRoot'
import DialogRoot from './DialogRoot.js'

export class ErrorDialog extends Component {
render() {
Expand Down
6 changes: 3 additions & 3 deletions src/components/dialog/NewKeyDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { PropTypes } from '@dhis2/prop-types'
import TextField from 'material-ui/TextField'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { createAndDisplayValue } from '../../actions'
import { validateKeyOrNamespace } from '../../utils/validation'
import DialogRoot from './DialogRoot'
import { createAndDisplayValue } from '../../actions/index.js'
import { validateKeyOrNamespace } from '../../utils/validation.js'
import DialogRoot from './DialogRoot.js'

export class NamespaceDialog extends Component {
constructor(props) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/dialog/NewNamespaceDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { PropTypes } from '@dhis2/prop-types'
import TextField from 'material-ui/TextField'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { createAndDisplayValue } from '../../actions'
import { validateKeyOrNamespace } from '../../utils/validation'
import DialogRoot from './DialogRoot'
import { createAndDisplayValue } from '../../actions/index.js'
import { validateKeyOrNamespace } from '../../utils/validation.js'
import DialogRoot from './DialogRoot.js'

export class NewNamespaceDialog extends Component {
constructor(props) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/display/DisplayToolbarTitle.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PropTypes } from '@dhis2/prop-types'
import ChevronRight from 'material-ui/svg-icons/navigation/chevron-right'
import ChevronRight from 'material-ui/svg-icons/navigation/chevron-right.js'
import React, { Component } from 'react'
import Theme from '../../utils/theme'
import BreadcrumbHistoryButton from '../utils/BreadcrumbHistoryButton'
import Theme from '../../utils/theme.js'
import BreadcrumbHistoryButton from '../utils/BreadcrumbHistoryButton.js'
import styles from './DisplayToolbarTitle.module.css'

class DisplayToolbarTitle extends Component {
Expand Down
2 changes: 1 addition & 1 deletion src/components/display/ErrorArea.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import i18n from '@dhis2/d2-i18n'
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import { ErrorIconWithText } from '../utils/Icons'
import { ErrorIconWithText } from '../utils/Icons.js'

class ErrorArea extends Component {
render() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/display/LoadingArea.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Paper from 'material-ui/Paper'
import React, { Component } from 'react'
import { Spinner } from '../utils/Loaders'
import { Spinner } from '../utils/Loaders.js'
import styles from './Display.module.css'

const alignmentStyle = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/display/edit/EditArea.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import DisplayAreaHOC from '../../hoc/DisplayAreaHOC'
import JSONEditor from '../../utils/JSONEditor'
import DisplayAreaHOC from '../../hoc/DisplayAreaHOC.js'
import JSONEditor from '../../utils/JSONEditor.js'
import styles from '../Display.module.css'

export class EditArea extends Component {
Expand Down
8 changes: 4 additions & 4 deletions src/components/display/edit/EditDisplay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
updateValue,
valueChange,
rejectUpdateValue,
} from '../../../actions'
import ConfirmNavigationDialog from '../../dialog/ConfirmNavigationDialog'
} from '../../../actions/index.js'
import ConfirmNavigationDialog from '../../dialog/ConfirmNavigationDialog.js'
import styles from '../Display.module.css'
import EditArea from './EditArea'
import EditToolbar from './EditToolbar'
import EditArea from './EditArea.js'
import EditToolbar from './EditToolbar.js'

/* eslint-disable react/prop-types */
/* eslint-disable react/sort-prop-types */
Expand Down
24 changes: 12 additions & 12 deletions src/components/display/edit/EditToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import DropDownMenu from 'material-ui/DropDownMenu'
import IconButton from 'material-ui/IconButton'
import MenuItem from 'material-ui/MenuItem'
import Paper from 'material-ui/Paper'
import RedoIcon from 'material-ui/svg-icons/content/redo'
import SaveIcon from 'material-ui/svg-icons/content/save'
import UndoIcon from 'material-ui/svg-icons/content/undo'
import FormatAlignJustifyIcon from 'material-ui/svg-icons/editor/format-align-justify'
import FormatAlignLeftIcon from 'material-ui/svg-icons/editor/format-align-left'
import ExpandLessIcon from 'material-ui/svg-icons/navigation/expand-less'
import ExpandMoreIcon from 'material-ui/svg-icons/navigation/expand-more'
import RedoIcon from 'material-ui/svg-icons/content/redo.js'
import SaveIcon from 'material-ui/svg-icons/content/save.js'
import UndoIcon from 'material-ui/svg-icons/content/undo.js'
import FormatAlignJustifyIcon from 'material-ui/svg-icons/editor/format-align-justify.js'
import FormatAlignLeftIcon from 'material-ui/svg-icons/editor/format-align-left.js'
import ExpandLessIcon from 'material-ui/svg-icons/navigation/expand-less.js'
import ExpandMoreIcon from 'material-ui/svg-icons/navigation/expand-more.js'
import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar'
import React from 'react'
import { connect } from 'react-redux'
Expand All @@ -22,11 +22,11 @@ import {
jsonEditorChangeMode,
jsonEditorCompact,
jsonEditorFormat,
} from '../../../actions/jsonEditorActions'
import { debounce } from '../../../utils/utils'
import JSONSearchBar from '../../utils/JSONSearchBar'
import { Spinner } from '../../utils/Loaders'
import DisplayToolbarTitle from '../DisplayToolbarTitle'
} from '../../../actions/jsonEditorActions.js'
import { debounce } from '../../../utils/utils.js'
import JSONSearchBar from '../../utils/JSONSearchBar.js'
import { Spinner } from '../../utils/Loaders.js'
import DisplayToolbarTitle from '../DisplayToolbarTitle.js'

/* eslint-disable react/sort-prop-types */
/* eslint-disable react/prop-types */
Expand Down
4 changes: 2 additions & 2 deletions src/components/display/empty/EmptyArea.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import DisplayAreaHOC from '../../hoc/DisplayAreaHOC'
import { ModeCommentIconWithText } from '../../utils/Icons'
import DisplayAreaHOC from '../../hoc/DisplayAreaHOC.js'
import { ModeCommentIconWithText } from '../../utils/Icons.js'
import styles from '../Display.module.css'

export class EmptyArea extends Component {
Expand Down
4 changes: 2 additions & 2 deletions src/components/display/empty/EmptyDisplay.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Paper from 'material-ui/Paper'
import React, { Component } from 'react'
import styles from '../Display.module.css'
import EmptyArea from './EmptyArea'
import EmptyToolbar from './EmptyToolbar'
import EmptyArea from './EmptyArea.js'
import EmptyToolbar from './EmptyToolbar.js'

class EmptyDisplay extends Component {
render() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/hoc/DisplayAreaHOC.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { PropTypes } from '@dhis2/prop-types'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import ErrorArea from '../display/ErrorArea'
import LoadingArea from '../display/LoadingArea'
import ErrorArea from '../display/ErrorArea.js'
import LoadingArea from '../display/LoadingArea.js'

const DisplayAreaHOC = (Area) => {
class DisplayAreaBase extends Component {
Expand Down
4 changes: 2 additions & 2 deletions src/components/hoc/SidebarAreaHOC.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { PropTypes } from '@dhis2/prop-types'
import IconButton from 'material-ui/IconButton'
import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh'
import NavigationRefresh from 'material-ui/svg-icons/navigation/refresh.js'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import styles from '../sidebar/Sidebar.module.css'
import { Spinner } from '../utils/Loaders'
import { Spinner } from '../utils/Loaders.js'

const containerStyle = {
alignItems: 'center',
Expand Down
4 changes: 2 additions & 2 deletions src/components/sidebar/KeyItem.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { PropTypes } from '@dhis2/prop-types'
import { ListItem } from 'material-ui/List'
import EditorInsertDriveFile from 'material-ui/svg-icons/editor/insert-drive-file'
import EditorInsertDriveFile from 'material-ui/svg-icons/editor/insert-drive-file.js'
import React, { Component } from 'react'
import { hashHistory, withRouter } from 'react-router'
import KeyItemMenu from './KeyItemMenu'
import KeyItemMenu from './KeyItemMenu.js'

const styles = {
primaryText: {
Expand Down
8 changes: 4 additions & 4 deletions src/components/sidebar/KeyItemMenu.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { PropTypes } from '@dhis2/prop-types'
import IconMenu from 'material-ui/IconMenu'
import MenuItem from 'material-ui/MenuItem'
import Delete from 'material-ui/svg-icons/action/delete'
import Delete from 'material-ui/svg-icons/action/delete.js'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { openDialog } from '../../actions/dialogActions'
import * as dialog from '../../constants/dialogTypes'
import IconButtonElement from '../utils/IconButtonElement'
import { openDialog } from '../../actions/dialogActions.js'
import * as dialog from '../../constants/dialogTypes.js'
import IconButtonElement from '../utils/IconButtonElement.js'

const anchorOrigin = {
vertical: 'bottom',
Expand Down
17 changes: 10 additions & 7 deletions src/components/sidebar/NamespaceItem.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { PropTypes } from '@dhis2/prop-types'
import { ListItem } from 'material-ui/List'
import ErrorIcon from 'material-ui/svg-icons/alert/error'
import FileFolder from 'material-ui/svg-icons/file/folder'
import FileFolderOpen from 'material-ui/svg-icons/file/folder-open'
import ErrorIcon from 'material-ui/svg-icons/alert/error.js'
import FileFolderOpen from 'material-ui/svg-icons/file/folder-open.js'
import FileFolder from 'material-ui/svg-icons/file/folder.js'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { fetchAndToggleNamespace, toggleNamespace } from '../../actions'
import { Spinner } from '../utils/Loaders'
import KeyItem from './KeyItem'
import NamespaceItemMenu from './NamespaceItemMenu'
import {
fetchAndToggleNamespace,
toggleNamespace,
} from '../../actions/index.js'
import { Spinner } from '../utils/Loaders.js'
import KeyItem from './KeyItem.js'
import NamespaceItemMenu from './NamespaceItemMenu.js'

/* eslint-disable react/sort-prop-types */

Expand Down
10 changes: 5 additions & 5 deletions src/components/sidebar/NamespaceItemMenu.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { PropTypes } from '@dhis2/prop-types'
import IconMenu from 'material-ui/IconMenu'
import MenuItem from 'material-ui/MenuItem'
import Delete from 'material-ui/svg-icons/action/delete'
import NoteAdd from 'material-ui/svg-icons/action/note-add'
import Delete from 'material-ui/svg-icons/action/delete.js'
import NoteAdd from 'material-ui/svg-icons/action/note-add.js'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { openDialog } from '../../actions/dialogActions'
import * as dialog from '../../constants/dialogTypes'
import IconButtonElement from '../utils/IconButtonElement'
import { openDialog } from '../../actions/dialogActions.js'
import * as dialog from '../../constants/dialogTypes.js'
import IconButtonElement from '../utils/IconButtonElement.js'

const anchorOrigin = {
vertical: 'bottom',
Expand Down
4 changes: 2 additions & 2 deletions src/components/sidebar/NamespaceList.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { PropTypes } from '@dhis2/prop-types'
import { List } from 'material-ui/List'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import Theme from '../../utils/theme'
import NamespaceItem from './NamespaceItem'
import Theme from '../../utils/theme.js'
import NamespaceItem from './NamespaceItem.js'

const listStyle = {
overflowY: 'auto',
Expand Down
2 changes: 1 addition & 1 deletion src/components/sidebar/Searchbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PropTypes } from '@dhis2/prop-types'
import TextField from 'material-ui/TextField'
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { searchSidebarChange } from '../../actions/sidebarActions'
import { searchSidebarChange } from '../../actions/sidebarActions.js'

export class Searchbar extends Component {
handleKeys = (event) => {
Expand Down
Loading

0 comments on commit 6e079f5

Please sign in to comment.