chore: enable eslint rule react/no-danger (#17983)

* enable react/no-danger and disable rule all places

* remove wild rule
This commit is contained in:
Christoffer Bjelke authored and GitHub committed 2024-12-04 15:07:30 +00:00
1 parent 509fc4b289
commit a75a5b72b2
22 files changed
+43 -4

No files matched your search

+3
View File
@@ -81,6 +81,9 @@ function PageWrapper(props: AppProps) {
<Script
nonce={nonce}
id="page-status"
// It is strictly not necessary to disable, but in a future update of react/no-danger this will error.
// And we don't want it to error here anyways
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: `window.CalComPageStatus = '${pageStatus}'` }}
/>
@@ -54,6 +54,9 @@ function PageWrapper(props: PageWrapperProps) {
<Script
nonce={nonce}
id="page-status"
// It is strictly not necessary to disable, but in a future update of react/no-danger this will error.
// And we don't want it to error here anyways
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: `window.CalComPageStatus = '${pageStatus}'` }}
/>
{getLayout(
+2 -2
View File
@@ -2,7 +2,6 @@ import Link from "next/link";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
import { md } from "@calcom/lib/markdownIt";
import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
import type { TeamWithMembers } from "@calcom/lib/server/queries/teams";
import type { UserProfile } from "@calcom/types/UserProfile";
@@ -40,7 +39,8 @@ const Member = ({ member, teamName }: { member: MemberType; teamName: string | n
<>
<div
className=" text-subtle break-words text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
dangerouslySetInnerHTML={{ __html: md.render(markdownToSafeHTML(member.bio)) }}
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(member.bio) }}
/>
</>
) : (