From 81338306b051c08cc3c19cc961fc41c016b6b32f Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Sun, 19 May 2019 21:00:14 +0100 Subject: [PATCH] fix lint --- src/autocomplete/EmojiProvider.js | 5 +---- src/components/views/messages/SenderProfile.js | 1 - src/components/views/messages/TextualEvent.js | 1 - src/components/views/rooms/MessageComposerInput.js | 4 +++- src/components/views/rooms/WhoIsTypingTile.js | 1 - 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/autocomplete/EmojiProvider.js b/src/autocomplete/EmojiProvider.js index 5846d319b2..51b1a3007c 100644 --- a/src/autocomplete/EmojiProvider.js +++ b/src/autocomplete/EmojiProvider.js @@ -20,7 +20,6 @@ import React from 'react'; import { _t } from '../languageHandler'; import AutocompleteProvider from './AutocompleteProvider'; import QueryMatcher from './QueryMatcher'; -import sdk from '../index'; import {PillCompletion} from './Components'; import type {Completion, SelectionRange} from './Autocompleter'; import _uniq from 'lodash/uniq'; @@ -28,9 +27,7 @@ import _sortBy from 'lodash/sortBy'; import SettingsStore from "../settings/SettingsStore"; import { shortcodeToUnicode } from '../HtmlUtils'; -import UNICODE_REGEX from 'emojibase-regex'; import EMOTICON_REGEX from 'emojibase-regex/emoticon'; -import SHORTCODE_REGEX from 'emojibase-regex/shortcode'; import EmojiData from '../stripped-emoji.json'; const LIMIT = 20; @@ -88,7 +85,7 @@ export default class EmojiProvider extends AutocompleteProvider { let completions = []; const {command, range} = this.getCurrentCommand(query, selection); if (command) { - let matchedString = command[0]; + const matchedString = command[0]; completions = this.matcher.match(matchedString); // Do second match with shouldMatchWordsOnly in order to match against 'name' diff --git a/src/components/views/messages/SenderProfile.js b/src/components/views/messages/SenderProfile.js index 2ccf5a3315..637a56727f 100644 --- a/src/components/views/messages/SenderProfile.js +++ b/src/components/views/messages/SenderProfile.js @@ -19,7 +19,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import {MatrixClient} from 'matrix-js-sdk'; -import sdk from '../../../index'; import Flair from '../elements/Flair.js'; import FlairStore from '../../../stores/FlairStore'; import { _t } from '../../../languageHandler'; diff --git a/src/components/views/messages/TextualEvent.js b/src/components/views/messages/TextualEvent.js index c94e79f2d9..a46e6cf8ec 100644 --- a/src/components/views/messages/TextualEvent.js +++ b/src/components/views/messages/TextualEvent.js @@ -20,7 +20,6 @@ const React = require('react'); import PropTypes from 'prop-types'; const TextForEvent = require('../../../TextForEvent'); -import sdk from '../../../index'; module.exports = React.createClass({ displayName: 'TextualEvent', diff --git a/src/components/views/rooms/MessageComposerInput.js b/src/components/views/rooms/MessageComposerInput.js index 984ad2be27..df16310bda 100644 --- a/src/components/views/rooms/MessageComposerInput.js +++ b/src/components/views/rooms/MessageComposerInput.js @@ -1417,8 +1417,10 @@ export default class MessageComposerInput extends React.Component { ; } } - case 'emoji': + case 'emoji': { + const { data } = node; return data.get('emojiUnicode'); + } } }; diff --git a/src/components/views/rooms/WhoIsTypingTile.js b/src/components/views/rooms/WhoIsTypingTile.js index 08fc6d2c70..c639b205d8 100644 --- a/src/components/views/rooms/WhoIsTypingTile.js +++ b/src/components/views/rooms/WhoIsTypingTile.js @@ -17,7 +17,6 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; -import sdk from '../../../index'; import WhoIsTyping from '../../../WhoIsTyping'; import Timer from '../../../utils/Timer'; import MatrixClientPeg from '../../../MatrixClientPeg';