nicolium: enable jsx-a11y and react linter plugins, make them less strict

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-26 19:15:45 +01:00
parent 96d0bc2855
commit 2c9b492f8a
10 changed files with 31 additions and 12 deletions

View File

@@ -57,6 +57,7 @@ const ParsedMfm: React.FC<IParsedMfm> = React.memo(({ text, emojis, mentions, sp
.join('');
const genEl = (ast: mfm.MfmNode[], scale: number) =>
/* eslint-disable react/jsx-key */
ast
.map((token): React.JSX.Element | string | (React.JSX.Element | string)[] => {
switch (token.type) {

View File

@@ -218,8 +218,9 @@ const StatusContent: React.FC<IStatusContent> = React.memo(
'⁂-status-title--clamp': !expanded && lineClamp,
})}
key='spoiler'
aria-expanded={expanded}
{...(expandable ? { onClick: toggleExpanded, role: 'button' } : {})}
{...(expandable
? { onClick: toggleExpanded, role: 'button', 'aria-expanded': expanded }
: {})}
>
<span ref={spoilerNode}>
<Emojify text={spoilerText} emojis={status.emojis} />