Enable brace-style eslint rules

This commit is contained in:
jamiebuilds-signal 2022-09-13 14:48:09 -07:00 committed by GitHub
parent 73bdcdfd0a
commit 5a8f484a03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 54 additions and 13 deletions

View file

@ -119,7 +119,9 @@ export class EmojiCompletion {
const range = this.quill.getSelection();
if (!range) return PASS_THROUGH;
if (!range) {
return PASS_THROUGH;
}
const [blot, index] = this.quill.getLeaf(range.index);
const [leftTokenTextMatch, rightTokenTextMatch] = matchBlotTextPartitions(
@ -200,14 +202,18 @@ export class EmojiCompletion {
completeEmoji(): void {
const range = this.quill.getSelection();
if (range === null) return;
if (range === null) {
return;
}
const emoji = this.results[this.index];
const [leafText] = this.getCurrentLeafTextPartitions();
const tokenTextMatch = /:([-+0-9a-z_]*)(:?)$/.exec(leafText);
if (tokenTextMatch === null) return;
if (tokenTextMatch === null) {
return;
}
const [, tokenText] = tokenTextMatch;

View file

@ -151,7 +151,9 @@ export class MentionCompletion {
const range = this.quill.getSelection();
if (range === null) return;
if (range === null) {
return;
}
const member = this.results[resultIndex];