From 8e4a483fb7d1ebdfc950c1cc456ae2d4bd558147 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 18 Apr 2020 20:52:31 +0300 Subject: style: fix remaining errors --- src/lib/Markdown/Section.tsx | 2 +- src/lib/Markdown/SyntacticSpan.tsx | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/Markdown/Section.tsx b/src/lib/Markdown/Section.tsx index f554062..fc208b1 100644 --- a/src/lib/Markdown/Section.tsx +++ b/src/lib/Markdown/Section.tsx @@ -11,7 +11,7 @@ interface PropTypes extends ParserPropTypes { const getHeaderLevel = (header: string): number => { if (!header) return 0; let level = 0; - while (header[level] === '#') level++; + while (header[level] === '#') level += 1; return level; }; diff --git a/src/lib/Markdown/SyntacticSpan.tsx b/src/lib/Markdown/SyntacticSpan.tsx index bdce3f7..11cc024 100644 --- a/src/lib/Markdown/SyntacticSpan.tsx +++ b/src/lib/Markdown/SyntacticSpan.tsx @@ -28,6 +28,7 @@ const regex: Record = { local: /!?\[(.*\]?.*)\]\((.+?)\)/, }, rawLink: { + // eslint-disable-next-line max-len global: /((?:(?:[A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www\.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)(?:(?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[.!/\\\w]*))?)/, local: /&^/, }, @@ -68,7 +69,7 @@ const SyntacticSpan: React.FC = ({ span }) => { const matchEmoji = span.match(regex.emoji.local); if (matchEmoji) { - const emoji = emojiList.find(emoji => emoji.name === matchEmoji[1]); + const emoji = emojiList.find(e => e.name === matchEmoji[1]); return {emoji ? emoji.char : span}; } -- cgit v1.2.3