mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-10 16:10:55 +00:00
eslint: unused vars, indent, const for unchanging
This commit is contained in:
parent
0a2e913f4c
commit
1e852c976d
1 changed files with 14 additions and 14 deletions
|
@ -442,14 +442,12 @@ export const Mentions = {
|
||||||
const can_highlight_user = user && user.login && user.login == msg.user.login && ! this.context.get('chat.filtering.process-own'),
|
const can_highlight_user = user && user.login && user.login == msg.user.login && ! this.context.get('chat.filtering.process-own'),
|
||||||
priority = this.context.get('chat.filtering.mention-priority');
|
priority = this.context.get('chat.filtering.mention-priority');
|
||||||
|
|
||||||
let login, display, mentionable = false;
|
let login, display = false;
|
||||||
if ( user && user.login && ! can_highlight_user ) {
|
if ( user && user.login && ! can_highlight_user ) {
|
||||||
login = user.login.toLowerCase();
|
login = user.login.toLowerCase();
|
||||||
display = user.displayName && user.displayName.toLowerCase();
|
display = user.displayName && user.displayName.toLowerCase();
|
||||||
if ( display === login )
|
if ( display === login )
|
||||||
display = null;
|
display = null;
|
||||||
|
|
||||||
mentionable = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const out = [];
|
const out = [];
|
||||||
|
@ -464,9 +462,9 @@ export const Mentions = {
|
||||||
for(const segment of token.text.split(/ +/)) {
|
for(const segment of token.text.split(/ +/)) {
|
||||||
const match = /^(@?)(\S+?)(?:\b|$)/.exec(segment);
|
const match = /^(@?)(\S+?)(?:\b|$)/.exec(segment);
|
||||||
if ( match ) {
|
if ( match ) {
|
||||||
let recipient = match[2],
|
const recipient = match[2],
|
||||||
has_at = match[1] === '@',
|
has_at = match[1] === '@';
|
||||||
mentioned = false;
|
let mentioned = false;
|
||||||
|
|
||||||
const rlower = recipient ? recipient.toLowerCase() : '',
|
const rlower = recipient ? recipient.toLowerCase() : '',
|
||||||
color = this.color_cache ? this.color_cache.get(rlower) : null;
|
color = this.color_cache ? this.color_cache.get(rlower) : null;
|
||||||
|
@ -1696,6 +1694,7 @@ export const AddonEmotes = {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whip up a special preview.
|
// Whip up a special preview.
|
||||||
|
/* eslint-disable indent -- disagrees with react/jsx-indent-props */
|
||||||
preview = (<div class="ffz-effect-tip">
|
preview = (<div class="ffz-effect-tip">
|
||||||
<img
|
<img
|
||||||
src={target.src}
|
src={target.src}
|
||||||
|
@ -1727,6 +1726,7 @@ export const AddonEmotes = {
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>);
|
</div>);
|
||||||
|
/* eslint-enable indent */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue