From e793efa1ede81a1c54b9265a8f83823edf9159fd Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Mon, 8 Jan 2018 19:23:36 -0600 Subject: [PATCH] fix(lint): fix linting errors --- .eslintrc | 8 + app/components/ChannelForm/ChannelForm.js | 90 ----- app/components/ChannelForm/ChannelForm.scss | 57 ---- app/components/ChannelForm/Footer.js | 46 --- app/components/ChannelForm/Footer.scss | 17 - app/components/ChannelForm/StepFour.js | 37 --- app/components/ChannelForm/StepFour.scss | 36 -- app/components/ChannelForm/StepOne.js | 74 ----- app/components/ChannelForm/StepOne.scss | 74 ----- app/components/ChannelForm/StepThree.js | 50 --- app/components/ChannelForm/StepThree.scss | 58 ---- app/components/ChannelForm/StepTwo.js | 49 --- app/components/ChannelForm/StepTwo.scss | 58 ---- app/components/ChannelForm/index.js | 3 - app/components/Channels/Channel.js | 95 ------ app/components/Channels/Channel.scss | 125 ------- app/components/Channels/ChannelForm.js | 128 -------- app/components/Channels/ChannelForm.scss | 123 ------- app/components/Channels/ChannelModal.js | 103 ------ app/components/Channels/ChannelModal.scss | 124 ------- app/components/Channels/Channels.js | 140 -------- app/components/Channels/Channels.scss | 69 ---- .../Channels/ClosedPendingChannel.js | 69 ---- .../Channels/ClosedPendingChannel.scss | 95 ------ app/components/Channels/OpenPendingChannel.js | 72 ---- .../Channels/OpenPendingChannel.scss | 98 ------ app/components/Channels/index.js | 3 - app/components/Contacts/ClosingContact.js | 2 +- app/components/Contacts/ContactModal.js | 7 +- app/components/Contacts/ContactsForm.js | 16 +- app/components/Contacts/Donut.js | 31 -- app/components/Contacts/Donut.scss | 20 -- app/components/Contacts/LoadingContact.js | 4 +- app/components/Contacts/OfflineContact.js | 3 +- app/components/Contacts/OnlineContact.js | 3 +- app/components/Contacts/PendingContact.js | 2 +- app/components/Form/RequestForm.js | 6 +- app/components/Network/CanvasNetworkGraph.js | 1 - app/components/Peers/Peer.js | 20 -- app/components/Peers/Peer.scss | 38 --- app/components/Peers/PeerForm.js | 71 ---- app/components/Peers/PeerForm.scss | 107 ------ app/components/Peers/PeerModal.js | 80 ----- app/components/Peers/PeerModal.scss | 75 ----- app/lnd/methods/channelController.js | 21 +- app/lnd/methods/index.js | 6 +- app/lnd/methods/paymentsController.js | 4 +- app/lnd/subscribe/channelgraph.js | 5 - app/reducers/channels.js | 61 ++-- app/reducers/contactsform.js | 1 - app/reducers/lnd.js | 4 +- app/routes/contacts/components/Contacts.js | 33 +- app/store/configureStore.dev.js | 3 +- test/components/Channels.spec.js | 125 ------- test/components/Peers.spec.js | 72 ---- .../__snapshots__/balance.spec.js.snap | 33 -- .../__snapshots__/channels.spec.js.snap | 308 ------------------ test/reducers/__snapshots__/form.spec.js.snap | 13 - test/reducers/__snapshots__/info.spec.js.snap | 22 -- .../__snapshots__/invoice.spec.js.snap | 171 ---------- .../__snapshots__/payment.spec.js.snap | 49 --- .../reducers/__snapshots__/peers.spec.js.snap | 182 ----------- .../__snapshots__/ticker.spec.js.snap | 51 --- 63 files changed, 97 insertions(+), 3454 deletions(-) delete mode 100644 app/components/ChannelForm/ChannelForm.js delete mode 100644 app/components/ChannelForm/ChannelForm.scss delete mode 100644 app/components/ChannelForm/Footer.js delete mode 100644 app/components/ChannelForm/Footer.scss delete mode 100644 app/components/ChannelForm/StepFour.js delete mode 100644 app/components/ChannelForm/StepFour.scss delete mode 100644 app/components/ChannelForm/StepOne.js delete mode 100644 app/components/ChannelForm/StepOne.scss delete mode 100644 app/components/ChannelForm/StepThree.js delete mode 100644 app/components/ChannelForm/StepThree.scss delete mode 100644 app/components/ChannelForm/StepTwo.js delete mode 100644 app/components/ChannelForm/StepTwo.scss delete mode 100644 app/components/ChannelForm/index.js delete mode 100644 app/components/Channels/Channel.js delete mode 100644 app/components/Channels/Channel.scss delete mode 100644 app/components/Channels/ChannelForm.js delete mode 100644 app/components/Channels/ChannelForm.scss delete mode 100644 app/components/Channels/ChannelModal.js delete mode 100644 app/components/Channels/ChannelModal.scss delete mode 100644 app/components/Channels/Channels.js delete mode 100644 app/components/Channels/Channels.scss delete mode 100644 app/components/Channels/ClosedPendingChannel.js delete mode 100644 app/components/Channels/ClosedPendingChannel.scss delete mode 100644 app/components/Channels/OpenPendingChannel.js delete mode 100644 app/components/Channels/OpenPendingChannel.scss delete mode 100644 app/components/Channels/index.js delete mode 100644 app/components/Contacts/Donut.js delete mode 100644 app/components/Contacts/Donut.scss delete mode 100644 app/components/Peers/Peer.js delete mode 100644 app/components/Peers/Peer.scss delete mode 100644 app/components/Peers/PeerForm.js delete mode 100644 app/components/Peers/PeerForm.scss delete mode 100644 app/components/Peers/PeerModal.js delete mode 100644 app/components/Peers/PeerModal.scss delete mode 100644 test/components/Channels.spec.js delete mode 100644 test/components/Peers.spec.js delete mode 100644 test/reducers/__snapshots__/balance.spec.js.snap delete mode 100644 test/reducers/__snapshots__/channels.spec.js.snap delete mode 100644 test/reducers/__snapshots__/form.spec.js.snap delete mode 100644 test/reducers/__snapshots__/info.spec.js.snap delete mode 100644 test/reducers/__snapshots__/invoice.spec.js.snap delete mode 100644 test/reducers/__snapshots__/payment.spec.js.snap delete mode 100644 test/reducers/__snapshots__/peers.spec.js.snap delete mode 100644 test/reducers/__snapshots__/ticker.spec.js.snap diff --git a/.eslintrc b/.eslintrc index 096e0b74..be435af2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,6 +17,14 @@ "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], "jsx-a11y/no-static-element-interactions": 0, "jsx-a11y/no-noninteractive-element-interactions": 0, + "jsx-a11y/click-events-have-key-events": 0, + "jsx-a11y/label-has-for": [ 2, { + "components": [ "Label" ], + "required": { + "every": [ "id" ] + }, + "allowChildren": false + }], "react/no-array-index-key": 0, "react/forbid-prop-types": 0, "camelcase": 0, diff --git a/app/components/ChannelForm/ChannelForm.js b/app/components/ChannelForm/ChannelForm.js deleted file mode 100644 index 5b25cde0..00000000 --- a/app/components/ChannelForm/ChannelForm.js +++ /dev/null @@ -1,90 +0,0 @@ -import React from 'react' -import PropTypes from 'prop-types' -import ReactModal from 'react-modal' - -import { FaClose } from 'react-icons/lib/fa' - -import StepOne from './StepOne' -import StepTwo from './StepTwo' -import StepThree from './StepThree' -import StepFour from './StepFour' -import Footer from './Footer' - -import styles from './ChannelForm.scss' - -const ChannelForm = ({ - channelform, - openChannel, - closeChannelForm, - changeStep, - setNodeKey, - setLocalAmount, - setPushAmount, - channelFormHeader, - channelFormProgress, - stepTwoIsValid, - peers -}) => { - const renderStep = () => { - const { step } = channelform - - switch (step) { - case 1: - return - case 2: - return - case 3: - return - default: - return - } - } - - return ( - document.body} - className={styles.modal} - > -
- -
- -
-

{channelFormHeader}

-
-
- -
- {renderStep()} -
- -