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

@@ -72,6 +72,7 @@ function SingleAppPage(props: PageProps) {
// privacy="https://zoom.us/privacy"
body={
<>
{/* eslint-disable-next-line react/no-danger */}
<div dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(source.content) }} />
</>
}
@@ -674,6 +674,7 @@ export default function Success(props: PageProps) {
<>
<div
className="text-emphasis mt-4 font-medium"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: markdownToSafeHTML(label),
}}
+4
View File
@@ -303,6 +303,9 @@ export default function Signup({
<>
<Script
id="gtm-init-script"
// 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: `(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });
@@ -312,6 +315,7 @@ export default function Signup({
}}
/>
<noscript
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{
__html: `<iframe src="https://www.googletagmanager.com/ns.html?id=${process.env.NEXT_PUBLIC_GTM_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe>`,
}}
+1
View File
@@ -194,6 +194,7 @@ function TeamPage({
<>
<div
className=" text-subtle break-words text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: team.safeBio }}
/>
</>
@@ -119,6 +119,7 @@ export function UserPage(props: PageProps) {
<>
<div
className=" text-subtle break-words text-sm [&_a]:text-blue-500 [&_a]:underline [&_a]:hover:text-blue-600"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: props.safeBio }}
/>
</>
@@ -257,6 +257,7 @@ export function VideoMeetingInfo(props: VideoMeetingInfo) {
<div
className="prose-sm prose prose-invert"
// eslint-disable-next-line react/no-danger
dangerouslySetInnerHTML={{ __html: markdownToSafeHTML(booking.description) }}
/>
</>