From bfff96ad1926efd8eee1e422661a9daaa6885f8c Mon Sep 17 00:00:00 2001 From: Hendrik de Graaf Date: Wed, 18 Jul 2018 10:20:20 +0200 Subject: [PATCH] Tech 93/tweak eslint configuration (#522) * Extend react-app and prettier ESLint settings instead of dhis2 * Specify React version for ESLint to prevent false lint warnings reg. deprecated methods * Remove previous eslint config package * Added more dependencies that were needed by `yarn lint` * Added prettier dependency and config * Switched to older version of ESLint plugin to fix incompatibility issues * ESLint autofix * Disabled ESLint rules that have debatable merit * Allow fallthrough cases in switch because this is common practice in Redux * Fixed straightforward lint errors: - Removed unused variables - Added React to scope where needed - Fixed eqeqeq problems ( == instead of === ) - Removed useless escape character * Removed redundant optionSet field-override - All variables in the file were undefined so the code would not run - The file was not being imported by the field-overrides index so it was not being used * Added ESLint ignore instructions to files calling restricted global function "confirm" * Switched to using the default switch case to return the default state fixes "default-case" lint errors * Added rel="noreferrer noopener" to link with target blank to fix "react/jsx-no-target-blank" * Switched to static message because d2 is not in scope, so translation will fail * Fixes react/no-direct-mutation-state error - this.state.programRule action is a d2 model instance - I tried creating a shallow copy and setting that as state but this gave problems with saving. It seems the model really does need to be mutated in-place for this to work. - So in the end we now have code that is actually mutating state directly, but in a way the linter doesn't trip over * Removed unused variables and tested functionality - Removed a lot from this file - So tested the app to see if the functionallity was not broken * Restored no-param-reassign rule and placed eslint ignore comments This was done after discussions with John Melin. It makes sense to have the rule in place because most of the time parameter re-assignment is a bad idea. For the few times, it is a good idea we can place eslint ignore comments. * Prevent commits with lint errors NOTE: I monkey tested all list and add/edit screens before merging and encountered no errors --- .eslintrc | 12 +- .prettierrc | 5 + package.json | 10 +- src/App/appStateStore.js | 2 +- src/EditModel/BackButton.component.js | 6 +- src/EditModel/CancelButton.component.js | 1 + .../SharingNotification.component.js | 1 - src/EditModel/SingleModelStore.js | 4 +- .../event-program/EventActionButtons.js | 1 - .../EventProgramStepperContent.js | 3 +- .../AssignDataElements.js | 6 +- .../assign-data-elements/epics.js | 3 - .../Section.component.js | 3 - .../SectionForm.component.js | 16 +- .../SectionList.component.js | 2 +- .../create-data-entry-form/epics.js | 2 +- .../EditCustomFormProgramStage.js | 7 +- .../EditCustomRegistrationForm.js | 7 +- .../__tests__/dataEntryFormUtils.spec.js | 9 +- .../data-entry-form/dataEntryFormUtils.js | 2 - .../event-program/eventProgramStore.js | 7 +- .../event-program/metadataimport-helpers.js | 2 +- .../EventProgramNotifications.js | 1 - .../notifications/NotificationDialog.js | 3 +- .../notifications/NotificationList.js | 1 - .../notifications/NotificationSteps.js | 5 +- .../TrackerProgramNotifications.js | 4 +- .../event-program/notifications/epics.js | 9 +- .../event-program/notifications/reducers.js | 5 +- .../event-program/notifications/selectors.js | 4 +- .../program-access/ProgramStagesAccess.js | 1 - src/EditModel/event-program/reducers.js | 1 - src/EditModel/event-program/render-types.js | 2 +- .../tracker-program/CustomRegistrationForm.js | 1 - .../tracker-program/EnrollmentStep.js | 3 +- .../TrackerProgramStepperContent.js | 1 - .../event-program/tracker-program/epics.js | 21 +- .../tracker-program/program-stages/actions.js | 2 - .../program-stages/contextActions.js | 2 - .../program-stages/selectors.js | 6 +- src/EditModel/form-rules/index.js | 1 - src/EditModel/formHelpers.js | 1 + .../stepper/__tests__/stepper.spec.js | 4 +- src/List/ContextActions.js | 12 +- src/List/DetailsBox.component.js | 2 +- ...lsoryDataElementOperandDialog.component.js | 57 ---- .../MenuCardsForSection.component.js | 1 - .../OrganisationUnitHierarchy.component.js | 2 - .../OrganisationUnitLevels.component.js | 1 - src/config/field-config/field-defaults.js | 2 - src/config/field-overrides/attribute.js | 1 - .../data-set/DataSetElementField.component.js | 4 +- .../field-overrides/dataApprovalLevel.js | 5 - src/config/field-overrides/dataSet.js | 2 - src/config/field-overrides/optionSet.js | 8 - src/config/field-overrides/predictor.js | 1 - .../program-indicator/CollapsibleList.js | 1 + .../programRuleActionDialog.component.js | 5 +- .../programNotificationTemplate.js | 2 +- .../field-overrides/programRuleVariable.js | 4 +- .../SubjectAndMessageTemplateFields.js | 2 - .../VariableList.js | 2 - .../validationNotificationTemplate.js | 2 - src/forms/form-fields/attribute-row.js | 2 +- src/maintenance.js | 8 +- src/react-with-touch.js | 14 +- src/utils/LoadableComponent.js | 1 + yarn.lock | 313 +++++++++--------- 68 files changed, 253 insertions(+), 390 deletions(-) create mode 100644 .prettierrc delete mode 100644 src/config/field-overrides/optionSet.js diff --git a/.eslintrc b/.eslintrc index 02e890d8e..9972a1705 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,11 +1,21 @@ { - "extends": "dhis2", + "extends": [ + "react-app", + "prettier" + ], + "settings": { + "react": { + "version": "^15.3.1" + } + }, "env": { "browser": true, "jest": true }, "rules": { "no-param-reassign": [2, { "props": false }], + "no-fallthrough": "off", + "array-callback-return": "off", "import/no-extraneous-dependencies": 0, "no-unused-expressions": ["error", { "allowTernary": true, diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..9e7e2acde --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "singleQuote": true, + "tabWidth": 4, + "trailingComma": "es5" +} \ No newline at end of file diff --git a/package.json b/package.json index c1594d969..a2e150d57 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,13 @@ "d3-scale": "^1.0.3", "enzyme": "^3.0.0", "enzyme-adapter-react-15": "^1.0.0", - "eslint-config-dhis2": "3.0.7", + "eslint": "^5.0.1", + "eslint-config-prettier": "^2.9.0", + "eslint-config-react-app": "^2.1.0", + "eslint-plugin-flowtype": "^2.49.3", + "eslint-plugin-import": "^2.13.0", + "eslint-plugin-jsx-a11y": "^5.0.1", + "eslint-plugin-react": "^7.10.0", "fbjs": "^0.8.8", "glob": "^7.1.1", "html-webpack-plugin": "^2.26.0", @@ -61,6 +67,7 @@ "node-pre-gyp": "^0.6.30", "node-sass": "4.9.0", "precommit-hook": "^3.0.0", + "prettier": "^1.13.7", "recompose": "^0.23.1", "redux-logger": "^3.0.6", "sass-loader": "^6.0.5", @@ -101,6 +108,7 @@ }, "pre-commit": [ "validate", + "lint", "test" ], "manifest.webapp": { diff --git a/src/App/appStateStore.js b/src/App/appStateStore.js index da69c3eb0..f92c1641a 100644 --- a/src/App/appStateStore.js +++ b/src/App/appStateStore.js @@ -3,7 +3,7 @@ import { getInstance } from 'd2/lib/d2'; import camelCaseToUnderscores from 'd2-utilizr/lib/camelCaseToUnderscores'; import isObject from 'd2-utilizr/lib/isObject'; import snackActions from '../Snackbar/snack.actions'; -import { curry, map, contains, __, compose, get, filter, uniq, keys } from 'lodash/fp'; +import { curry, map, contains, __, uniq, keys } from 'lodash/fp'; import maintenanceModels from '../config/maintenance-models'; import systemSettingsStore from './systemSettingsStore'; diff --git a/src/EditModel/BackButton.component.js b/src/EditModel/BackButton.component.js index d81ae5243..bd044c36d 100644 --- a/src/EditModel/BackButton.component.js +++ b/src/EditModel/BackButton.component.js @@ -1,7 +1,6 @@ import React from 'react'; import IconButton from 'material-ui/IconButton/IconButton'; import addD2Context from 'd2-ui/lib/component-helpers/addD2Context'; -import { config } from 'd2/lib/d2'; import modelToEditStore from '../EditModel/modelToEditStore'; function BackButton(props, context) { @@ -11,7 +10,10 @@ function BackButton(props, context) { if (!isDirty) { onClick(...params); - } else if (confirm(context.d2.i18n.getTranslation('abandon_unsaved_changes'))) { + } else if ( + // eslint-disable-next-line no-restricted-globals + confirm(context.d2.i18n.getTranslation('abandon_unsaved_changes')) + ) { onClick(...params); } }; diff --git a/src/EditModel/CancelButton.component.js b/src/EditModel/CancelButton.component.js index 9b740260a..0562d8f29 100644 --- a/src/EditModel/CancelButton.component.js +++ b/src/EditModel/CancelButton.component.js @@ -19,6 +19,7 @@ function CancelButton( if (!shouldConfirm) { onClick(...params); } else if ( + // eslint-disable-next-line no-restricted-globals confirm(context.d2.i18n.getTranslation('abandon_unsaved_changes')) ) { onClick(...params); diff --git a/src/EditModel/SharingNotification.component.js b/src/EditModel/SharingNotification.component.js index ea5be210c..44af17cd4 100644 --- a/src/EditModel/SharingNotification.component.js +++ b/src/EditModel/SharingNotification.component.js @@ -1,6 +1,5 @@ import React from 'react'; import Translate from 'd2-ui/lib/i18n/Translate.mixin'; -import { config } from 'd2/lib/d2'; import FontIcon from 'material-ui/FontIcon/FontIcon'; import Paper from 'material-ui/Paper/Paper'; import { withAuth } from "../utils/Auth"; diff --git a/src/EditModel/SingleModelStore.js b/src/EditModel/SingleModelStore.js index 20b7e05b2..f8908f087 100644 --- a/src/EditModel/SingleModelStore.js +++ b/src/EditModel/SingleModelStore.js @@ -115,8 +115,9 @@ function cloneHandlerByObjectType(objectType, model) { })) break; } + default: + return model; } - return model; } function loadModelFromD2(objectType, objectId) { @@ -146,6 +147,7 @@ const singleModelStoreConfig = { model.uuid = undefined; //let server handle created date model.created = undefined; + // eslint-disable-next-line no-param-reassign model = cloneHandlerByObjectType(objectType, model); this.setState(model); }); diff --git a/src/EditModel/event-program/EventActionButtons.js b/src/EditModel/event-program/EventActionButtons.js index fa8811b2d..3c921ee67 100644 --- a/src/EditModel/event-program/EventActionButtons.js +++ b/src/EditModel/event-program/EventActionButtons.js @@ -1,4 +1,3 @@ -import React from 'react'; import { bindActionCreators } from 'redux'; import { saveEventProgram } from './actions'; import { createConnectedFormActionButtonsForSchema } from '../FormActionButtons'; diff --git a/src/EditModel/event-program/EventProgramStepperContent.js b/src/EditModel/event-program/EventProgramStepperContent.js index 4f449dddf..e86558bf6 100644 --- a/src/EditModel/event-program/EventProgramStepperContent.js +++ b/src/EditModel/event-program/EventProgramStepperContent.js @@ -1,7 +1,8 @@ +import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import mapPropsStream from 'recompose/mapPropsStream'; -import { first, get, compose } from 'lodash/fp'; +import { first, compose } from 'lodash/fp'; import { createStepperContentFromConfig } from '../stepper/stepper'; import { activeStepSelector } from './selectors'; import eventProgramStore from './eventProgramStore'; diff --git a/src/EditModel/event-program/assign-data-elements/AssignDataElements.js b/src/EditModel/event-program/assign-data-elements/AssignDataElements.js index 3dbc3f372..4feef240d 100644 --- a/src/EditModel/event-program/assign-data-elements/AssignDataElements.js +++ b/src/EditModel/event-program/assign-data-elements/AssignDataElements.js @@ -4,7 +4,7 @@ import compose from 'recompose/compose'; import GroupEditor from 'd2-ui/lib/group-editor/GroupEditor.component'; import Paper from 'material-ui/Paper/Paper'; import mapPropsStream from 'recompose/mapPropsStream'; -import { get, noop, first, getOr, __ } from 'lodash/fp'; +import { get, first, getOr, __ } from 'lodash/fp'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import withHandlers from 'recompose/withHandlers'; @@ -30,15 +30,11 @@ import { } from './actions'; import programStore from '../eventProgramStore'; -import { withProgramStageFromProgramStage$ } from '../tracker-program/program-stages/utils'; import { withRouter } from 'react-router'; -import { getProgramStage$ById } from '../tracker-program/program-stages/utils'; import RenderTypeSelectField, { getRenderTypeOptions, DATA_ELEMENT_CLAZZ, MOBILE, DESKTOP } from '../render-types'; const getFirstProgramStage = compose(first, get('programStages')); -const firstProgramStage$ = programStore.map(getFirstProgramStage); - // Use programStage$ prop if present, else use first programStage const programStage$ = props$ => props$ diff --git a/src/EditModel/event-program/assign-data-elements/epics.js b/src/EditModel/event-program/assign-data-elements/epics.js index 5754e522b..2c3b287b4 100644 --- a/src/EditModel/event-program/assign-data-elements/epics.js +++ b/src/EditModel/event-program/assign-data-elements/epics.js @@ -9,7 +9,6 @@ import { combineEpics } from 'redux-observable'; import { getOr, get, - set, map, find, compose, @@ -20,7 +19,6 @@ import { __, } from 'lodash/fp'; import { generateUid } from 'd2/lib/uid'; -import programStore from '../eventProgramStore'; // getProgramStageToModify :: String -> ProgramStage[] -> ProgramStage export const getProgramStageToModify = ( @@ -96,7 +94,6 @@ const removeDataElementFromStage = store => action$ => action$ .ofType(PROGRAM_STAGE_DATA_ELEMENTS_REMOVE) .map(action => { - const state = store.getState(); const programStageToEdit = getProgramStageByIdFromAction( store, action diff --git a/src/EditModel/event-program/create-data-entry-form/Section.component.js b/src/EditModel/event-program/create-data-entry-form/Section.component.js index 2e4f3d3bf..530033ecb 100644 --- a/src/EditModel/event-program/create-data-entry-form/Section.component.js +++ b/src/EditModel/event-program/create-data-entry-form/Section.component.js @@ -4,7 +4,6 @@ import { SortableElement } from 'react-sortable-hoc'; import Heading from 'd2-ui/lib/headings/Heading.component'; import FlatButton from 'material-ui/FlatButton'; -import TextField from 'material-ui/TextField'; import Dialog from 'material-ui/Dialog'; import IconButton from 'material-ui/IconButton'; import FontIcon from 'material-ui/FontIcon'; @@ -12,8 +11,6 @@ import FontIcon from 'material-ui/FontIcon'; import DragHandle from './DragHandle.component'; import SortableSectionDataList from './SortableSectionDataList.component'; -const maxNameLength = 230; - const styles = { sectionContainer: { width: '100%', diff --git a/src/EditModel/event-program/create-data-entry-form/SectionForm.component.js b/src/EditModel/event-program/create-data-entry-form/SectionForm.component.js index 817e82c48..6613ce8ce 100644 --- a/src/EditModel/event-program/create-data-entry-form/SectionForm.component.js +++ b/src/EditModel/event-program/create-data-entry-form/SectionForm.component.js @@ -1,23 +1,11 @@ import React, { Component, PropTypes } from 'react'; -import FontIcon from 'material-ui/FontIcon'; -import { SortableContainer, SortableElement, arrayMove } from 'react-sortable-hoc'; -import { concat, sortBy, find, isEqual, get, getOr, pull, without, flatten, filter, findIndex, negate, difference } from 'lodash/fp'; -import DragHandle from './DragHandle.component'; -import IconButton from 'material-ui/IconButton'; -import TextField from 'material-ui/TextField'; -import FlatButton from 'material-ui/FlatButton'; -import Dialog from 'material-ui/Dialog'; +import { arrayMove } from 'react-sortable-hoc'; +import { sortBy, find, isEqual, getOr, pull, flatten, filter, findIndex, negate, difference } from 'lodash/fp'; import Snackbar from 'material-ui/Snackbar'; -import Section from './Section.component'; import SectionList from './SectionList.component'; -import SortableSectionDataList from './SortableSectionDataList.component'; import AddOrEditSection from './AddOrEditSection.component'; -import Heading from 'd2-ui/lib/headings/Heading.component'; import DataElementPicker from './DataElementPicker.component'; -import { grey300, grey800 } from 'material-ui/styles/colors'; - -const maxNameLength = 230; const styles = { sectionForm: { diff --git a/src/EditModel/event-program/create-data-entry-form/SectionList.component.js b/src/EditModel/event-program/create-data-entry-form/SectionList.component.js index f38644683..c4cacae7c 100644 --- a/src/EditModel/event-program/create-data-entry-form/SectionList.component.js +++ b/src/EditModel/event-program/create-data-entry-form/SectionList.component.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React from 'react'; import { SortableContainer } from 'react-sortable-hoc'; import { isEqual } from 'lodash/fp'; diff --git a/src/EditModel/event-program/create-data-entry-form/epics.js b/src/EditModel/event-program/create-data-entry-form/epics.js index 6bb7bcc45..c1632bf83 100644 --- a/src/EditModel/event-program/create-data-entry-form/epics.js +++ b/src/EditModel/event-program/create-data-entry-form/epics.js @@ -1,6 +1,6 @@ import { Observable } from 'rxjs'; import { combineEpics } from 'redux-observable'; -import { get, getOr, compose, isEqual, find, findIndex, maxBy, filter, entries, sortBy, map } from 'lodash/fp'; +import { get, getOr, compose, isEqual, findIndex, maxBy, filter, sortBy } from 'lodash/fp'; import { generateUid } from 'd2/lib/uid'; import { getInstance } from 'd2/lib/d2'; import { getProgramStageToModify } from '../assign-data-elements/epics'; diff --git a/src/EditModel/event-program/data-entry-form/EditCustomFormProgramStage.js b/src/EditModel/event-program/data-entry-form/EditCustomFormProgramStage.js index 0a35b4c32..44030b1f6 100644 --- a/src/EditModel/event-program/data-entry-form/EditCustomFormProgramStage.js +++ b/src/EditModel/event-program/data-entry-form/EditCustomFormProgramStage.js @@ -1,6 +1,5 @@ import React from 'react'; import { Observable } from 'rxjs'; -import log from 'loglevel'; import FlatButton from 'material-ui/FlatButton/FlatButton'; import SelectField from 'material-ui/SelectField/SelectField'; import MenuItem from 'material-ui/MenuItem/MenuItem'; @@ -8,19 +7,17 @@ import Paper from 'material-ui/Paper/Paper'; import TextField from 'material-ui/TextField/TextField'; import LoadingMask from 'd2-ui/lib/loading-mask/LoadingMask.component'; import Action from 'd2-ui/lib/action/Action'; -import pure from 'recompose/pure'; import mapPropsStream from 'recompose/mapPropsStream'; -import { get, compose, first, getOr, noop, isEqual, find, curry } from 'lodash/fp'; +import { compose, getOr, noop, curry } from 'lodash/fp'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { dataEntryFormChanged, dataEntryFormRemove } from './actions'; -import snackActions from '../../../Snackbar/snack.actions'; import eventProgramStore from '../eventProgramStore'; import CKEditor from './CKEditor'; import '../../../../scss/EditModel/EditDataEntryFormProgramStage.scss'; import { getProgramStageDataElementsByStageId } from "../notifications/selectors"; import PaletteSection from './PaletteSection'; -import { bindFuncsToKeys, moveEditorSelection, processFormData, insertElement as insElem } from "./dataEntryFormUtils"; +import { bindFuncsToKeys, processFormData, insertElement as insElem } from "./dataEntryFormUtils"; import PropTypes from 'prop-types'; const programStageDataElementWithProgramStageId = programStageId => programStageDataElement => ({ diff --git a/src/EditModel/event-program/data-entry-form/EditCustomRegistrationForm.js b/src/EditModel/event-program/data-entry-form/EditCustomRegistrationForm.js index b26393815..856e82525 100644 --- a/src/EditModel/event-program/data-entry-form/EditCustomRegistrationForm.js +++ b/src/EditModel/event-program/data-entry-form/EditCustomRegistrationForm.js @@ -1,6 +1,4 @@ import React from 'react'; -import { Observable } from 'rxjs'; -import log from 'loglevel'; import FlatButton from 'material-ui/FlatButton/FlatButton'; import SelectField from 'material-ui/SelectField/SelectField'; import MenuItem from 'material-ui/MenuItem/MenuItem'; @@ -8,17 +6,14 @@ import Paper from 'material-ui/Paper/Paper'; import TextField from 'material-ui/TextField/TextField'; import LoadingMask from 'd2-ui/lib/loading-mask/LoadingMask.component'; import Action from 'd2-ui/lib/action/Action'; -import pure from 'recompose/pure'; import mapPropsStream from 'recompose/mapPropsStream'; -import { get, compose, first, getOr, noop, isEqual, find, curry } from 'lodash/fp'; +import { compose, getOr, noop, curry } from 'lodash/fp'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import { programDataEntryFormChanged, programDataEntryFormRemove } from './actions'; -import snackActions from '../../../Snackbar/snack.actions'; import eventProgramStore from '../eventProgramStore'; import CKEditor from './CKEditor'; import '../../../../scss/EditModel/EditDataEntryFormProgramStage.scss'; -import { getProgramStageDataElementsByStageId } from "../notifications/selectors"; import PaletteSection from './PaletteSection'; import { bindFuncsToKeys, processFormData, insertElement as insElem } from "./dataEntryFormUtils"; import PropTypes from 'prop-types'; diff --git a/src/EditModel/event-program/data-entry-form/__tests__/dataEntryFormUtils.spec.js b/src/EditModel/event-program/data-entry-form/__tests__/dataEntryFormUtils.spec.js index cbd8ade5d..781cf9c58 100644 --- a/src/EditModel/event-program/data-entry-form/__tests__/dataEntryFormUtils.spec.js +++ b/src/EditModel/event-program/data-entry-form/__tests__/dataEntryFormUtils.spec.js @@ -1,13 +1,6 @@ import * as utils from '../dataEntryFormUtils'; describe('dataEntryFormUtils', () => { - let editor = { - insertHtml: jest.fn(), - getSelection: jest.fn(() => ({getRanges: jest.fn(() => ([{ - moveToElementEditablePosition: jest.fn(), - endContainer: {} - }]))})) - } let elements; const initialHTML = '

'; @@ -33,7 +26,7 @@ describe('dataEntryFormUtils', () => { describe('processForm()', () => { test('it should work with empty formData', () => { const dataEntryForm = initialHTML; - const { usedIds, outHtml } = utils.processFormData( + const { outHtml } = utils.processFormData( dataEntryForm, elements, utils.elementPatterns.combinedIdPattern diff --git a/src/EditModel/event-program/data-entry-form/dataEntryFormUtils.js b/src/EditModel/event-program/data-entry-form/dataEntryFormUtils.js index 63dbbdf6d..933bea32e 100644 --- a/src/EditModel/event-program/data-entry-form/dataEntryFormUtils.js +++ b/src/EditModel/event-program/data-entry-form/dataEntryFormUtils.js @@ -1,5 +1,3 @@ -import log from 'loglevel'; - const inputPattern = //gi; /* AttributeIdPattern is used in tracker-programs Custom registration forms diff --git a/src/EditModel/event-program/eventProgramStore.js b/src/EditModel/event-program/eventProgramStore.js index 5d5e23454..eeec6b800 100644 --- a/src/EditModel/event-program/eventProgramStore.js +++ b/src/EditModel/event-program/eventProgramStore.js @@ -1,12 +1,10 @@ import Store from 'd2-ui/lib/store/Store'; -import { equals, first, negate, some, get, compose, find, identity, map, __, concat, includes, reduce, findIndex, isObject, keys, values, flatten } from 'lodash/fp'; +import { equals, some, get, compose, identity, map, __, concat, isObject, values, flatten } from 'lodash/fp'; import { getOwnedPropertyJSON } from 'd2/lib/model/helpers/json'; // ___ programSelector :: StoreState -> Model const programSelector = get('program'); -const progamDataEntrySelector = get('program.dataEntryForm'); - // ___ programStagesSelector :: StoreState -> Array> const programStagesSelector = get('programStages'); @@ -30,9 +28,6 @@ const modelToJson = getOwnedPropertyJSON; // ___ isProgramStageDirty :: Object -> Object<{programStages}> -> Boolean const isProgramStageDirty = compose(some(checkIfDirty), programStagesSelector); -// ___ getIdForFirstProgramStage : Object -> Object<{programStages}> -> String -const getIdForFirstProgramStage = compose(get('id'), first, programStagesSelector); - // ___ hasDirtyProgramStageSections :: Object -> Boolean //const hasDirtyProgramStageSections = compose(some(checkIfDirty), programStageSectionsSelector); const hasDirtyProgramStageSections = compose(some(checkIfDirty), flatten, values, programStageSectionsSelector) diff --git a/src/EditModel/event-program/metadataimport-helpers.js b/src/EditModel/event-program/metadataimport-helpers.js index eca0c96ef..699ef6303 100644 --- a/src/EditModel/event-program/metadataimport-helpers.js +++ b/src/EditModel/event-program/metadataimport-helpers.js @@ -1,4 +1,4 @@ -import { get, getOr, first, map, compose, groupBy, concat, reduce, flatten, filter, identity } from 'lodash/fp'; +import { get, getOr, first, map, compose, groupBy, flatten, filter } from 'lodash/fp'; const importStatus = { OK: 'OK', diff --git a/src/EditModel/event-program/notifications/EventProgramNotifications.js b/src/EditModel/event-program/notifications/EventProgramNotifications.js index 02d81123e..d2646d430 100644 --- a/src/EditModel/event-program/notifications/EventProgramNotifications.js +++ b/src/EditModel/event-program/notifications/EventProgramNotifications.js @@ -1,7 +1,6 @@ import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { __, first, get } from 'lodash/fp'; import withState from 'recompose/withState'; import compose from 'recompose/compose'; import withHandlers from 'recompose/withHandlers'; diff --git a/src/EditModel/event-program/notifications/NotificationDialog.js b/src/EditModel/event-program/notifications/NotificationDialog.js index b33b1047a..bf4c863e5 100644 --- a/src/EditModel/event-program/notifications/NotificationDialog.js +++ b/src/EditModel/event-program/notifications/NotificationDialog.js @@ -1,7 +1,6 @@ -import React, { PropTypes, Component } from 'react'; +import React, { PropTypes } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -import { get } from 'lodash/fp'; import branch from 'recompose/branch'; import renderNothing from 'recompose/renderNothing'; import { modelToEditSelector } from './selectors'; diff --git a/src/EditModel/event-program/notifications/NotificationList.js b/src/EditModel/event-program/notifications/NotificationList.js index f08a76c80..b602c31d2 100644 --- a/src/EditModel/event-program/notifications/NotificationList.js +++ b/src/EditModel/event-program/notifications/NotificationList.js @@ -5,7 +5,6 @@ import AddIcon from 'material-ui/svg-icons/content/add'; import getContext from 'recompose/getContext'; import compose from 'recompose/compose'; import branch from 'recompose/branch'; -import withContext from 'recompose/withContext'; import renderNothing from 'recompose/renderNothing'; function AddButton({ onAddClick }) { diff --git a/src/EditModel/event-program/notifications/NotificationSteps.js b/src/EditModel/event-program/notifications/NotificationSteps.js index 8573376b5..48a588426 100644 --- a/src/EditModel/event-program/notifications/NotificationSteps.js +++ b/src/EditModel/event-program/notifications/NotificationSteps.js @@ -1,6 +1,5 @@ -import React, { PropTypes, Component } from 'react'; +import React, { Component } from 'react'; import { connect } from 'react-redux'; -import { get } from 'lodash/fp'; import compose from 'recompose/compose'; import FormBuilder from 'd2-ui/lib/forms/FormBuilder.component'; import { modelToEditSelector } from './selectors'; @@ -126,7 +125,7 @@ const stepToFormBuilder = ({ //Remove PROGRAM_ATTRIBUTE options when it's an event-program if(!isTracker) { fieldsToUse = fieldsToUse.map(field => { - if(field.name == 'notificationRecipient') { + if(field.name === 'notificationRecipient') { const removedOptions = field.props.options.filter(opt => opt.value !== "PROGRAM_ATTRIBUTE"); const propsWithRemovedRecipient = {...field.props, options: removedOptions} return { ...field, props: { ...propsWithRemovedRecipient} } diff --git a/src/EditModel/event-program/notifications/TrackerProgramNotifications.js b/src/EditModel/event-program/notifications/TrackerProgramNotifications.js index de51f99f3..ac49feda2 100644 --- a/src/EditModel/event-program/notifications/TrackerProgramNotifications.js +++ b/src/EditModel/event-program/notifications/TrackerProgramNotifications.js @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'; import { Tabs, Tab } from 'material-ui/Tabs'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import { __, first, get, noop, pick } from 'lodash/fp'; +import { get, pick } from 'lodash/fp'; import withState from 'recompose/withState'; import compose from 'recompose/compose'; import withHandlers from 'recompose/withHandlers'; @@ -14,10 +14,10 @@ import NotificationDeleteDialog from './NotificationDeleteDialog'; import { removeStageNotification, removeProgramNotification, setEditModel, setAddModel } from './actions'; import NotificationDialog from './NotificationDialog'; import eventProgramStore from '../eventProgramStore'; -const programStageTabIndex = 0; import { getProgramStageById } from '../tracker-program/program-stages/selectors'; import TrackerNotificationAddButton from './TrackerNotificationAddButton'; +const programStageTabIndex = 0; const programStages$ = eventProgramStore.map(getProgramStages); const stageNotifications$ = eventProgramStore.map( get('programStageNotifications') diff --git a/src/EditModel/event-program/notifications/epics.js b/src/EditModel/event-program/notifications/epics.js index 7ce90fb6b..6c501e6fe 100644 --- a/src/EditModel/event-program/notifications/epics.js +++ b/src/EditModel/event-program/notifications/epics.js @@ -6,10 +6,10 @@ import { import { Observable } from 'rxjs'; import { combineEpics } from 'redux-observable'; import { getInstance } from 'd2/lib/d2'; -import { getStageNotifications, getStageNotificationsForProgramStageId } from './selectors'; +import { getStageNotificationsForProgramStageId } from './selectors'; import { getProgramStageById } from "../tracker-program/program-stages/selectors"; import eventProgramStore from '../eventProgramStore'; -import { equals, first, negate, some, get, compose, find, identity, map, __, pick } from 'lodash/fp'; +import { equals, first, negate, find, pick } from 'lodash/fp'; import { generateUid } from 'd2/lib/uid'; import snackActions from "../../../Snackbar/snack.actions"; @@ -55,7 +55,6 @@ const saveProgramStageNotification = (action$, store) => action$ eventProgramStore .take(1) .flatMap((eventProgramState) => { - const { programStages, programStageNotifications } = eventProgramState; const programStage = getProgramStageFromModel(eventProgramState, model); let stageNotifications = getStageNotificationsForProgramStageId(eventProgramState, programStage.id) @@ -89,7 +88,7 @@ const setProgramStageNotificationAddModel = (action$, store) => action$ // Set default values model.id = generateUid(); model.lastUpdated = new Date().toISOString(); - if(notificationType == 'PROGRAM_NOTIFICATION') { + if(notificationType === 'PROGRAM_NOTIFICATION') { return setEditModel(model, 'PROGRAM_NOTIFICATION'); } if(psStore.programStages.length < 1) { @@ -118,7 +117,7 @@ const saveProgramNotification = (action$, store) => action$ eventProgramStore .take(1) .flatMap((eventProgramState) => { - const { program, programNotifications } = eventProgramState; + const { program } = eventProgramState; // If we're dealing with a new model we have to add it to the notification lists if (negate(find(equals(model)))(program)) { diff --git a/src/EditModel/event-program/notifications/reducers.js b/src/EditModel/event-program/notifications/reducers.js index 842fad9f5..8de213196 100644 --- a/src/EditModel/event-program/notifications/reducers.js +++ b/src/EditModel/event-program/notifications/reducers.js @@ -45,7 +45,8 @@ export function stageNotificationsReducer( modelToEdit: model, } } - } - return state; + default: + return state; + } } diff --git a/src/EditModel/event-program/notifications/selectors.js b/src/EditModel/event-program/notifications/selectors.js index 24f3b27dc..48516e064 100644 --- a/src/EditModel/event-program/notifications/selectors.js +++ b/src/EditModel/event-program/notifications/selectors.js @@ -1,4 +1,4 @@ -import { get, compose, first, isEqual, curry, __ } from 'lodash/fp'; +import { get, compose, first, curry, __ } from 'lodash/fp'; import { getProgramStageIndexById } from '../tracker-program/program-stages/selectors'; export const getProgramStages = ({ programStages }) => programStages; @@ -71,6 +71,6 @@ export const getNotificationType = get( 'eventProgram.stageNotifications.notificationType' ); -export const isProgramNotification = state => 'PROGRAM_NOTIFICATION' == get( +export const isProgramNotification = state => 'PROGRAM_NOTIFICATION' === get( 'eventProgram.stageNotifications.notificationType' )(state); \ No newline at end of file diff --git a/src/EditModel/event-program/program-access/ProgramStagesAccess.js b/src/EditModel/event-program/program-access/ProgramStagesAccess.js index 8a9e60335..983dacb0e 100644 --- a/src/EditModel/event-program/program-access/ProgramStagesAccess.js +++ b/src/EditModel/event-program/program-access/ProgramStagesAccess.js @@ -15,7 +15,6 @@ import { editProgramStageField } from '../tracker-program/program-stages/actions import Toolbar from './Toolbar'; import { areSharingPropertiesSimilar, - extractDisplayName, generateSharingDescription, } from './utils'; import { yellow800 } from 'material-ui/styles/colors'; diff --git a/src/EditModel/event-program/reducers.js b/src/EditModel/event-program/reducers.js index a2def3b3f..6d9683d0c 100644 --- a/src/EditModel/event-program/reducers.js +++ b/src/EditModel/event-program/reducers.js @@ -4,7 +4,6 @@ import { EVENT_PROGRAM_STEP_NEXT, EVENT_PROGRAM_STEP_PREVIOUS, EVENT_PROGRAM_LOAD_SUCCESS, - EVENT_PROGRAM_LOAD_ERROR, PROGRAM_STEPPER_SET_DISABLE, EVENT_PROGRAM_SAVE, EVENT_PROGRAM_SAVE_SUCCESS, diff --git a/src/EditModel/event-program/render-types.js b/src/EditModel/event-program/render-types.js index 54d82562c..dfd7b3781 100644 --- a/src/EditModel/event-program/render-types.js +++ b/src/EditModel/event-program/render-types.js @@ -1,5 +1,5 @@ import React from 'react'; -import { getOr, capitalize, __ } from 'lodash/fp'; +import { getOr, capitalize, } from 'lodash/fp'; import PropTypes from 'prop-types'; import SelectField from 'material-ui/SelectField'; import MenuItem from 'material-ui/MenuItem'; diff --git a/src/EditModel/event-program/tracker-program/CustomRegistrationForm.js b/src/EditModel/event-program/tracker-program/CustomRegistrationForm.js index f2ba2513e..da2757a10 100644 --- a/src/EditModel/event-program/tracker-program/CustomRegistrationForm.js +++ b/src/EditModel/event-program/tracker-program/CustomRegistrationForm.js @@ -1,5 +1,4 @@ import React, { Component } from 'react'; -import { get, compose } from 'lodash/fp'; import Checkbox from 'material-ui/Checkbox'; import addD2Context from 'd2-ui/lib/component-helpers/addD2Context'; import { CustomRegistrationDataEntryForm } from '../data-entry-form/EditCustomRegistrationForm'; diff --git a/src/EditModel/event-program/tracker-program/EnrollmentStep.js b/src/EditModel/event-program/tracker-program/EnrollmentStep.js index b14e76813..33f742039 100644 --- a/src/EditModel/event-program/tracker-program/EnrollmentStep.js +++ b/src/EditModel/event-program/tracker-program/EnrollmentStep.js @@ -1,7 +1,6 @@ -import React, { Component } from 'react'; +import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; -import mapPropsStream from 'recompose/mapPropsStream'; import { get, compose } from 'lodash/fp'; import {createFormFor} from "../../formHelpers"; import {flattenRouterProps, wrapInPaper} from "../../componentHelpers"; diff --git a/src/EditModel/event-program/tracker-program/TrackerProgramStepperContent.js b/src/EditModel/event-program/tracker-program/TrackerProgramStepperContent.js index b18ae96c1..9800c6320 100644 --- a/src/EditModel/event-program/tracker-program/TrackerProgramStepperContent.js +++ b/src/EditModel/event-program/tracker-program/TrackerProgramStepperContent.js @@ -28,7 +28,6 @@ const stepperConfig = () => { connect(null, mapDispatchToProps), ); const trackerDetailsFields = fieldOrder.for('trackerProgram'); - const enrollmentFields = fieldOrder.for('enrollment'); const stepComponents = { EditProgramDetailsForm: connectEditForm( diff --git a/src/EditModel/event-program/tracker-program/epics.js b/src/EditModel/event-program/tracker-program/epics.js index 3509bd43d..29fe5ff1b 100644 --- a/src/EditModel/event-program/tracker-program/epics.js +++ b/src/EditModel/event-program/tracker-program/epics.js @@ -23,11 +23,11 @@ import { const d2$ = Observable.fromPromise(getInstance()); const getProgramStageById = curry((stageId, store) => - store.programStages.find(stage => stage.id == stageId), + store.programStages.find(stage => stage.id === stageId), ); const getProgramStageIndexById = curry((stageId, store) => - store.programStages.findIndex(stage => stage.id == stageId), + store.programStages.findIndex(stage => stage.id === stageId), ); /** @@ -75,9 +75,7 @@ export const newTrackerProgramStage = action$ => autoGenerateEvent: true, }); try { - const newProgramStage = programStages.push( - programStageModel, - ); + programStages.push(programStageModel); const newProgramStageCollection = store.program.programStages.add( programStageModel, @@ -112,10 +110,8 @@ export const editTrackerProgramStage = action$ => .map(get('programStages')) .map((programStages) => { const index = programStages.findIndex( - stage => stage.id == stageId, + stage => stage.id === stageId, ); - const programStage = programStages[index]; - const model = programStages[index].clone(); const setter = set( 'programStageToEditCopy', @@ -135,7 +131,7 @@ export const saveTrackerProgramStage = action$ => programStore.take(1).map((store) => { const stageId = store.programStageToEditCopy.id; const index = store.programStages.findIndex( - stage => stage.id == stageId, + stage => stage.id === stageId, ); if (index < 0) { @@ -174,9 +170,6 @@ export const cancelProgramStageEdit = action$ => ); // If the programstage is new, remove it when cancelling if (model.name === undefined) { - const removedFromProgramStages = store.programStages.filter( - (p, i) => i !== index, - ); programStageSetter = deleteProgramStageFromState( stageId, false, @@ -199,10 +192,6 @@ const deleteProgramStage = action$ => .flatMap(action => programStore.take(1).map((store) => { try { - const ind = store.programStages.findIndex( - stage => stage.id == action.stageId, - ); - const index = getProgramStageIndexById(action.stageId)( store, ); diff --git a/src/EditModel/event-program/tracker-program/program-stages/actions.js b/src/EditModel/event-program/tracker-program/program-stages/actions.js index 4322ea58d..fabd708df 100644 --- a/src/EditModel/event-program/tracker-program/program-stages/actions.js +++ b/src/EditModel/event-program/tracker-program/program-stages/actions.js @@ -1,6 +1,4 @@ -import eventProgramStore from '../../eventProgramStore'; import { createActionCreator } from '../../../actions'; -import { generateUid } from 'd2/lib/uid'; export const PROGRAM_STAGE_STEP_CHANGE = 'PROGRAM_STAGE_STEP_CHANGE'; export const PROGRAM_STAGE_STEP_NEXT = 'PROGRAM_STAGE_STEP_NEXT'; diff --git a/src/EditModel/event-program/tracker-program/program-stages/contextActions.js b/src/EditModel/event-program/tracker-program/program-stages/contextActions.js index 1054f8688..a02a14565 100644 --- a/src/EditModel/event-program/tracker-program/program-stages/contextActions.js +++ b/src/EditModel/event-program/tracker-program/program-stages/contextActions.js @@ -3,9 +3,7 @@ import { afterDeleteHook$ } from '../../../../List/ContextActions'; import camelCaseToUnderscores from 'd2-utilizr/lib/camelCaseToUnderscores'; import { getInstance } from 'd2/lib/d2'; import log from 'loglevel'; -import { set } from 'lodash/fp'; import { deleteProgramStageFromState } from '../epics'; -import { Observable } from 'rxjs'; export async function deleteProgramStageWithSnackbar(model) { const d2 = await getInstance(); diff --git a/src/EditModel/event-program/tracker-program/program-stages/selectors.js b/src/EditModel/event-program/tracker-program/program-stages/selectors.js index ceec86caf..4ef750240 100644 --- a/src/EditModel/event-program/tracker-program/program-stages/selectors.js +++ b/src/EditModel/event-program/tracker-program/program-stages/selectors.js @@ -1,4 +1,4 @@ -import { curry, curryRight, get } from 'lodash/fp'; +import { curry, get } from 'lodash/fp'; export const getCurrentProgramStageId = state => state.eventProgram.programStageStepper.stageId; @@ -10,11 +10,11 @@ export const isProgramStageStepperActive = state => !!state.eventProgram.programStageStepper.stageId; export const getProgramStageById = curry((store, stageId) => - store.programStages.find(stage => stage.id == stageId) + store.programStages.find(stage => stage.id === stageId) ); export const getProgramStageIndexById = curry((store, stageId) => - store.programStages.findIndex(stage => stage.id == stageId) + store.programStages.findIndex(stage => stage.id === stageId) ); export const getStageSectionsById = curry((state, id) => { diff --git a/src/EditModel/form-rules/index.js b/src/EditModel/form-rules/index.js index bb89e4a9b..885ea9a0c 100644 --- a/src/EditModel/form-rules/index.js +++ b/src/EditModel/form-rules/index.js @@ -1,5 +1,4 @@ import noop from 'd2-utilizr/lib/noop'; -import log from 'loglevel'; import { negate } from 'lodash/fp'; import isArray from 'd2-utilizr/lib/isArray'; diff --git a/src/EditModel/formHelpers.js b/src/EditModel/formHelpers.js index 5c3d37eb2..f49e64eaf 100644 --- a/src/EditModel/formHelpers.js +++ b/src/EditModel/formHelpers.js @@ -192,6 +192,7 @@ function addValuesToFieldConfigs(fieldConfigs, model) { * Ie. programNotificationTemplate, which are used in program Notification and programStage notifications. */ export function createFieldConfigsFor(schema, fieldNames, filterFieldConfigs = identity, includeAttributes, runRules = true, customFieldOrderName) { + // eslint-disable-next-line no-param-reassign filterFieldConfigs = filterFieldConfigs || identity; return mapPropsStream(props$ => props$ .filter(({ model }) => model) diff --git a/src/EditModel/stepper/__tests__/stepper.spec.js b/src/EditModel/stepper/__tests__/stepper.spec.js index 9ec73ad24..01d70cac0 100644 --- a/src/EditModel/stepper/__tests__/stepper.spec.js +++ b/src/EditModel/stepper/__tests__/stepper.spec.js @@ -109,14 +109,14 @@ describe('Stepper utility functions', () => { test('should log a warning when no active step has been passed', () => { const ContentStepper = createStepperContentFromConfig(stepperConfig); - const renderedStepper = shallow(); + shallow(); expect(log.warn).toBeCalledWith('The `activeStep` prop is undefined, therefore the component created by `createStepperContentFromConfig` will render null'); }); test('should log a warning when the step does not have a component', () => { const ContentStepper = createStepperContentFromConfig(stepperConfig); - const renderedStepper = shallow(); + shallow(); expect(log.warn).toBeCalledWith('Could not find a content component for a step with key (first) in', stepperConfig); }); diff --git a/src/List/ContextActions.js b/src/List/ContextActions.js index fbb678af0..b2ba0d12e 100644 --- a/src/List/ContextActions.js +++ b/src/List/ContextActions.js @@ -1,7 +1,7 @@ import { Subject } from 'rxjs'; import log from 'loglevel'; -import { config, getInstance as getD2 } from 'd2/lib/d2'; +import { getInstance as getD2 } from 'd2/lib/d2'; import Action from 'd2-ui/lib/action/Action'; import camelCaseToUnderscores from 'd2-utilizr/lib/camelCaseToUnderscores'; @@ -35,13 +35,6 @@ const contextActions = Action.createActionsFromNames([ 'showSqlView', ]); -const confirm = message => new Promise((resolve, reject) => { - if (window.confirm(message)) { - resolve(); - } - reject(); -}); - // TODO: The action assumes that the appState actually has state contextActions.edit .subscribe((action) => { @@ -248,7 +241,8 @@ contextActions.preview }) .then(actionComplete) .catch((err) => { - snackActions.show({ message: d2.i18n.getTranslation('failed_to_open_report_preview'), action: 'ok' }); + // Using fixed text because d2 is not in scope here so message cannot be translated + snackActions.show({ message: 'Failed to open report preview', action: 'ok' }); actionFailed(err); }); }); diff --git a/src/List/DetailsBox.component.js b/src/List/DetailsBox.component.js index 8868f7b9f..a4d19aeeb 100644 --- a/src/List/DetailsBox.component.js +++ b/src/List/DetailsBox.component.js @@ -49,7 +49,7 @@ class DetailsBox extends Component { // Suffix the url with the .json extension to always get the json representation of the api resource getJsonApiResource = value => - {value}; + {value}; getValueToRender = (fieldName, value) => { if (Array.isArray(value) && value.length) { diff --git a/src/List/compulsory-data-elements-dialog/CompulsoryDataElementOperandDialog.component.js b/src/List/compulsory-data-elements-dialog/CompulsoryDataElementOperandDialog.component.js index c6398b4fe..87cd6f51d 100644 --- a/src/List/compulsory-data-elements-dialog/CompulsoryDataElementOperandDialog.component.js +++ b/src/List/compulsory-data-elements-dialog/CompulsoryDataElementOperandDialog.component.js @@ -9,63 +9,9 @@ import GroupEditor from 'd2-ui/lib/group-editor/GroupEditor.component'; import Store from 'd2-ui/lib/store/Store'; import snackActions from '../../Snackbar/snack.actions'; -const styles = { - groupEditorWrap: { - paddingBottom: '2rem', - }, - - formButtons: { - display: 'flex', - justifyContent: 'flex-end', - }, -}; - const itemsAvailableStore = Store.create(); const itemsSelectedStore = Store.create(); -// TODO: Copied from d2 (Should find a better way to do this) -function getOwnedPropertyJSON(model) { - const objectToSave = {}; - const ownedProperties = this.getOwnedPropertyNames(); - const collectionProperties = model.getCollectionChildrenPropertyNames(); - - Object.keys(this.modelValidations).forEach((propertyName) => { - if (ownedProperties.indexOf(propertyName) >= 0) { - if (model.dataValues[propertyName] !== undefined && model.dataValues[propertyName] !== null) { - // Handle collections and plain values different - if (collectionProperties.indexOf(propertyName) === -1) { - objectToSave[propertyName] = model.dataValues[propertyName]; - } else { - // compulsoryDataElementOperands is not an array of models. - // TODO: This is not the proper way to do this. We should check if the array contains Models - if (propertyName === 'compulsoryDataElementOperands') { - objectToSave[propertyName] = model.dataValues[propertyName]; - return; - } - - // Transform an object collection to an array of objects with id properties - objectToSave[propertyName] = Array - .from(model.dataValues[propertyName].values()) - .filter(value => value.id) - .map((childModel) => { - // Legends can be saved as part of the LegendSet object. - // To make this work properly we will return all of the properties for the items in the collection - // instead of just the `id` fields - if (model.modelDefinition && model.modelDefinition.name === 'legendSet') { - return getOwnedPropertyJSON.call(childModel.modelDefinition, childModel); - } - - // For any other types we return an object with just an id - return { id: childModel.id }; - }); - } - } - } - }); - - return objectToSave; -} - class CompulsoryDataElementOperandDialog extends Component { constructor(props, context) { super(props, context); @@ -198,9 +144,6 @@ class CompulsoryDataElementOperandDialog extends Component { isSaving: true, }); - const payload = getOwnedPropertyJSON.bind(this.props.model.modelDefinition)(this.props.model); - const d2 = this.context.d2; - // TODO: Should be done propery without modifying props and preferably without saving the whole model this.props.model.compulsoryDataElementOperands = collectionToSave; this.props.model.save() diff --git a/src/MenuCards/MenuCardsForSection.component.js b/src/MenuCards/MenuCardsForSection.component.js index 03a27eda3..77ace1d11 100644 --- a/src/MenuCards/MenuCardsForSection.component.js +++ b/src/MenuCards/MenuCardsForSection.component.js @@ -1,4 +1,3 @@ -import React from 'react'; import MenuCards from './MenuCards.component'; import withStateFrom from 'd2-ui/lib/component-helpers/withStateFrom'; import menuCardsStore from './menuCardsStore'; diff --git a/src/OrganisationUnitHierarchy/OrganisationUnitHierarchy.component.js b/src/OrganisationUnitHierarchy/OrganisationUnitHierarchy.component.js index 4515573f0..fac38390d 100644 --- a/src/OrganisationUnitHierarchy/OrganisationUnitHierarchy.component.js +++ b/src/OrganisationUnitHierarchy/OrganisationUnitHierarchy.component.js @@ -128,8 +128,6 @@ function onClickLeft(event, model) { ); } -const operationsCompleted = Action.create('operationsCompleted', 'Hierarchy'); - async function getOrganisationUnitByIds(ids) { const d2 = await getInstance(); diff --git a/src/OrganisationUnitLevels/OrganisationUnitLevels.component.js b/src/OrganisationUnitLevels/OrganisationUnitLevels.component.js index 6f63fc296..af72f6cfc 100644 --- a/src/OrganisationUnitLevels/OrganisationUnitLevels.component.js +++ b/src/OrganisationUnitLevels/OrganisationUnitLevels.component.js @@ -12,7 +12,6 @@ import FormButtons from '../EditModel/FormButtons.component'; import snackActions from '../Snackbar/snack.actions'; import Heading from 'd2-ui/lib/headings/Heading.component'; import TranslationDialog from 'd2-ui/lib/i18n/TranslationDialog.component'; -import AccessDenied from '../App/AccessDenied.component'; function saveOrganisationUnitLevels(i18n) { actions.saveOrganisationUnitLevels() diff --git a/src/config/field-config/field-defaults.js b/src/config/field-config/field-defaults.js index 19f4f1d93..9204d93d5 100644 --- a/src/config/field-config/field-defaults.js +++ b/src/config/field-config/field-defaults.js @@ -1,10 +1,8 @@ import { isEqual } from 'lodash/fp'; import { - BEFORE_START_OF_REPORTING_PERIOD, BEFORE_END_OF_REPORTING_PERIOD, AFTER_START_OF_REPORTING_PERIOD, - AFTER_END_OF_REPORTING_PERIOD, EVENT_DATE, ENROLLMENT_DATE, } from '../field-overrides/program-indicator/enums'; diff --git a/src/config/field-overrides/attribute.js b/src/config/field-overrides/attribute.js index 13e65df48..c769c8134 100644 --- a/src/config/field-overrides/attribute.js +++ b/src/config/field-overrides/attribute.js @@ -1,4 +1,3 @@ -import React from 'react'; import AttributeAssignment from './attribute/AttributeAssignment'; export default new Map([ diff --git a/src/config/field-overrides/data-set/DataSetElementField.component.js b/src/config/field-overrides/data-set/DataSetElementField.component.js index 64628dbfc..8d3b134d1 100644 --- a/src/config/field-overrides/data-set/DataSetElementField.component.js +++ b/src/config/field-overrides/data-set/DataSetElementField.component.js @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; -import { uniq, includes, curry, get, isUndefined, range } from 'lodash/fp'; +import { uniq, get, range } from 'lodash/fp'; import { getInstance } from 'd2/lib/d2'; import { generateUid } from 'd2/lib/uid'; @@ -11,7 +11,7 @@ import Row from 'd2-ui/lib/layout/Row.component'; import TextField from 'material-ui/TextField/TextField'; import LinearProgress from 'material-ui/LinearProgress/LinearProgress'; -import { Observable, BehaviorSubject } from 'rxjs'; +import { Observable } from 'rxjs'; import log from 'loglevel'; import componentFromStream from 'recompose/componentFromStream'; diff --git a/src/config/field-overrides/dataApprovalLevel.js b/src/config/field-overrides/dataApprovalLevel.js index 926f64c5d..87e34337e 100644 --- a/src/config/field-overrides/dataApprovalLevel.js +++ b/src/config/field-overrides/dataApprovalLevel.js @@ -1,4 +1,3 @@ -import { getInstance } from 'd2/lib/d2'; import DropDownAsyncGetter from '../../forms/form-fields/drop-down-async-getter'; async function getOrgUnitLevels(model, d2) { @@ -12,10 +11,6 @@ async function getOrgUnitLevels(model, d2) { })); } -function Fn(props) { - return ; -} - export default new Map([ ['orgUnitLevel', { component: DropDownAsyncGetter, diff --git a/src/config/field-overrides/dataSet.js b/src/config/field-overrides/dataSet.js index 2244597da..cee2d253a 100644 --- a/src/config/field-overrides/dataSet.js +++ b/src/config/field-overrides/dataSet.js @@ -1,5 +1,3 @@ -import React from 'react'; - import OrganisationUnitTreeMultiSelect from '../../forms/form-fields/orgunit-tree-multi-select'; import DataSetElementField from './data-set/DataSetElementField.component'; import DataInputPeriods from './data-set/DataInputPeriods.component'; diff --git a/src/config/field-overrides/optionSet.js b/src/config/field-overrides/optionSet.js deleted file mode 100644 index c16773602..000000000 --- a/src/config/field-overrides/optionSet.js +++ /dev/null @@ -1,8 +0,0 @@ - - -export default new Map([ - ['options', { - component: withStateFrom(optionList$, OptionManagement), - fieldOptions: {}, - }], -]); diff --git a/src/config/field-overrides/predictor.js b/src/config/field-overrides/predictor.js index 91b7b65ee..2a9680c5b 100644 --- a/src/config/field-overrides/predictor.js +++ b/src/config/field-overrides/predictor.js @@ -1,4 +1,3 @@ -import { SELECT } from '../../forms/fields'; import ExpressionManager from 'd2-ui/lib/expression-manager/ExpressionManager'; import Store from 'd2-ui/lib/store/Store'; import Action from 'd2-ui/lib/action/Action'; diff --git a/src/config/field-overrides/program-indicator/CollapsibleList.js b/src/config/field-overrides/program-indicator/CollapsibleList.js index 920743613..465cfeb55 100644 --- a/src/config/field-overrides/program-indicator/CollapsibleList.js +++ b/src/config/field-overrides/program-indicator/CollapsibleList.js @@ -1,3 +1,4 @@ +import React from 'react'; import TreeView from 'd2-ui/lib/tree-view/TreeView.component'; import withState from 'recompose/withState'; diff --git a/src/config/field-overrides/program-rules/programRuleActionDialog.component.js b/src/config/field-overrides/program-rules/programRuleActionDialog.component.js index e9c32f5b8..8debb8296 100644 --- a/src/config/field-overrides/program-rules/programRuleActionDialog.component.js +++ b/src/config/field-overrides/program-rules/programRuleActionDialog.component.js @@ -211,8 +211,9 @@ class ProgramRuleActionDialog extends React.Component { } update(fieldName, value) { - this.state.programRuleAction[fieldName] = value; const ruleAction = this.state.programRuleAction; + ruleAction[fieldName] = value; + //Fetch options for dataElement and trackedEntityAttribute if (shouldFilterOnOptionSet(ruleAction) && ['dataElement', 'trackedEntityAttribute'].includes(fieldName)) { if(shouldLoadOptions(ruleAction)) { @@ -224,7 +225,7 @@ class ProgramRuleActionDialog extends React.Component { } this.setState({ - programRuleAction: this.state.programRuleAction, + programRuleAction: ruleAction, }); } diff --git a/src/config/field-overrides/programNotificationTemplate.js b/src/config/field-overrides/programNotificationTemplate.js index 1152a3446..49762260c 100644 --- a/src/config/field-overrides/programNotificationTemplate.js +++ b/src/config/field-overrides/programNotificationTemplate.js @@ -102,7 +102,7 @@ const DataElementDropDown = compose( connect(undefined, boundOnUpdate), )((props) => { const dataElementOpts = props.dataElements - .filter(de => de.valueType == 'PHONE_NUMBER') + .filter(de => de.valueType === 'PHONE_NUMBER') .map(de => ({ text: de.displayName, value: de.id, diff --git a/src/config/field-overrides/programRuleVariable.js b/src/config/field-overrides/programRuleVariable.js index 022bbf947..285f322f6 100644 --- a/src/config/field-overrides/programRuleVariable.js +++ b/src/config/field-overrides/programRuleVariable.js @@ -1,5 +1,3 @@ -import React from 'react'; -import { getInstance } from 'd2/lib/d2'; import DropDownAsyncGetter from '../../forms/form-fields/drop-down-async-getter'; @@ -77,7 +75,7 @@ export default new Map([ validators: [{ message: 'this_field_can_only_contain_letters_numbers_space_dash_dot_and_underscore', validator(value) { - return /^[\w _.\-]+$/gim.test(value); + return /^[\w _.-]+$/gim.test(value); }, }], }], diff --git a/src/config/field-overrides/validation-notification-template/SubjectAndMessageTemplateFields.js b/src/config/field-overrides/validation-notification-template/SubjectAndMessageTemplateFields.js index 21c7d7187..193ae103a 100644 --- a/src/config/field-overrides/validation-notification-template/SubjectAndMessageTemplateFields.js +++ b/src/config/field-overrides/validation-notification-template/SubjectAndMessageTemplateFields.js @@ -1,7 +1,5 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; -import { map, compose } from 'lodash/fp'; - import Row from 'd2-ui/lib/layout/Row.component'; import Column from 'd2-ui/lib/layout/Column.component'; import Divider from 'material-ui/Divider'; diff --git a/src/config/field-overrides/validation-notification-template/VariableList.js b/src/config/field-overrides/validation-notification-template/VariableList.js index dd06d3f7f..940c570c4 100644 --- a/src/config/field-overrides/validation-notification-template/VariableList.js +++ b/src/config/field-overrides/validation-notification-template/VariableList.js @@ -1,7 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { map, compose } from 'lodash/fp'; - import { List, ListItem } from 'material-ui/List'; import Heading from 'd2-ui/lib/headings/Heading.component'; diff --git a/src/config/field-overrides/validationNotificationTemplate.js b/src/config/field-overrides/validationNotificationTemplate.js index 808980ea3..eb1871d45 100644 --- a/src/config/field-overrides/validationNotificationTemplate.js +++ b/src/config/field-overrides/validationNotificationTemplate.js @@ -1,4 +1,3 @@ -import React, { PropTypes } from 'react'; import withProps from 'recompose/withProps'; import mapProps from 'recompose/mapProps'; import compose from 'recompose/compose'; @@ -21,7 +20,6 @@ const VALIDATION_RULE_VARIABLES = [ ]; const toVariableType = name => ['V', name]; -const toAttributeType = name => ['A', name]; const ValidationNotificationSubjectAndMessageTemplateFields = compose( withProps({ diff --git a/src/forms/form-fields/attribute-row.js b/src/forms/form-fields/attribute-row.js index e9247103f..1928e660c 100644 --- a/src/forms/form-fields/attribute-row.js +++ b/src/forms/form-fields/attribute-row.js @@ -2,7 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import pure from 'recompose/pure'; -import { get, getOr, __ } from 'lodash/fp'; +import { getOr, __ } from 'lodash/fp'; import { TableRow, TableRowColumn, Checkbox } from 'material-ui'; import RenderTypeSelectField, { diff --git a/src/maintenance.js b/src/maintenance.js index cb1b4e592..58c3f0498 100644 --- a/src/maintenance.js +++ b/src/maintenance.js @@ -1,7 +1,3 @@ -const dhisDevConfig = DHIS_CONFIG; // eslint-disable-line - -Error.stackTraceLimit = Infinity; - import React from 'react'; import { render } from 'react-dom'; import { init, config, getUserSettings, getManifest } from 'd2/lib/d2'; @@ -17,6 +13,10 @@ import systemSettingsStore from './App/systemSettingsStore'; import rxjsconfig from 'recompose/rxjsObservableConfig'; import setObservableConfig from 'recompose/setObservableConfig'; import periodTypeStore from './App/periodTypeStore'; + +const dhisDevConfig = DHIS_CONFIG; // eslint-disable-line + +Error.stackTraceLimit = Infinity; setObservableConfig(rxjsconfig); if (process.env.NODE_ENV !== 'production') { diff --git a/src/react-with-touch.js b/src/react-with-touch.js index a83318761..f646041fe 100644 --- a/src/react-with-touch.js +++ b/src/react-with-touch.js @@ -1,5 +1,12 @@ import React from 'react'; import ReactDOM from 'react-dom'; +// react-addons-shallow-compare@0 react-addons-linked-state-mixin@0 react-addons-create-fragment@0 react-addons-clone-with-props@0 + +// Needed for onTouchTap +// Can go away when react 1.0 release +// Check this repo: +// https://github.com/zilverline/react-tap-event-plugin +import injectTapEventPlugin from 'react-tap-event-plugin'; React.addons = { update: require('react-addons-update'), @@ -11,13 +18,6 @@ React.addons = { ShallowCompare: require('react-addons-shallow-compare'), cloneWithProps: require('react-addons-clone-with-props'), }; -// react-addons-shallow-compare@0 react-addons-linked-state-mixin@0 react-addons-create-fragment@0 react-addons-clone-with-props@0 - -// Needed for onTouchTap -// Can go away when react 1.0 release -// Check this repo: -// https://github.com/zilverline/react-tap-event-plugin -import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin(); diff --git a/src/utils/LoadableComponent.js b/src/utils/LoadableComponent.js index 0111fe4b6..016abc170 100644 --- a/src/utils/LoadableComponent.js +++ b/src/utils/LoadableComponent.js @@ -59,6 +59,7 @@ export const LoadableWithLoaders = (loadableOpts, loaders, loaderOpts = {}) => { // Start loading the component instead of waiting for loaders to resolve LoadedComponent.preload(); if (typeof loaders === 'function') { + // eslint-disable-next-line no-param-reassign loaders = [loaders]; } } diff --git a/yarn.lock b/yarn.lock index a410daf1c..26460d758 100644 --- a/yarn.lock +++ b/yarn.lock @@ -149,21 +149,17 @@ acorn-globals@^4.1.0: dependencies: acorn "^5.0.0" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +acorn-jsx@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" dependencies: - acorn "^3.0.4" - -acorn@^3.0.4: - version "3.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" + acorn "^5.0.3" acorn@^4.0.3: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.2.1, acorn@^5.3.0, acorn@^5.5.0: +acorn@^5.0.0, acorn@^5.0.3, acorn@^5.2.1, acorn@^5.3.0, acorn@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" @@ -171,9 +167,9 @@ ajv-keywords@^1.1.1: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" -ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" +ajv-keywords@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" ajv@^4.7.0, ajv@^4.9.1: version "4.11.8" @@ -182,7 +178,7 @@ ajv@^4.7.0, ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: +ajv@^5.1.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -191,6 +187,15 @@ ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" +ajv@^6.0.1, ajv@^6.5.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.1" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -480,7 +485,7 @@ babel-cli@^6.26.0: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -1504,7 +1509,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1630,7 +1635,7 @@ chain-function@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc" -chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1817,10 +1822,6 @@ coa@~1.0.1: dependencies: q "^1.1.2" -coalescy@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/coalescy/-/coalescy-1.0.0.tgz#4b065846b836361ada6c4b4a4abf4bc1cac31bf1" - code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" @@ -1938,15 +1939,6 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - connect-history-api-fallback@^1.3.0: version "1.5.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" @@ -2055,7 +2047,7 @@ cross-spawn@^4: lru-cache "^4.0.1" which "^1.2.9" -cross-spawn@^5.0.1, cross-spawn@^5.1.0: +cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -2063,6 +2055,16 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -2744,7 +2746,7 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: +es-abstract@^1.10.0, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: version "1.12.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: @@ -2781,40 +2783,15 @@ escodegen@^1.9.0: optionalDependencies: source-map "~0.6.1" -eslint-config-airbnb-base@^11.3.0: - version "11.3.2" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.3.2.tgz#8703b11abe3c88ac7ec2b745b7fdf52e00ae680a" - dependencies: - eslint-restricted-globals "^0.1.1" - -eslint-config-airbnb@^15.1.0: - version "15.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-15.1.0.tgz#fd432965a906e30139001ba830f58f73aeddae8e" +eslint-config-prettier@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3" dependencies: - eslint-config-airbnb-base "^11.3.0" + get-stdin "^5.0.1" -eslint-config-dhis2@3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/eslint-config-dhis2/-/eslint-config-dhis2-3.0.7.tgz#efd61d6bea3f7a01af98ba3ff1b66509104d5b28" - dependencies: - eslint "^4.6.1" - eslint-config-airbnb "^15.1.0" - eslint-friendly-formatter "^3.0.0" - eslint-plugin-import "2.7.0" - eslint-plugin-jsx-a11y "^5.1.1" - eslint-plugin-react "^7.3.0" - shelljs "^0.7.8" - strip-json-comments "2.0.1" - -eslint-friendly-formatter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-friendly-formatter/-/eslint-friendly-formatter-3.0.0.tgz#278874435a6c46ec1d94fa0b1ff494e30ef04290" - dependencies: - chalk "^1.0.0" - coalescy "1.0.0" - extend "^3.0.0" - minimist "^1.2.0" - text-table "^0.2.0" +eslint-config-react-app@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-2.1.0.tgz#23c909f71cbaff76b945b831d2d814b8bde169eb" eslint-import-resolver-node@^0.3.1: version "0.3.2" @@ -2823,29 +2800,35 @@ eslint-import-resolver-node@^0.3.1: debug "^2.6.9" resolve "^1.5.0" -eslint-module-utils@^2.1.1: +eslint-module-utils@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.2.0.tgz#b270362cd88b1a48ad308976ce7fa54e98411746" dependencies: debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-import@2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f" +eslint-plugin-flowtype@^2.49.3: + version "2.49.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.49.3.tgz#ccca6ee5ba2027eb3ed36bc2ec8c9a842feee841" + dependencies: + lodash "^4.17.10" + +eslint-plugin-import@^2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.13.0.tgz#df24f241175e312d91662dc91ca84064caec14ed" dependencies: - builtin-modules "^1.1.1" contains-path "^0.1.0" debug "^2.6.8" doctrine "1.5.0" eslint-import-resolver-node "^0.3.1" - eslint-module-utils "^2.1.1" + eslint-module-utils "^2.2.0" has "^1.0.1" - lodash.cond "^4.3.0" + lodash "^4.17.4" minimatch "^3.0.3" read-pkg-up "^2.0.0" + resolve "^1.6.0" -eslint-plugin-jsx-a11y@^5.1.1: +eslint-plugin-jsx-a11y@^5.0.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-5.1.1.tgz#5c96bb5186ca14e94db1095ff59b3e2bd94069b1" dependencies: @@ -2857,7 +2840,7 @@ eslint-plugin-jsx-a11y@^5.1.1: emoji-regex "^6.1.0" jsx-ast-utils "^1.4.0" -eslint-plugin-react@^7.3.0: +eslint-plugin-react@^7.10.0: version "7.10.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.10.0.tgz#af5c1fef31c4704db02098f9be18202993828b50" dependencies: @@ -2866,11 +2849,14 @@ eslint-plugin-react@^7.3.0: jsx-ast-utils "^2.0.1" prop-types "^15.6.2" -eslint-restricted-globals@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" +eslint-scope@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" -eslint-scope@^3.7.1, eslint-scope@~3.7.1: +eslint-scope@~3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: @@ -2881,55 +2867,55 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.6.1: - version "4.19.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" +eslint@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.0.1.tgz#109b90ab7f7a736f54e0f341c8bb9d09777494c3" dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" + ajv "^6.5.0" + babel-code-frame "^6.26.0" chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" + cross-spawn "^6.0.5" debug "^3.1.0" doctrine "^2.1.0" - eslint-scope "^3.7.1" + eslint-scope "^4.0.0" eslint-visitor-keys "^1.0.0" - espree "^3.5.4" - esquery "^1.0.0" + espree "^4.0.0" + esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" glob "^7.1.2" - globals "^11.0.1" + globals "^11.5.0" ignore "^3.3.3" imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" + inquirer "^5.2.0" + is-resolvable "^1.1.0" + js-yaml "^3.11.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" + lodash "^4.17.5" + minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" - regexpp "^1.0.1" + regexpp "^1.1.0" require-uncached "^1.0.3" - semver "^5.3.0" + semver "^5.5.0" + string.prototype.matchall "^2.0.0" strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "4.0.2" - text-table "~0.2.0" + strip-json-comments "^2.0.1" + table "^4.0.3" + text-table "^0.2.0" -espree@^3.5.4: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" +espree@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" + acorn "^5.6.0" + acorn-jsx "^4.1.1" esprima-fb@^15001.1.0-dev-harmony-fb: version "15001.1.0-dev-harmony-fb" @@ -2947,7 +2933,7 @@ esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -esquery@^1.0.0: +esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" dependencies: @@ -3097,11 +3083,11 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: +extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" -external-editor@^2.0.4: +external-editor@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" dependencies: @@ -3140,6 +3126,10 @@ fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3455,6 +3445,10 @@ get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" @@ -3528,7 +3522,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, gl once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.0.1, globals@^11.1.0: +globals@^11.1.0, globals@^11.5.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" @@ -3983,21 +3977,20 @@ inline-style-prefixer@^3.0.2, inline-style-prefixer@^3.0.8: bowser "^1.7.3" css-in-js-utils "^2.0.0" -inquirer@^3.0.6: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" +inquirer@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.0.4" + external-editor "^2.1.0" figures "^2.0.0" lodash "^4.3.0" mute-stream "0.0.7" run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" + rxjs "^5.5.2" string-width "^2.1.0" strip-ansi "^4.0.0" through "^2.3.6" @@ -4266,7 +4259,7 @@ is-regex@^1.0.4: dependencies: has "^1.0.1" -is-resolvable@^1.0.0: +is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -4727,7 +4720,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.7.0, js-yaml@^3.9.1: +js-yaml@^3.11.0, js-yaml@^3.7.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: @@ -4832,6 +4825,10 @@ json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -5033,10 +5030,6 @@ lodash.clonedeep@^4.3.2: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" -lodash.cond@^4.3.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -5541,6 +5534,10 @@ neo-async@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" +nice-try@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" @@ -6084,7 +6081,7 @@ path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" -path-key@^2.0.0: +path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -6442,6 +6439,10 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +prettier@^1.13.7: + version "1.13.7" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281" + pretty-error@^2.0.2: version "2.1.1" resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3" @@ -6864,7 +6865,7 @@ readable-stream@1.1: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6: +readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -6904,12 +6905,6 @@ recast@^0.11.17: private "~0.1.5" source-map "~0.5.0" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - recompose@^0.23.0, recompose@^0.23.1: version "0.23.5" resolved "https://registry.yarnpkg.com/recompose/-/recompose-0.23.5.tgz#72ac8261246bec378235d187467d02a721e8b1de" @@ -7003,7 +6998,13 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^1.0.1: +regexp.prototype.flags@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" + dependencies: + define-properties "^1.1.2" + +regexpp@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" @@ -7207,7 +7208,7 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.5.0: +resolve@^1.5.0, resolve@^1.6.0: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: @@ -7260,17 +7261,7 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" - dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" - -rxjs@^5.2.0, rxjs@^5.5.7: +rxjs@^5.2.0, rxjs@^5.5.2, rxjs@^5.5.7: version "5.5.11" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" dependencies: @@ -7349,7 +7340,7 @@ selfsigned@^1.9.1: dependencies: node-forge "0.7.5" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -7463,14 +7454,6 @@ shelljs@0.3.x: version "0.3.0" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.3.0.tgz#3596e6307a781544f591f37da618360f31db57b1" -shelljs@^0.7.8: - version "0.7.8" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" @@ -7756,6 +7739,16 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string.prototype.matchall@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz#2af8fe3d2d6dc53ca2a59bd376b089c3c152b3c8" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" + has-symbols "^1.0.0" + regexp.prototype.flags "^1.2.0" + string_decoder@^1.0.0, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -7806,7 +7799,7 @@ strip-json-comments@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -7856,12 +7849,12 @@ symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" +table@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" dependencies: - ajv "^5.2.3" - ajv-keywords "^2.1.0" + ajv "^6.0.1" + ajv-keywords "^3.0.0" chalk "^2.1.0" lodash "^4.17.4" slice-ansi "1.0.0" @@ -7928,7 +7921,7 @@ test-exclude@^4.2.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-table@^0.2.0, text-table@~0.2.0: +text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -8074,10 +8067,6 @@ type-is@~1.6.15, type-is@~1.6.16: media-typer "0.3.0" mime-types "~2.1.18" -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - ua-parser-js@^0.7.18, ua-parser-js@^0.7.9: version "0.7.18" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" @@ -8160,6 +8149,12 @@ upper-case@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" +uri-js@^4.2.1: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + dependencies: + punycode "^2.1.0" + urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"