From 274b275c03ee55c132b00ec6e986ce2dbf796a7a Mon Sep 17 00:00:00 2001 From: zhom <2717306+zhom@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:13:32 +0400 Subject: [PATCH] chore: linting --- biome.json | 5 ++- src/components/multiple-selector.tsx | 1 + .../shared-camoufox-config-form.tsx | 44 +++++++++++-------- src/styles/globals.css | 10 ++--- 4 files changed, 36 insertions(+), 24 deletions(-) diff --git a/biome.json b/biome.json index 864dad2..ceddc2b 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.0.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json", "vcs": { "enabled": false, "clientKind": "git", @@ -18,8 +18,11 @@ "rules": { "recommended": true, "correctness": { + "useUniqueElementIds": "off", "useHookAtTopLevel": "error" }, + "nursery": "off", + "suspicious": "off", "a11y": { "useSemanticElements": "off" } diff --git a/src/components/multiple-selector.tsx b/src/components/multiple-selector.tsx index 0fc1296..e49654e 100644 --- a/src/components/multiple-selector.tsx +++ b/src/components/multiple-selector.tsx @@ -287,6 +287,7 @@ const MultipleSelector = React.forwardRef< // eslint-disable-next-line react-hooks/exhaustive-deps }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus, onSearch]); + // biome-ignore lint/correctness/noNestedComponentDefinitions: public code, TODO: fix const CreatableItem = () => { if (!creatable) return undefined; if ( diff --git a/src/components/shared-camoufox-config-form.tsx b/src/components/shared-camoufox-config-form.tsx index 894f03b..6f83453 100644 --- a/src/components/shared-camoufox-config-form.tsx +++ b/src/components/shared-camoufox-config-form.tsx @@ -285,7 +285,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "navigator.hardwareConcurrency", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 8" @@ -300,7 +300,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "navigator.maxTouchPoints", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 0" @@ -357,7 +357,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "screen.width", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 1920" @@ -372,7 +372,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "screen.height", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 1080" @@ -387,7 +387,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "screen.availWidth", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 1920" @@ -402,7 +402,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "screen.availHeight", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 1055" @@ -417,7 +417,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "screen.colorDepth", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 30" @@ -432,7 +432,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "screen.pixelDepth", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 30" @@ -454,7 +454,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "window.outerWidth", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 1512" @@ -469,7 +469,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "window.outerHeight", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 886" @@ -484,7 +484,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "window.innerWidth", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 1512" @@ -499,7 +499,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "window.innerHeight", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 886" @@ -514,7 +514,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "window.screenX", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 0" @@ -529,7 +529,7 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => updateFingerprintConfig( "window.screenY", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value ? parseInt(e.target.value, 10) : undefined, ) } placeholder="e.g., 0" @@ -852,7 +852,9 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => onConfigChange( "screen_max_width", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value + ? parseInt(e.target.value, 10) + : undefined, ) } placeholder="e.g., 1920" @@ -867,7 +869,9 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => onConfigChange( "screen_max_height", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value + ? parseInt(e.target.value, 10) + : undefined, ) } placeholder="e.g., 1080" @@ -882,7 +886,9 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => onConfigChange( "screen_min_width", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value + ? parseInt(e.target.value, 10) + : undefined, ) } placeholder="e.g., 800" @@ -897,7 +903,9 @@ export function SharedCamoufoxConfigForm({ onChange={(e) => onConfigChange( "screen_min_height", - e.target.value ? parseInt(e.target.value) : undefined, + e.target.value + ? parseInt(e.target.value, 10) + : undefined, ) } placeholder="e.g., 600" diff --git a/src/styles/globals.css b/src/styles/globals.css index a8936c5..38009a8 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -127,13 +127,13 @@ /* Ensure Sonner toasts appear above all dialogs and remain interactive */ .toaster, [data-sonner-toaster] { - z-index: 99999 !important; - pointer-events: auto !important; + z-index: 99999; + pointer-events: auto; } [data-sonner-toast] { - z-index: 99999 !important; - pointer-events: auto !important; + z-index: 99999; + pointer-events: auto; } /* Ensure toast buttons and interactive elements work */ @@ -141,5 +141,5 @@ [data-sonner-toast] [role="button"], [data-sonner-toast] input, [data-sonner-toast] select { - pointer-events: auto !important; + pointer-events: auto; }