Skip to content

Commit

Permalink
fix next.js lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 committed Dec 29, 2023
1 parent d718bf7 commit 16f0d44
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions examples/nextjs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
extends: ["custom/next"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
},
};
8 changes: 7 additions & 1 deletion examples/nextjs/app/NotSyncedCounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ export default function NotSyncedCounter() {
return (
<div className={styles.card}>
<h2>Not Synced Counter:</h2>
<button onClick={() => setCount2(_count + 1)}>🖤 {_count}</button>
<button
onClick={() => {
setCount2(_count + 1);
}}
type="button">
🖤 {_count}
</button>
</div>
);
}
5 changes: 4 additions & 1 deletion examples/nextjs/app/OpenNewTab.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
"use client";
export default function OpenNewTab() {
return (
<button className="btn btn-outline mt-4" onClick={() => window.open(".", "_blank")}>
<button
className="btn btn-outline mt-4"
onClick={() => window.open(".", "_blank")}
type="button">
Open in new tab/window
</button>
);
Expand Down
8 changes: 7 additions & 1 deletion examples/nextjs/app/SyncedCounter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ export default function SyncedCounter() {
return (
<div className={styles.card}>
<h2>Synced Counter:</h2>
<button onClick={() => setCount(count + 1)}>💖 {count}</button>
<button
onClick={() => {
setCount(count + 1);
}}
type="button">
💖 {count}
</button>
</div>
);
}

0 comments on commit 16f0d44

Please sign in to comment.