chore: use lint tags (#2952)

This commit is contained in:
Asher Gomez
2025-05-15 09:34:46 +02:00
committed by GitHub
parent f8d390e2c3
commit 20162f6896
8 changed files with 14 additions and 2 deletions
+1
View File
@@ -80,6 +80,7 @@
}, },
"lint": { "lint": {
"rules": { "rules": {
"tags": ["recommended", "fresh", "jsr", "jsx", "react"],
"exclude": ["no-window"], "exclude": ["no-window"],
"include": ["no-console"] "include": ["no-console"]
} }
@@ -131,7 +131,10 @@ export function ErrorOverlay(props: { url: URL }) {
return ( return (
<> <>
<div class="frsh-error-page"> <div class="frsh-error-page">
<style dangerouslySetInnerHTML={{ __html: errorCss }} /> <style
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ __html: errorCss }}
/>
<div class="inner"> <div class="inner">
<div class="header"> <div class="header">
<button <button
@@ -163,6 +166,7 @@ export function ErrorOverlay(props: { url: URL }) {
</div> </div>
</div> </div>
<script <script
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: __html:
`document.querySelector("#close-btn").addEventListener("click", () => parent.postMessage("close-error-overlay"));`, `document.querySelector("#close-btn").addEventListener("click", () => parent.postMessage("close-error-overlay"));`,
+2
View File
@@ -452,6 +452,7 @@ function FreshRuntimeScript() {
<script <script
id={`__FRSH_STATE_${partialId}`} id={`__FRSH_STATE_${partialId}`}
type="application/json" type="application/json"
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ __html: JSON.stringify(json) }} dangerouslySetInnerHTML={{ __html: JSON.stringify(json) }}
/> />
); );
@@ -486,6 +487,7 @@ function FreshRuntimeScript() {
<script <script
type="module" type="module"
nonce={nonce} nonce={nonce}
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: scriptContent, __html: scriptContent,
}} }}
+1
View File
@@ -7,6 +7,7 @@ export function CodeBlock(
<pre <pre
class="rounded-lg text-base leading-relaxed bg-slate-800 text-white p-4 sm:p-6 md:p-4 lg:p-6 2xl:p-8 overflow-x-auto" class="rounded-lg text-base leading-relaxed bg-slate-800 text-white p-4 sm:p-6 md:p-4 lg:p-6 2xl:p-8 overflow-x-auto"
data-language={lang} data-language={lang}
// deno-lint-ignore react-no-danger
><code dangerouslySetInnerHTML={{ __html: Prism.highlight(code, Prism.languages[lang], lang)}} /></pre> ><code dangerouslySetInnerHTML={{ __html: Prism.highlight(code, Prism.languages[lang], lang)}} /></pre>
); );
} }
+2
View File
@@ -128,6 +128,7 @@ export function TableOfContents({ headings }: TableOfContentsProps) {
<a <a
href={`#${heading.id}`} href={`#${heading.id}`}
class="block truncatetext-gray-600" class="block truncatetext-gray-600"
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ __html: heading.html }} dangerouslySetInnerHTML={{ __html: heading.html }}
/> />
</li> </li>
@@ -166,6 +167,7 @@ export function TableOfContents({ headings }: TableOfContentsProps) {
heading.id, heading.id,
); );
}} }}
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ __html: heading.html }} dangerouslySetInnerHTML={{ __html: heading.html }}
/> />
</li> </li>
+1
View File
@@ -45,6 +45,7 @@ export default define.page(function App({ Component, state, url }) {
: null} : null}
<script <script
type="module" type="module"
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: ` __html: `
const isDarkMode = localStorage.theme === "dark" const isDarkMode = localStorage.theme === "dark"
+1
View File
@@ -204,6 +204,7 @@ export default define.page<typeof handler>(function DocsPage(props) {
</h1> </h1>
<div <div
class="markdown-body mb-8" class="markdown-body mb-8"
// deno-lint-ignore react-no-danger
dangerouslySetInnerHTML={{ __html: html }} dangerouslySetInnerHTML={{ __html: html }}
/> />
+1 -1
View File
@@ -1,4 +1,4 @@
import { PageProps } from "../../../src/context.ts"; import type { PageProps } from "../../../src/context.ts";
export default function Layout({ Component }: PageProps) { export default function Layout({ Component }: PageProps) {
return ( return (