chore: fix lint errors (#2833)

This PR fixes current lint errors thrown by `deno lint`.
This commit is contained in:
Tim Reichen
2025-03-05 12:31:25 +01:00
committed by GitHub
parent f49a3f1d99
commit 0a634bd2d2
22 changed files with 1453 additions and 64 deletions
+10 -2
View File
@@ -14,11 +14,19 @@ export function Counter(props: CounterProps) {
return (
<div id={props.id} class={active.value ? "ready" : ""}>
<button class="decrement" onClick={() => props.count.value -= 1}>
<button
type="button"
class="decrement"
onClick={() => props.count.value -= 1}
>
-1
</button>
<p class="output">{props.count}</p>
<button class="increment" onClick={() => props.count.value += 1}>
<button
type="button"
class="increment"
onClick={() => props.count.value += 1}
>
+1
</button>
</div>
+3 -1
View File
@@ -16,7 +16,9 @@ export function CounterWithSlots(
<div class={active.value ? "ready" : ""}>
<div class="counter-with-children">
<p class="output">{sig}</p>
<button onClick={() => sig.value = sig.peek() + 1}>update</button>
<button type="button" onClick={() => sig.value = sig.peek() + 1}>
update
</button>
</div>
<div class="children">
{props.children}
@@ -1,3 +1,4 @@
// deno-lint-ignore-file jsx-curly-braces
export function FragmentIsland() {
return (
<>
+1 -1
View File
@@ -14,7 +14,7 @@ export function FreshAttrs(props: FreshAttrs) {
return (
<div id={props.id} class={active.value ? "ready" : ""}>
<h1>Fresh attrs</h1>
<div class="f-client-nav-true" f-client-nav={true}>f-client-nav=true</div>
<div class="f-client-nav-true" f-client-nav>f-client-nav=true</div>
<div class="f-client-nav-false" f-client-nav={false}>
f-client-nav=false
</div>
+5 -1
View File
@@ -6,7 +6,11 @@ export function IslandInIsland() {
return (
<div>
<button class="trigger" onClick={() => sig.value = sig.peek() + 1}>
<button
type="button"
class="trigger"
onClick={() => sig.value = sig.peek() + 1}
>
trigger
</button>
<Counter count={sig} />
+5 -1
View File
@@ -18,7 +18,11 @@ export function JsxConditional(props: JsxConditionalProps) {
return (
<div class={active.value ? "ready" : ""}>
<p class="cond-output">{sig}</p>
<button class="cond-update" onClick={() => sig.value = sig.peek() + 1}>
<button
type="button"
class="cond-update"
onClick={() => sig.value = sig.peek() + 1}
>
update
</button>
<div class="jsx">{active.value ? props.jsx : null}</div>
+5 -1
View File
@@ -17,7 +17,11 @@ export function JsxIsland(props: JsxIslandProps) {
return (
<div class={active.value ? "ready" : ""}>
<p class="output">{sig}</p>
<button class="update" onClick={() => sig.value = sig.peek() + 1}>
<button
type="button"
class="update"
onClick={() => sig.value = sig.peek() + 1}
>
update
</button>
<div class="jsx">{props.jsx}</div>
+1 -1
View File
@@ -10,7 +10,7 @@ export function NodeProcess() {
}, []);
// @ts-ignore bundling
// deno-lint-ignore no-process-globals
// deno-lint-ignore no-process-global
const value = IS_BROWSER ? process.env.NODE_ENV : "no";
return (