summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-09-23 12:29:54 -0400
committerGitHub <noreply@github.com>2016-09-23 12:29:54 -0400
commit93f2b6a83302ceef5c98be4fb696840608ad3bc3 (patch)
tree89e86c5983058189f032c817573bfd945491b4e7 /webapp/utils
parent214f9c13a261064733c23d762fa521444fbd7a9c (diff)
downloadchat-93f2b6a83302ceef5c98be4fb696840608ad3bc3.tar.gz
chat-93f2b6a83302ceef5c98be4fb696840608ad3bc3.tar.bz2
chat-93f2b6a83302ceef5c98be4fb696840608ad3bc3.zip
Updating ESLint (#4085)
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/channel_intro_messages.jsx6
-rw-r--r--webapp/utils/markdown.jsx2
-rw-r--r--webapp/utils/syntax_hightlighting.jsx2
-rw-r--r--webapp/utils/text_formatting.jsx6
4 files changed, 8 insertions, 8 deletions
diff --git a/webapp/utils/channel_intro_messages.jsx b/webapp/utils/channel_intro_messages.jsx
index 1d5f29f09..899e4e5a4 100644
--- a/webapp/utils/channel_intro_messages.jsx
+++ b/webapp/utils/channel_intro_messages.jsx
@@ -110,7 +110,7 @@ export function createDefaultIntroMessage(channel, centeredIntro) {
href='#'
onClick={GlobalActions.showGetTeamInviteLinkModal}
>
- <i className='fa fa-user-plus'></i>
+ <i className='fa fa-user-plus'/>
<FormattedMessage
id='intro_messages.inviteOthers'
defaultMessage='Invite others to this team'
@@ -247,7 +247,7 @@ function createInviteChannelMemberButton(channel, uiType) {
dialogType={ChannelInviteModal}
dialogProps={{channel}}
>
- <i className='fa fa-user-plus'></i>
+ <i className='fa fa-user-plus'/>
<FormattedMessage
id='intro_messages.invite'
defaultMessage='Invite others to this {type}'
@@ -266,7 +266,7 @@ function createSetHeaderButton(channel) {
dialogType={EditChannelHeaderModal}
dialogProps={{channel}}
>
- <i className='fa fa-pencil'></i>
+ <i className='fa fa-pencil'/>
<FormattedMessage
id='intro_messages.setHeader'
defaultMessage='Set a Header'
diff --git a/webapp/utils/markdown.jsx b/webapp/utils/markdown.jsx
index f6b218812..9c2eb47aa 100644
--- a/webapp/utils/markdown.jsx
+++ b/webapp/utils/markdown.jsx
@@ -232,7 +232,7 @@ function unescape(html) {
} else if (n.charAt(0) === '#') {
return n.charAt(1) === 'x' ?
String.fromCharCode(parseInt(n.substring(2), 16)) :
- String.fromCharCode(+n.substring(1));
+ String.fromCharCode(Number(n.substring(1)));
}
return '';
});
diff --git a/webapp/utils/syntax_hightlighting.jsx b/webapp/utils/syntax_hightlighting.jsx
index 4146c43c5..4db6d11e3 100644
--- a/webapp/utils/syntax_hightlighting.jsx
+++ b/webapp/utils/syntax_hightlighting.jsx
@@ -152,7 +152,7 @@ export function getLanguageFromFilename(filename) {
}
export function canHighlight(language) {
- return !!HighlightedLanguages[language.toLowerCase()];
+ return Boolean(HighlightedLanguages[language.toLowerCase()]);
}
export function getLanguageName(language) {
diff --git a/webapp/utils/text_formatting.jsx b/webapp/utils/text_formatting.jsx
index 3b96a1b42..2b0633e5c 100644
--- a/webapp/utils/text_formatting.jsx
+++ b/webapp/utils/text_formatting.jsx
@@ -154,7 +154,7 @@ const punctuation = XRegExp.cache('[^\\pL\\d]');
function autolinkAtMentions(text, tokens, usernameMap) {
// Test if provided text needs to be highlighted, special mention or current user
function mentionExists(u) {
- return (Constants.SPECIAL_MENTIONS.indexOf(u) !== -1 || !!usernameMap[u]);
+ return (Constants.SPECIAL_MENTIONS.indexOf(u) !== -1 || Boolean(usernameMap[u]));
}
function addToken(username, mention) {
@@ -206,7 +206,7 @@ function autolinkAtMentions(text, tokens, usernameMap) {
function autolinkChannelMentions(text, tokens, channelNamesMap) {
function channelMentionExists(c) {
- return !!channelNamesMap[c];
+ return Boolean(channelNamesMap[c]);
}
function addToken(channelName, mention, displayName) {
const index = tokens.size;
@@ -393,7 +393,7 @@ function parseSearchTerms(searchTerm) {
termString = termString.substring(captured[0].length);
// break the text up into words based on how the server splits them in SqlPostStore.SearchPosts and then discard empty terms
- terms.push(...captured[0].split(/[ <>+\(\)~@]/).filter((term) => !!term));
+ terms.push(...captured[0].split(/[ <>+\(\)~@]/).filter((term) => Boolean(term)));
continue;
}