From 464863acd6200a42fba52e107e7e31e4c5c20819 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Jun 2017 21:35:55 +0100 Subject: [PATCH] remove unused imports Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/CallMediaHandler.js | 1 - src/MatrixClientPeg.js | 1 - src/Rooms.js | 1 - src/autocomplete/Components.js | 1 - src/autocomplete/UserProvider.js | 1 - src/components/structures/CreateRoom.js | 1 - src/components/structures/InteractiveAuth.js | 2 -- src/components/structures/RoomStatusBar.js | 1 - src/components/structures/login/Login.js | 1 - src/components/structures/login/Registration.js | 2 -- src/components/views/dialogs/ChatInviteDialog.js | 3 --- src/components/views/dialogs/InteractiveAuthDialog.js | 2 -- src/components/views/dialogs/UnknownDeviceDialog.js | 1 - src/components/views/elements/AddressTile.js | 2 -- src/components/views/elements/LanguageDropdown.js | 1 - src/components/views/login/PasswordLogin.js | 1 - src/components/views/messages/MAudioBody.js | 1 - src/components/views/messages/MFileBody.js | 1 - src/components/views/messages/MVideoBody.js | 2 -- src/components/views/rooms/Autocomplete.js | 2 +- src/components/views/rooms/MessageComposerInput.js | 1 - src/components/views/rooms/PresenceLabel.js | 2 -- src/index.js | 2 -- src/languageHandler.js | 1 - 24 files changed, 1 insertion(+), 33 deletions(-) diff --git a/src/CallMediaHandler.js b/src/CallMediaHandler.js index 45ca5dc30d..839b496845 100644 --- a/src/CallMediaHandler.js +++ b/src/CallMediaHandler.js @@ -16,7 +16,6 @@ import UserSettingsStore from './UserSettingsStore'; import * as Matrix from 'matrix-js-sdk'; -import q from 'q'; export default { getDevices: function() { diff --git a/src/MatrixClientPeg.js b/src/MatrixClientPeg.js index 452b67c4ee..94e55a8d8a 100644 --- a/src/MatrixClientPeg.js +++ b/src/MatrixClientPeg.js @@ -16,7 +16,6 @@ limitations under the License. 'use strict'; -import q from "q"; import Matrix from 'matrix-js-sdk'; import utils from 'matrix-js-sdk/lib/utils'; import EventTimeline from 'matrix-js-sdk/lib/models/event-timeline'; diff --git a/src/Rooms.js b/src/Rooms.js index 08fa7f797f..16b5ab9ee2 100644 --- a/src/Rooms.js +++ b/src/Rooms.js @@ -15,7 +15,6 @@ limitations under the License. */ import MatrixClientPeg from './MatrixClientPeg'; -import DMRoomMap from './utils/DMRoomMap'; import q from 'q'; /** diff --git a/src/autocomplete/Components.js b/src/autocomplete/Components.js index b26a217ec6..0f0399cf7d 100644 --- a/src/autocomplete/Components.js +++ b/src/autocomplete/Components.js @@ -15,7 +15,6 @@ limitations under the License. */ import React from 'react'; -import ReactDOM from 'react-dom'; import classNames from 'classnames'; /* These were earlier stateless functional components but had to be converted diff --git a/src/autocomplete/UserProvider.js b/src/autocomplete/UserProvider.js index fedebb3618..809fec94be 100644 --- a/src/autocomplete/UserProvider.js +++ b/src/autocomplete/UserProvider.js @@ -18,7 +18,6 @@ limitations under the License. import React from 'react'; import { _t } from '../languageHandler'; import AutocompleteProvider from './AutocompleteProvider'; -import Q from 'q'; import Fuse from 'fuse.js'; import {PillCompletion} from './Components'; import sdk from '../index'; diff --git a/src/components/structures/CreateRoom.js b/src/components/structures/CreateRoom.js index 8b3d035dc1..0a4a30d24a 100644 --- a/src/components/structures/CreateRoom.js +++ b/src/components/structures/CreateRoom.js @@ -17,7 +17,6 @@ limitations under the License. 'use strict'; import React from 'react'; -import q from 'q'; import { _t } from '../../languageHandler'; import sdk from '../../index'; import MatrixClientPeg from '../../MatrixClientPeg'; diff --git a/src/components/structures/InteractiveAuth.js b/src/components/structures/InteractiveAuth.js index 7c8a5b8065..dee8400a08 100644 --- a/src/components/structures/InteractiveAuth.js +++ b/src/components/structures/InteractiveAuth.js @@ -19,8 +19,6 @@ const InteractiveAuth = Matrix.InteractiveAuth; import React from 'react'; -import sdk from '../../index'; - import {getEntryComponentForLoginType} from '../views/login/InteractiveAuthEntryComponents'; export default React.createClass({ diff --git a/src/components/structures/RoomStatusBar.js b/src/components/structures/RoomStatusBar.js index 5a9592243a..f8a3d340b7 100644 --- a/src/components/structures/RoomStatusBar.js +++ b/src/components/structures/RoomStatusBar.js @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import { _t } from '../../languageHandler'; import sdk from '../../index'; -import dis from '../../dispatcher'; import WhoIsTyping from '../../WhoIsTyping'; import MatrixClientPeg from '../../MatrixClientPeg'; import MemberAvatar from '../views/avatars/MemberAvatar'; diff --git a/src/components/structures/login/Login.js b/src/components/structures/login/Login.js index 8848a33deb..a15068e058 100644 --- a/src/components/structures/login/Login.js +++ b/src/components/structures/login/Login.js @@ -19,7 +19,6 @@ limitations under the License. import React from 'react'; import { _t, _tJsx } from '../../../languageHandler'; -import ReactDOM from 'react-dom'; import sdk from '../../../index'; import Login from '../../../Login'; diff --git a/src/components/structures/login/Registration.js b/src/components/structures/login/Registration.js index d9b7c46b6b..85fb18f13b 100644 --- a/src/components/structures/login/Registration.js +++ b/src/components/structures/login/Registration.js @@ -21,11 +21,9 @@ import q from 'q'; import React from 'react'; import sdk from '../../../index'; -import dis from '../../../dispatcher'; import ServerConfig from '../../views/login/ServerConfig'; import MatrixClientPeg from '../../../MatrixClientPeg'; import RegistrationForm from '../../views/login/RegistrationForm'; -import CaptchaForm from '../../views/login/CaptchaForm'; import RtsClient from '../../../RtsClient'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/dialogs/ChatInviteDialog.js b/src/components/views/dialogs/ChatInviteDialog.js index 7dd5b05041..cd294a123d 100644 --- a/src/components/views/dialogs/ChatInviteDialog.js +++ b/src/components/views/dialogs/ChatInviteDialog.js @@ -15,15 +15,12 @@ limitations under the License. */ import React from 'react'; -import classNames from 'classnames'; import { _t } from '../../../languageHandler'; import sdk from '../../../index'; import { getAddressType, inviteMultipleToRoom } from '../../../Invite'; import createRoom from '../../../createRoom'; import MatrixClientPeg from '../../../MatrixClientPeg'; import DMRoomMap from '../../../utils/DMRoomMap'; -import rate_limited_func from '../../../ratelimitedfunc'; -import dis from '../../../dispatcher'; import Modal from '../../../Modal'; import AccessibleButton from '../elements/AccessibleButton'; import q from 'q'; diff --git a/src/components/views/dialogs/InteractiveAuthDialog.js b/src/components/views/dialogs/InteractiveAuthDialog.js index 51561270c4..945e0a9d69 100644 --- a/src/components/views/dialogs/InteractiveAuthDialog.js +++ b/src/components/views/dialogs/InteractiveAuthDialog.js @@ -15,8 +15,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import Matrix from 'matrix-js-sdk'; - import React from 'react'; import sdk from '../../../index'; diff --git a/src/components/views/dialogs/UnknownDeviceDialog.js b/src/components/views/dialogs/UnknownDeviceDialog.js index 9ffad5d32a..8f91b84519 100644 --- a/src/components/views/dialogs/UnknownDeviceDialog.js +++ b/src/components/views/dialogs/UnknownDeviceDialog.js @@ -16,7 +16,6 @@ limitations under the License. import React from 'react'; import sdk from '../../../index'; -import dis from '../../../dispatcher'; import MatrixClientPeg from '../../../MatrixClientPeg'; import GeminiScrollbar from 'react-gemini-scrollbar'; import Resend from '../../../Resend'; diff --git a/src/components/views/elements/AddressTile.js b/src/components/views/elements/AddressTile.js index 33cc7f9923..78fd942a46 100644 --- a/src/components/views/elements/AddressTile.js +++ b/src/components/views/elements/AddressTile.js @@ -19,9 +19,7 @@ limitations under the License. import React from 'react'; import classNames from 'classnames'; import sdk from "../../../index"; -import Invite from "../../../Invite"; import MatrixClientPeg from "../../../MatrixClientPeg"; -import Avatar from '../../../Avatar'; import { _t } from '../../../languageHandler'; // React PropType definition for an object describing diff --git a/src/components/views/elements/LanguageDropdown.js b/src/components/views/elements/LanguageDropdown.js index 49f89aa469..c5ed1f8942 100644 --- a/src/components/views/elements/LanguageDropdown.js +++ b/src/components/views/elements/LanguageDropdown.js @@ -19,7 +19,6 @@ import React from 'react'; import sdk from '../../../index'; import UserSettingsStore from '../../../UserSettingsStore'; -import { _t } from '../../../languageHandler'; import * as languageHandler from '../../../languageHandler'; function languageMatchesSearchQuery(query, language) { diff --git a/src/components/views/login/PasswordLogin.js b/src/components/views/login/PasswordLogin.js index 972516b553..46a48d14a0 100644 --- a/src/components/views/login/PasswordLogin.js +++ b/src/components/views/login/PasswordLogin.js @@ -16,7 +16,6 @@ limitations under the License. */ import React from 'react'; -import ReactDOM from 'react-dom'; import classNames from 'classnames'; import sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/MAudioBody.js b/src/components/views/messages/MAudioBody.js index 0b6214b9bf..52c1341e60 100644 --- a/src/components/views/messages/MAudioBody.js +++ b/src/components/views/messages/MAudioBody.js @@ -20,7 +20,6 @@ import React from 'react'; import MFileBody from './MFileBody'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; import { decryptFile, readBlobAsDataUri } from '../../../utils/DecryptFile'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/MFileBody.js b/src/components/views/messages/MFileBody.js index 1bb9464999..bccae923eb 100644 --- a/src/components/views/messages/MFileBody.js +++ b/src/components/views/messages/MFileBody.js @@ -24,7 +24,6 @@ import { _t } from '../../../languageHandler'; import {decryptFile} from '../../../utils/DecryptFile'; import Tinter from '../../../Tinter'; import request from 'browser-request'; -import q from 'q'; import Modal from '../../../Modal'; diff --git a/src/components/views/messages/MVideoBody.js b/src/components/views/messages/MVideoBody.js index 8caf9d8f96..46d8366592 100644 --- a/src/components/views/messages/MVideoBody.js +++ b/src/components/views/messages/MVideoBody.js @@ -19,8 +19,6 @@ limitations under the License. import React from 'react'; import MFileBody from './MFileBody'; import MatrixClientPeg from '../../../MatrixClientPeg'; -import Model from '../../../Modal'; -import sdk from '../../../index'; import { decryptFile, readBlobAsDataUri } from '../../../utils/DecryptFile'; import q from 'q'; import UserSettingsStore from '../../../UserSettingsStore'; diff --git a/src/components/views/rooms/Autocomplete.js b/src/components/views/rooms/Autocomplete.js index 9be91e068a..5f6bac0007 100644 --- a/src/components/views/rooms/Autocomplete.js +++ b/src/components/views/rooms/Autocomplete.js @@ -4,7 +4,7 @@ import classNames from 'classnames'; import flatMap from 'lodash/flatMap'; import isEqual from 'lodash/isEqual'; import sdk from '../../../index'; -import type {Completion, SelectionRange} from '../../../autocomplete/Autocompleter'; +import type {Completion} from '../../../autocomplete/Autocompleter'; import Q from 'q'; import {getCompletions} from '../../../autocomplete/Autocompleter'; diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 65148f91ef..d3010044e5 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -33,7 +33,6 @@ import sdk from '../../../index'; import { _t } from '../../../languageHandler'; import dis from '../../../dispatcher'; -import KeyCode from '../../../KeyCode'; import UserSettingsStore from '../../../UserSettingsStore'; import * as RichText from '../../../RichText'; diff --git a/src/components/views/rooms/PresenceLabel.js b/src/components/views/rooms/PresenceLabel.js index b79de2b21c..47a723f5cd 100644 --- a/src/components/views/rooms/PresenceLabel.js +++ b/src/components/views/rooms/PresenceLabel.js @@ -18,8 +18,6 @@ limitations under the License. import React from 'react'; -import MatrixClientPeg from '../../../MatrixClientPeg'; -import sdk from '../../../index'; import { _t } from '../../../languageHandler'; diff --git a/src/index.js b/src/index.js index 03b854a112..7d0547d9c9 100644 --- a/src/index.js +++ b/src/index.js @@ -15,8 +15,6 @@ limitations under the License. */ import Skinner from './Skinner'; -import request from 'browser-request'; -import UserSettingsStore from './UserSettingsStore'; module.exports.loadSkin = function(skinObject) { Skinner.load(skinObject); diff --git a/src/languageHandler.js b/src/languageHandler.js index 798798b6e5..0e8b08018f 100644 --- a/src/languageHandler.js +++ b/src/languageHandler.js @@ -18,7 +18,6 @@ limitations under the License. import request from 'browser-request'; import counterpart from 'counterpart'; import q from 'q'; -import sanitizeHtml from "sanitize-html"; import UserSettingsStore from './UserSettingsStore';