Skip to content

Commit ddc2f69

Browse files
committed
chore(lint): biome auto-fixes + address PR feedback (jsdoc, lint suppression)
1 parent ac8b691 commit ddc2f69

63 files changed

Lines changed: 223 additions & 203 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/sim/app/(landing)/components/collaboration/collaboration.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ function YouCursor({ x, y, visible }: YouCursorProps) {
171171
* Collaboration section — team workflows and real-time collaboration.
172172
*
173173
* SEO:
174-
* - `<section id="collaboration" aria-labelledby="collaboration-heading">`.
175-
* - `<h2 id="collaboration-heading">` for the section title.
174+
* - `<section id="collaboration">` is the stable anchor for in-page navigation.
175+
* - The section title `<h2>` is linked via `aria-labelledby` using a `useId()`-generated id.
176176
* - Product visuals use `<figure>` with `<figcaption>` and descriptive `alt` text.
177177
*
178178
* GEO:
@@ -201,7 +201,7 @@ export default function Collaboration() {
201201
}, [])
202202

203203
return (
204-
// biome-ignore lint/correctness/useUniqueElementIds: stable page anchor for #collaboration navigation
204+
// biome-ignore lint: stable page anchor for #collaboration navigation
205205
<section
206206
ref={sectionRef}
207207
id='collaboration'

apps/sim/app/(landing)/components/features/features.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ export default function Features() {
234234
aria-selected={index === activeTab}
235235
aria-controls='features-panel'
236236
onClick={() => setActiveTab(index)}
237-
className={`relative h-full min-w-0 flex-1 items-center justify-center px-2 font-medium font-season text-[var(--landing-text-dark)] text-caption uppercase lg:px-0 lg:text-sm${tab.hideOnMobile ? ' hidden lg:flex' : ' flex'}${index > 0 ? ' border-[var(--divider)] border-l' : ''}`}
237+
className={`relative h-full min-w-0 flex-1 items-center justify-center px-2 font-medium font-season text-[var(--landing-text-dark)] text-caption uppercase lg:px-0 lg:text-sm${tab.hideOnMobile ? 'hidden lg:flex' : 'flex'}${index > 0 ? 'border-[var(--divider)] border-l' : ''}`}
238238
style={{ backgroundColor: index === activeTab ? '#FDFDFD' : '#F6F6F6' }}
239239
>
240240
<span className='truncate'>{tab.label}</span>

apps/sim/app/_styles/globals.css

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,23 @@ html[data-sidebar-collapsed] .sidebar-container .sidebar-collapse-btn {
137137
}
138138

139139
.react-flow__node-landingLoop svg rect.landing-loop-animated-dash {
140-
animation: dash-animation 1.5s linear infinite !important;
140+
animation: dash-animation 1.5s linear infinite;
141141
}
142142

143143
/**
144144
* React Flow selection box styling
145145
* Uses brand-secondary color for selection highlighting
146146
*/
147147
.react-flow__selection {
148-
background: rgba(51, 180, 255, 0.08) !important;
149-
border: 1px solid var(--brand-secondary) !important;
148+
background: rgba(51, 180, 255, 0.08);
149+
border: 1px solid var(--brand-secondary);
150150
}
151151

152152
.react-flow__nodesselection-rect,
153153
.react-flow__nodesselection {
154-
background: transparent !important;
155-
border: none !important;
156-
pointer-events: none !important;
154+
background: transparent;
155+
border: none;
156+
pointer-events: none;
157157
}
158158

159159
/**
@@ -162,17 +162,17 @@ html[data-sidebar-collapsed] .sidebar-container .sidebar-collapse-btn {
162162
*/
163163
.workflow-container.canvas-mode-cursor .react-flow__pane,
164164
.workflow-container.canvas-mode-cursor .react-flow__selectionpane {
165-
cursor: default !important;
165+
cursor: default;
166166
}
167167

168168
.workflow-container.canvas-mode-hand .react-flow__pane,
169169
.workflow-container.canvas-mode-hand .react-flow__selectionpane {
170-
cursor: grab !important;
170+
cursor: grab;
171171
}
172172

173173
.workflow-container.canvas-mode-hand .react-flow__pane:active,
174174
.workflow-container.canvas-mode-hand .react-flow__selectionpane:active {
175-
cursor: grabbing !important;
175+
cursor: grabbing;
176176
}
177177

178178
/**
@@ -681,47 +681,47 @@ input[type="search"]::-ms-clear {
681681
*/
682682
html[data-panel-active-tab="copilot"] .panel-container [data-tab-content="toolbar"],
683683
html[data-panel-active-tab="copilot"] .panel-container [data-tab-content="editor"] {
684-
display: none !important;
684+
display: none;
685685
}
686686

687687
html[data-panel-active-tab="toolbar"] .panel-container [data-tab-content="copilot"],
688688
html[data-panel-active-tab="toolbar"] .panel-container [data-tab-content="editor"] {
689-
display: none !important;
689+
display: none;
690690
}
691691

692692
html[data-panel-active-tab="editor"] .panel-container [data-tab-content="copilot"],
693693
html[data-panel-active-tab="editor"] .panel-container [data-tab-content="toolbar"] {
694-
display: none !important;
694+
display: none;
695695
}
696696

697697
html[data-panel-active-tab="copilot"] .panel-container [data-tab-button="copilot"] {
698-
background-color: var(--border-1) !important;
699-
color: var(--text-primary) !important;
698+
background-color: var(--border-1);
699+
color: var(--text-primary);
700700
}
701701
html[data-panel-active-tab="copilot"] .panel-container [data-tab-button="toolbar"],
702702
html[data-panel-active-tab="copilot"] .panel-container [data-tab-button="editor"] {
703-
background-color: transparent !important;
704-
color: var(--text-tertiary) !important;
703+
background-color: transparent;
704+
color: var(--text-tertiary);
705705
}
706706

707707
html[data-panel-active-tab="toolbar"] .panel-container [data-tab-button="toolbar"] {
708-
background-color: var(--border-1) !important;
709-
color: var(--text-primary) !important;
708+
background-color: var(--border-1);
709+
color: var(--text-primary);
710710
}
711711
html[data-panel-active-tab="toolbar"] .panel-container [data-tab-button="copilot"],
712712
html[data-panel-active-tab="toolbar"] .panel-container [data-tab-button="editor"] {
713-
background-color: transparent !important;
714-
color: var(--text-tertiary) !important;
713+
background-color: transparent;
714+
color: var(--text-tertiary);
715715
}
716716

717717
html[data-panel-active-tab="editor"] .panel-container [data-tab-button="editor"] {
718-
background-color: var(--border-1) !important;
719-
color: var(--text-primary) !important;
718+
background-color: var(--border-1);
719+
color: var(--text-primary);
720720
}
721721
html[data-panel-active-tab="editor"] .panel-container [data-tab-button="copilot"],
722722
html[data-panel-active-tab="editor"] .panel-container [data-tab-button="toolbar"] {
723-
background-color: transparent !important;
724-
color: var(--text-tertiary) !important;
723+
background-color: transparent;
724+
color: var(--text-tertiary);
725725
}
726726
}
727727

@@ -806,7 +806,7 @@ input[type="search"]::-ms-clear {
806806
*/
807807
.prose code::before,
808808
.prose code::after {
809-
content: none !important;
809+
content: none;
810810
}
811811

812812
/**
@@ -818,8 +818,8 @@ input[type="search"]::-ms-clear {
818818
.prose h4 a,
819819
.prose h5 a,
820820
.prose h6 a {
821-
text-decoration: none !important;
822-
color: inherit !important;
821+
text-decoration: none;
822+
color: inherit;
823823
}
824824

825825
/**
@@ -830,10 +830,10 @@ input[type="search"]::-ms-clear {
830830
*,
831831
*::before,
832832
*::after {
833-
animation-duration: 0.01ms !important;
834-
animation-iteration-count: 1 !important;
835-
transition-duration: 0.01ms !important;
836-
scroll-behavior: auto !important;
833+
animation-duration: 0.01ms;
834+
animation-iteration-count: 1;
835+
transition-duration: 0.01ms;
836+
scroll-behavior: auto;
837837
}
838838
}
839839

@@ -956,8 +956,8 @@ input[type="search"]::-ms-clear {
956956
/* Subflow node drag-over styles */
957957
.loop-node-drag-over,
958958
.parallel-node-drag-over {
959-
box-shadow: 0 0 0 1.75px var(--brand-secondary) !important;
960-
border-radius: 8px !important;
959+
box-shadow: 0 0 0 1.75px var(--brand-secondary);
960+
border-radius: 8px;
961961
}
962962

963963
.react-flow__node[data-parent-node-id] .react-flow__handle {

apps/sim/app/api/guardrails/validate/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ async function executeValidation(
332332
userInput: inputStr,
333333
knowledgeBaseId,
334334
threshold: threshold != null ? Number.parseFloat(threshold) : 3, // Default threshold is 3 (confidence score, scores < 3 fail)
335-
topK: topK ? Number.parseInt(topK) : 10, // Default topK is 10
335+
topK: topK ? Number.parseInt(topK, 10) : 10, // Default topK is 10
336336
model: model,
337337
apiKey,
338338
providerCredentials,

apps/sim/app/api/mcp/tools/execute/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export const POST = withRouteHandler(
124124
typeof value === 'string'
125125
) {
126126
const numValue =
127-
schema.type === 'integer' ? Number.parseInt(value) : Number.parseFloat(value)
127+
schema.type === 'integer' ? Number.parseInt(value, 10) : Number.parseFloat(value)
128128
if (!Number.isNaN(numValue)) {
129129
args[paramName] = numValue
130130
}

apps/sim/app/api/tools/ssh/get-system-info/route.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
5353
client,
5454
"cat /proc/uptime 2>/dev/null | awk '{print int($1)}' || sysctl -n kern.boottime 2>/dev/null | awk '{print int(($(date +%s)) - $4)}'"
5555
)
56-
const uptime = Number.parseInt(uptimeResult.stdout.trim()) || 0
56+
const uptime = Number.parseInt(uptimeResult.stdout.trim(), 10) || 0
5757

5858
// Get memory info
5959
const memoryResult = await executeSSHCommand(
@@ -64,9 +64,9 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
6464
let memory = { total: 0, free: 0, used: 0 }
6565
if (memParts.length >= 3) {
6666
memory = {
67-
total: Number.parseInt(memParts[0]) || 0,
68-
free: Number.parseInt(memParts[1]) || 0,
69-
used: Number.parseInt(memParts[2]) || 0,
67+
total: Number.parseInt(memParts[0], 10) || 0,
68+
free: Number.parseInt(memParts[1], 10) || 0,
69+
used: Number.parseInt(memParts[2], 10) || 0,
7070
}
7171
}
7272

@@ -79,9 +79,9 @@ export const POST = withRouteHandler(async (request: NextRequest) => {
7979
let diskSpace = { total: 0, free: 0, used: 0 }
8080
if (diskParts.length >= 3) {
8181
diskSpace = {
82-
total: Number.parseInt(diskParts[0]) || 0,
83-
free: Number.parseInt(diskParts[1]) || 0,
84-
used: Number.parseInt(diskParts[2]) || 0,
82+
total: Number.parseInt(diskParts[0], 10) || 0,
83+
free: Number.parseInt(diskParts[1], 10) || 0,
84+
used: Number.parseInt(diskParts[2], 10) || 0,
8585
}
8686
}
8787

apps/sim/app/api/tools/video/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,7 +1335,7 @@ function getVideoDimensions(
13351335
} else if (resolution === 'true_1080p') {
13361336
height = 1080
13371337
} else {
1338-
const parsedHeight = Number.parseInt(resolution.replace('p', ''))
1338+
const parsedHeight = Number.parseInt(resolution.replace('p', ''), 10)
13391339
height = Number.isFinite(parsedHeight) ? parsedHeight : 1080
13401340
}
13411341

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,7 @@ function useTextEditorContentState(options: SyncTextEditorContentStateOptions) {
351351
}
352352

353353
function useMonacoTheme(): string {
354-
const [isDark, setIsDark] = useState(
355-
() => typeof document !== 'undefined' && document.documentElement.classList.contains('dark')
356-
)
354+
const [isDark, setIsDark] = useState(() => document?.documentElement.classList.contains('dark'))
357355

358356
useEffect(() => {
359357
const update = () => setIsDark(document.documentElement.classList.contains('dark'))

apps/sim/app/workspace/[workspaceId]/logs/components/logs-toolbar/components/notifications/notifications.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ export const NotificationSettings = memo(function NotificationSettings({
984984
onChange={(e) =>
985985
setFormData({
986986
...formData,
987-
consecutiveFailures: Number.parseInt(e.target.value) || 1,
987+
consecutiveFailures: Number.parseInt(e.target.value, 10) || 1,
988988
})
989989
}
990990
/>
@@ -1008,7 +1008,7 @@ export const NotificationSettings = memo(function NotificationSettings({
10081008
onChange={(e) =>
10091009
setFormData({
10101010
...formData,
1011-
failureRatePercent: Number.parseInt(e.target.value) || 1,
1011+
failureRatePercent: Number.parseInt(e.target.value, 10) || 1,
10121012
})
10131013
}
10141014
/>
@@ -1028,7 +1028,7 @@ export const NotificationSettings = memo(function NotificationSettings({
10281028
onChange={(e) =>
10291029
setFormData({
10301030
...formData,
1031-
windowHours: Number.parseInt(e.target.value) || 1,
1031+
windowHours: Number.parseInt(e.target.value, 10) || 1,
10321032
})
10331033
}
10341034
/>
@@ -1050,7 +1050,7 @@ export const NotificationSettings = memo(function NotificationSettings({
10501050
onChange={(e) =>
10511051
setFormData({
10521052
...formData,
1053-
durationThresholdMs: (Number.parseInt(e.target.value) || 1) * 1000,
1053+
durationThresholdMs: (Number.parseInt(e.target.value, 10) || 1) * 1000,
10541054
})
10551055
}
10561056
/>
@@ -1074,7 +1074,7 @@ export const NotificationSettings = memo(function NotificationSettings({
10741074
onChange={(e) =>
10751075
setFormData({
10761076
...formData,
1077-
latencySpikePercent: Number.parseInt(e.target.value) || 10,
1077+
latencySpikePercent: Number.parseInt(e.target.value, 10) || 10,
10781078
})
10791079
}
10801080
/>
@@ -1094,7 +1094,7 @@ export const NotificationSettings = memo(function NotificationSettings({
10941094
onChange={(e) =>
10951095
setFormData({
10961096
...formData,
1097-
windowHours: Number.parseInt(e.target.value) || 1,
1097+
windowHours: Number.parseInt(e.target.value, 10) || 1,
10981098
})
10991099
}
11001100
/>
@@ -1140,7 +1140,7 @@ export const NotificationSettings = memo(function NotificationSettings({
11401140
onChange={(e) =>
11411141
setFormData({
11421142
...formData,
1143-
inactivityHours: Number.parseInt(e.target.value) || 1,
1143+
inactivityHours: Number.parseInt(e.target.value, 10) || 1,
11441144
})
11451145
}
11461146
/>
@@ -1164,7 +1164,7 @@ export const NotificationSettings = memo(function NotificationSettings({
11641164
onChange={(e) =>
11651165
setFormData({
11661166
...formData,
1167-
errorCountThreshold: Number.parseInt(e.target.value) || 1,
1167+
errorCountThreshold: Number.parseInt(e.target.value, 10) || 1,
11681168
})
11691169
}
11701170
/>
@@ -1184,7 +1184,7 @@ export const NotificationSettings = memo(function NotificationSettings({
11841184
onChange={(e) =>
11851185
setFormData({
11861186
...formData,
1187-
windowHours: Number.parseInt(e.target.value) || 1,
1187+
windowHours: Number.parseInt(e.target.value, 10) || 1,
11881188
})
11891189
}
11901190
/>

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export function McpDynamicArgs({
284284
if (isNumeric && processedValue !== '' && !hasTag) {
285285
processedValue =
286286
paramSchema.type === 'integer'
287-
? Number.parseInt(processedValue)
287+
? Number.parseInt(processedValue, 10)
288288
: Number.parseFloat(processedValue)
289289

290290
if (Number.isNaN(processedValue)) {

0 commit comments

Comments
 (0)