From bb105044e2d7b7141073353d2cdab8b9730df851 Mon Sep 17 00:00:00 2001 From: Subho Date: Tue, 23 Jul 2024 17:09:29 +0530 Subject: [PATCH] enable biome lint --- biome.json | 10 +++++++- build.js | 6 +++-- src/components/FocusMode.tsx | 4 ++-- src/components/TimePicker.tsx | 21 +++++++++-------- src/components/ui/toaster.tsx | 24 ++++++++----------- src/components/ui/toggle-group.tsx | 2 +- src/components/ui/use-toast.tsx | 9 ++++---- src/lib/utils.ts | 4 ++-- src/newtab/App.tsx | 37 +++++++++++++++++------------- tailwind.config.ts | 4 ++-- 10 files changed, 67 insertions(+), 54 deletions(-) diff --git a/biome.json b/biome.json index a722656..79cc956 100644 --- a/biome.json +++ b/biome.json @@ -8,11 +8,19 @@ "indentStyle": "space" }, "linter": { - "enabled": false + "enabled": true, + "rules": { + "style": { + "useTemplate": "off" + } + } }, "css": { "formatter": { "enabled": true } + }, + "javascript": { + "jsxRuntime": "reactClassic" } } diff --git a/build.js b/build.js index 80e761b..bd2aef9 100755 --- a/build.js +++ b/build.js @@ -80,11 +80,13 @@ function watch_dirs(dir, on_change) { // watch all subdirectories in dir const d = fs.opendirSync(dir); - let dirent; + let dirent = d.readSync(); - while ((dirent = d.readSync()) !== null) { + while (dirent !== null) { if (dirent.isDirectory()) watch_dirs(path.join(dir, dirent.name), on_change); + + dirent = d.readSync(); } d.closeSync(); } diff --git a/src/components/FocusMode.tsx b/src/components/FocusMode.tsx index 26f535c..b40e490 100644 --- a/src/components/FocusMode.tsx +++ b/src/components/FocusMode.tsx @@ -139,10 +139,10 @@ export default function FocusModeCard() {