nicolium: oxlint

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-24 13:40:25 +01:00
parent 3d178e87cb
commit 5ef7b1e437
4 changed files with 7 additions and 5 deletions

View File

@ -22,7 +22,8 @@
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
]
],
"no-shadow": "off"
},
"settings": {
"jsx-a11y": {

View File

@ -43,6 +43,7 @@
"no-unsafe-type-assertion": "warn",
"require-array-sort-compare": "off",
"unbound-method": "warn",
"no-shadow": "off",
"formatjs/enforce-default-message": "error",
"formatjs/enforce-id": "error",

View File

@ -6,7 +6,7 @@ import parse, {
domToReact,
type DOMNode,
} from 'html-react-parser';
import DOMPurify from 'isomorphic-dompurify';
import { sanitize } from 'isomorphic-dompurify';
import groupBy from 'lodash/groupBy';
import minBy from 'lodash/minBy';
import React from 'react';
@ -353,7 +353,7 @@ function parseContent(
};
let content = parse(
DOMPurify.sanitize(html, { ADD_ATTR: ['target'], USE_PROFILES: { html: true } }),
sanitize(html, { ADD_ATTR: ['target'], USE_PROFILES: { html: true } }),
options,
);

View File

@ -1,6 +1,6 @@
import { Link } from '@tanstack/react-router';
import clsx from 'clsx';
import DOMPurify from 'isomorphic-dompurify';
import { sanitize } from 'isomorphic-dompurify';
import {
type MediaAttachment,
type PreviewCard as CardEntity,
@ -65,7 +65,7 @@ interface IPreviewCardVideo {
const PreviewCardVideo: React.FC<IPreviewCardVideo> = React.memo(
React.forwardRef<HTMLDivElement, IPreviewCardVideo>(({ card }, ref) => {
const html = DOMPurify.sanitize(handleIframeUrl(card.html, card.url, card.provider_name), {
const html = sanitize(handleIframeUrl(card.html, card.url, card.provider_name), {
ADD_TAGS: ['iframe'],
ADD_ATTR: ['allow', 'allowfullscreen', 'referrerpolicy'],
});