Skip to content

Commit f901811

Browse files
claudemoebiusmania
authored andcommitted
fix: resolve CI lint and format failures
- Add type="button" to ThemeSwitcher button (jsx-button-has-type) - Add deno-lint-ignore-file for react-no-danger in _app.tsx (inline script is intentional) - Fix formatting in _app.tsx https://claude.ai/code/session_01SX1vMsNaVW4qVeZLVjrPta
1 parent 674370a commit f901811

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

islands/ThemeSwitcher.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export default function ThemeSwitcher() {
3737

3838
return (
3939
<button
40+
type="button"
4041
class="theme-switcher"
4142
onClick={toggle}
4243
aria-label={theme === "light" ? "Switch to dark mode" : "Switch to light mode"}

routes/_app.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// deno-lint-ignore-file react-no-danger
12
import "preact/jsx-runtime";
23
import { define } from "../utils.ts";
34

@@ -19,7 +20,8 @@ export default define.page(function App({ Component }) {
1920
<body>
2021
<script
2122
dangerouslySetInnerHTML={{
22-
__html: `(function(){var s=localStorage.getItem('atmmi-theme');if(s==='dark'||s==='light'){document.documentElement.dataset.theme=s;}else if(matchMedia('(prefers-color-scheme: dark)').matches){document.documentElement.dataset.theme='dark';}})();`,
23+
__html:
24+
`(function(){var s=localStorage.getItem('atmmi-theme');if(s==='dark'||s==='light'){document.documentElement.dataset.theme=s;}else if(matchMedia('(prefers-color-scheme: dark)').matches){document.documentElement.dataset.theme='dark';}})();`,
2325
}}
2426
/>
2527
<Component />

0 commit comments

Comments
 (0)