chore: fix lint errors (#2833)
This PR fixes current lint errors thrown by `deno lint`.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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 (
|
||||
<>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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} />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 (
|
||||
|
||||
+107
-42
@@ -62,7 +62,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="output">hello world</p>
|
||||
</Partial>
|
||||
@@ -99,7 +101,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="init">hello world</p>
|
||||
</Partial>
|
||||
@@ -141,7 +145,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="init">hello world</p>
|
||||
</Partial>
|
||||
@@ -174,7 +180,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="ready">foo</p>
|
||||
</Partial>
|
||||
@@ -225,7 +233,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="init">hello world</p>
|
||||
</Partial>
|
||||
@@ -272,7 +282,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p>hello world</p>
|
||||
</Partial>
|
||||
@@ -343,7 +355,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<SelfCounter />
|
||||
</Partial>
|
||||
@@ -386,7 +400,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="init">init</p>
|
||||
<SelfCounter />
|
||||
@@ -432,7 +448,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p class="init">init</p>
|
||||
<SelfCounter />
|
||||
@@ -479,7 +497,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<p class="outer">outer</p>
|
||||
<Partial name="inner">
|
||||
@@ -526,7 +546,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="sib-1">
|
||||
<p class="sib-1">sib-1</p>
|
||||
</Partial>
|
||||
@@ -576,7 +598,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<p key="p" class="init">init</p>
|
||||
<SelfCounter key="a" id="a" />
|
||||
@@ -643,7 +667,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<p key="p" class="init">init</p>
|
||||
|
||||
@@ -717,7 +743,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<p key="p" class="init">init</p>
|
||||
|
||||
@@ -789,7 +817,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<p key="p" class="init">init</p>
|
||||
|
||||
@@ -874,7 +904,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
@@ -922,7 +954,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<Partial name="inner">
|
||||
<p class="init">init</p>
|
||||
@@ -970,7 +1004,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<div class="content">
|
||||
<Partial name="outer">
|
||||
<p class="init">init</p>
|
||||
@@ -1020,7 +1056,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<div class="content">
|
||||
<Partial name="outer">
|
||||
<Partial name="inner">
|
||||
@@ -1069,7 +1107,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<div class="content">
|
||||
<Partial name="outer">
|
||||
<p class="init">init</p>
|
||||
@@ -1118,7 +1158,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<div class="content">
|
||||
<Partial name="outer">
|
||||
<Partial name="inner">
|
||||
@@ -1367,7 +1409,7 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial">
|
||||
<button type="button" f-partial="/partial">
|
||||
<svg
|
||||
width="100"
|
||||
height="100"
|
||||
@@ -1651,8 +1693,8 @@ Deno.test({
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<Partial name="foo">
|
||||
{new Array(10).fill(0).map(() => {
|
||||
return <p>{loremIpsum}</p>;
|
||||
{new Array(10).fill(0).map((it) => {
|
||||
return <p key={it}>{loremIpsum}</p>;
|
||||
})}
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
@@ -1716,7 +1758,12 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button class="update" name="submitter" value="sub">
|
||||
<button
|
||||
type="button"
|
||||
class="update"
|
||||
name="submitter"
|
||||
value="sub"
|
||||
>
|
||||
update
|
||||
</button>
|
||||
</form>
|
||||
@@ -1765,7 +1812,12 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button class="update" name="submitter" value="sub">
|
||||
<button
|
||||
type="button"
|
||||
class="update"
|
||||
name="submitter"
|
||||
value="sub"
|
||||
>
|
||||
update
|
||||
</button>
|
||||
</form>
|
||||
@@ -1818,7 +1870,12 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button class="update" name="submitter" value="sub">
|
||||
<button
|
||||
type="button"
|
||||
class="update"
|
||||
name="submitter"
|
||||
value="sub"
|
||||
>
|
||||
update
|
||||
</button>
|
||||
</form>
|
||||
@@ -1874,7 +1931,7 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button class="update">
|
||||
<button type="button" class="update">
|
||||
update
|
||||
</button>
|
||||
</form>
|
||||
@@ -1924,7 +1981,7 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button>
|
||||
<button type="button">
|
||||
nothing
|
||||
</button>
|
||||
</form>
|
||||
@@ -1985,7 +2042,7 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button>
|
||||
<button type="button">
|
||||
nothing
|
||||
</button>
|
||||
</form>
|
||||
@@ -2048,7 +2105,7 @@ Deno.test({
|
||||
<p class="init">init</p>
|
||||
</Partial>
|
||||
<SelfCounter />
|
||||
<button>
|
||||
<button type="button">
|
||||
nothing
|
||||
</button>
|
||||
</form>
|
||||
@@ -2189,8 +2246,8 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
{new Array(10).fill(0).map(() => {
|
||||
return <p>{loremIpsum}</p>;
|
||||
{new Array(10).fill(0).map((it) => {
|
||||
return <p key={it}>{loremIpsum}</p>;
|
||||
})}
|
||||
<h1 id="foo">Same nav</h1>
|
||||
<a href="#foo">#foo</a>
|
||||
@@ -2238,7 +2295,7 @@ Deno.test({
|
||||
</p>
|
||||
</Partial>
|
||||
<p>
|
||||
<button class="update" f-partial="/partial">
|
||||
<button type="button" class="update" f-partial="/partial">
|
||||
update
|
||||
</button>
|
||||
</p>
|
||||
@@ -2317,7 +2374,7 @@ Deno.test({
|
||||
</p>
|
||||
</Partial>
|
||||
<p>
|
||||
<button class="update" f-partial="/partial">
|
||||
<button type="button" class="update" f-partial="/partial">
|
||||
update
|
||||
</button>
|
||||
</p>
|
||||
@@ -2392,7 +2449,7 @@ Deno.test({
|
||||
</p>
|
||||
</Partial>
|
||||
<p>
|
||||
<button class="update" f-partial="/partial">
|
||||
<button type="button" class="update" f-partial="/partial">
|
||||
update
|
||||
</button>
|
||||
</p>
|
||||
@@ -2419,7 +2476,7 @@ Deno.test({
|
||||
</p>
|
||||
</Partial>
|
||||
<p>
|
||||
<button class="update" f-partial="/partial">
|
||||
<button type="button" class="update" f-partial="/partial">
|
||||
update
|
||||
</button>
|
||||
</p>
|
||||
@@ -2473,7 +2530,7 @@ Deno.test({
|
||||
</p>
|
||||
</Partial>
|
||||
<p>
|
||||
<button f-partial="?refresh">
|
||||
<button type="button" f-partial="?refresh">
|
||||
refresh
|
||||
</button>
|
||||
</p>
|
||||
@@ -2512,7 +2569,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="outer">
|
||||
<SelfCounter id="outer" />
|
||||
<Partial name="inner">
|
||||
@@ -2565,7 +2624,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<h1>foo</h1>
|
||||
</Partial>
|
||||
@@ -2593,7 +2654,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<h1>foo</h1>
|
||||
</Partial>
|
||||
@@ -2639,7 +2702,9 @@ Deno.test({
|
||||
return ctx.render(
|
||||
<Doc>
|
||||
<div f-client-nav>
|
||||
<button f-partial="/partial" class="update">update</button>
|
||||
<button type="button" f-partial="/partial" class="update">
|
||||
update
|
||||
</button>
|
||||
<Partial name="foo">
|
||||
<h1>foo</h1>
|
||||
</Partial>
|
||||
|
||||
Reference in New Issue
Block a user