Skip to content

Commit 2e9ba11

Browse files
committed
Lint identation
1 parent aa5efb9 commit 2e9ba11

29 files changed

Lines changed: 571 additions & 571 deletions

eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ export default defineConfig([
1919
globals: globals.browser,
2020
},
2121
rules: {
22-
"semi": ["error", "always"]
22+
"semi": ["error", "always"],
23+
"indent": ["error", 2]
2324
}
2425
},
2526
]);

src/components/ConnectionOverlay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default function ConnectionOverlay() {
88
const [showOverlay, setShowOverlay] = useState(() => status !== 'connected');
99
const [prevStatus, setPrevStatus] = useState(status);
1010

11-
if (status !== prevStatus) {
11+
if (status !== prevStatus) {
1212
setPrevStatus(status);
1313
if (status !== 'connected') {
1414
setShowOverlay(true);

src/components/FieldsTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ export default function FieldsTab({ tp, onNavigateToType }: FieldsTabProps) {
134134

135135
const cardinalityColor =
136136
cardinality === '1:1' ? 'iris' :
137-
cardinality === '1:N' ? 'orange' :
138-
cardinality === 'N:1' ? 'yellow' : 'pink';
137+
cardinality === '1:N' ? 'orange' :
138+
cardinality === 'N:1' ? 'yellow' : 'pink';
139139

140140
return (
141141
<React.Fragment key={name}>

src/components/QuickConnectModal.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ export default function QuickConnectModal() {
5555
}}
5656
>
5757
<Dialog.Title>
58-
<Flex align="center" gap="2">
58+
<Flex align="center" gap="2">
5959
Quick Connect
60-
</Flex>
60+
</Flex>
6161
</Dialog.Title>
6262
<Dialog.Description size="2" mb="4" color="gray">
63-
Establish a temporary session link. This configuration won't be saved to your workspaces list.
63+
Establish a temporary session link. This configuration won't be saved to your workspaces list.
6464
</Dialog.Description>
6565

6666
<form onSubmit={handleSubmit}>
@@ -117,33 +117,33 @@ export default function QuickConnectModal() {
117117

118118
{/* Auth */}
119119
{authType === 'token' ? (
120-
<label>
120+
<label>
121121
<Text as="div" size="2" weight="bold" mb="1">ThingsDB Access Token</Text>
122122
<TextField.Root type={showToken ? "text" : "password"} value={token} onChange={e => setToken(e.target.value)} required>
123-
<TextField.Slot side="right" px="1">
123+
<TextField.Slot side="right" px="1">
124124
<IconButton type="button" variant="ghost" color="gray" onClick={() => setShowToken(!showToken)} className="cursor-pointer">
125-
{showToken ? <EyeNoneIcon width="16" height="16" /> : <EyeOpenIcon width="16" height="16" />}
125+
{showToken ? <EyeNoneIcon width="16" height="16" /> : <EyeOpenIcon width="16" height="16" />}
126126
</IconButton>
127-
</TextField.Slot>
127+
</TextField.Slot>
128128
</TextField.Root>
129-
</label>
129+
</label>
130130
) : (
131-
<Flex gap="3">
131+
<Flex gap="3">
132132
<Box style={{ flexGrow: 1 }}>
133-
<Text as="div" size="2" weight="bold" mb="1">Username</Text>
134-
<TextField.Root value={username} onChange={e => setUsername(e.target.value)} required />
133+
<Text as="div" size="2" weight="bold" mb="1">Username</Text>
134+
<TextField.Root value={username} onChange={e => setUsername(e.target.value)} required />
135135
</Box>
136136
<Box style={{ flexGrow: 1 }}>
137-
<Text as="div" size="2" weight="bold" mb="1">Password</Text>
138-
<TextField.Root type={showPassword ? "text" : "password"} value={password} onChange={e => setPassword(e.target.value)} required>
137+
<Text as="div" size="2" weight="bold" mb="1">Password</Text>
138+
<TextField.Root type={showPassword ? "text" : "password"} value={password} onChange={e => setPassword(e.target.value)} required>
139139
<TextField.Slot side="right" px="1">
140-
<IconButton type="button" variant="ghost" color="gray" onClick={() => setShowPassword(!showPassword)} className="cursor-pointer">
140+
<IconButton type="button" variant="ghost" color="gray" onClick={() => setShowPassword(!showPassword)} className="cursor-pointer">
141141
{showPassword ? <EyeNoneIcon width="16" height="16" /> : <EyeOpenIcon width="16" height="16" />}
142-
</IconButton>
142+
</IconButton>
143143
</TextField.Slot>
144-
</TextField.Root>
144+
</TextField.Root>
145145
</Box>
146-
</Flex>
146+
</Flex>
147147
)}
148148

149149
<Flex gap="3" mt="4" justify="end">

src/components/Search.tsx

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,25 @@ export default function TicodeSearch({
5959
if (filteredResults.length === 0) return;
6060

6161
switch (e.key) {
62-
case 'ArrowDown':
63-
e.preventDefault();
64-
setSelectedIndex((prev) => (prev + 1) % filteredResults.length);
65-
break;
66-
case 'ArrowUp':
67-
e.preventDefault();
68-
setSelectedIndex((prev) => (prev - 1 + filteredResults.length) % filteredResults.length);
69-
break;
70-
case 'Enter':
71-
e.preventDefault();
72-
if (filteredResults[selectedIndex]) {
73-
onSelect(filteredResults[selectedIndex]);
74-
onClose();
75-
}
76-
break;
77-
case 'Escape':
78-
e.preventDefault();
62+
case 'ArrowDown':
63+
e.preventDefault();
64+
setSelectedIndex((prev) => (prev + 1) % filteredResults.length);
65+
break;
66+
case 'ArrowUp':
67+
e.preventDefault();
68+
setSelectedIndex((prev) => (prev - 1 + filteredResults.length) % filteredResults.length);
69+
break;
70+
case 'Enter':
71+
e.preventDefault();
72+
if (filteredResults[selectedIndex]) {
73+
onSelect(filteredResults[selectedIndex]);
7974
onClose();
80-
break;
75+
}
76+
break;
77+
case 'Escape':
78+
e.preventDefault();
79+
onClose();
80+
break;
8181
}
8282
},
8383
[filteredResults, selectedIndex, onSelect, onClose]

src/components/ThingExplorer.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ export default function ThingExplorer({ scope, startThingId }: ThingExplorerProp
5454
maxHeight: '100%'
5555
}}
5656
>
57-
<TreeNode
58-
nodeValue={{ '#': startThingId }}
59-
label={startThingId === 1 ? "root" : "#"}
60-
registry={thingRegistry}
61-
loadingMap={loadingMap}
62-
errorMap={errorMap}
63-
onExpandRequest={fetchThingNode}
64-
expandOninit={true}
65-
/>
57+
<TreeNode
58+
nodeValue={{ '#': startThingId }}
59+
label={startThingId === 1 ? "root" : "#"}
60+
registry={thingRegistry}
61+
loadingMap={loadingMap}
62+
errorMap={errorMap}
63+
onExpandRequest={fetchThingNode}
64+
expandOninit={true}
65+
/>
6666
</Box>
6767
);
6868
}

src/components/WorkspaceLauncher.tsx

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,27 +99,27 @@ export default function WorkspaceLauncher() {
9999
>
100100
<Heading size="3" mb="1">{ws.name}</Heading>
101101
<Flex align="center" gap="1">
102-
<Link2Icon width="12" height="12" style={{ color: 'var(--gray-9)' }} />
103-
<Text size="1" color="gray">
104-
{ws.host}:{ws.port}
105-
</Text>
106-
{ws.type === 'production' && (
107-
<Badge color="red" variant="surface" size="1" style={{ letterSpacing: '0.05em' }}>
108-
<Text size="1" weight="bold">PRD</Text>
109-
</Badge>
110-
)}
102+
<Link2Icon width="12" height="12" style={{ color: 'var(--gray-9)' }} />
103+
<Text size="1" color="gray">
104+
{ws.host}:{ws.port}
105+
</Text>
106+
{ws.type === 'production' && (
107+
<Badge color="red" variant="surface" size="1" style={{ letterSpacing: '0.05em' }}>
108+
<Text size="1" weight="bold">PRD</Text>
109+
</Badge>
110+
)}
111111

112-
{ws.type === 'staging' && (
113-
<Badge color="amber" variant="surface" size="1" style={{ letterSpacing: '0.05em' }}>
114-
<Text size="1" weight="bold">STG</Text>
115-
</Badge>
116-
)}
112+
{ws.type === 'staging' && (
113+
<Badge color="amber" variant="surface" size="1" style={{ letterSpacing: '0.05em' }}>
114+
<Text size="1" weight="bold">STG</Text>
115+
</Badge>
116+
)}
117117

118-
{ws.type === 'development' && (
119-
<Badge color="iris" variant="outline" size="1" style={{ letterSpacing: '0.05em' }}>
120-
<Text size="1" weight="medium">DEV</Text>
121-
</Badge>
122-
)}
118+
{ws.type === 'development' && (
119+
<Badge color="iris" variant="outline" size="1" style={{ letterSpacing: '0.05em' }}>
120+
<Text size="1" weight="medium">DEV</Text>
121+
</Badge>
122+
)}
123123

124124
</Flex>
125125
</Box>

src/components/WorkspaceModal.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default function WorkspaceModal() {
1717

1818
if (editingWorkspace?.id !== prevId) {
1919
setPrevId(editingWorkspace?.id);
20-
setForm({...editingWorkspace});
20+
setForm({ ...editingWorkspace });
2121
}
2222

2323
if (!editingWorkspace) return null;
@@ -168,17 +168,17 @@ export default function WorkspaceModal() {
168168
onChange={e => setForm({ ...form, token: e.target.value })}
169169
>
170170
<TextField.Slot side="right" px="1">
171-
<IconButton
172-
type="button"
173-
variant="ghost"
174-
color="gray"
175-
onClick={() => setShowToken(!showToken)}
176-
className="cursor-pointer"
177-
>
178-
{showToken ? <EyeNoneIcon width="16" height="16" /> : <EyeOpenIcon width="16" height="16" />}
179-
</IconButton>
180-
</TextField.Slot>
181-
</TextField.Root>
171+
<IconButton
172+
type="button"
173+
variant="ghost"
174+
color="gray"
175+
onClick={() => setShowToken(!showToken)}
176+
className="cursor-pointer"
177+
>
178+
{showToken ? <EyeNoneIcon width="16" height="16" /> : <EyeOpenIcon width="16" height="16" />}
179+
</IconButton>
180+
</TextField.Slot>
181+
</TextField.Root>
182182
</label>
183183
) : (
184184
<Flex gap="3">

src/components/studio/BackupModal.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ export default function BackupModal({
3535
return (
3636
<Dialog.Root defaultOpen onOpenChange={onClose}>
3737
<Dialog.Content aria-describedby={undefined} style={{
38-
width: '65vw',
39-
maxWidth: '1024px',
40-
padding: '16px',
41-
display: 'flex',
42-
flexDirection: 'column',
43-
maxHeight: '85vh'
38+
width: '65vw',
39+
maxWidth: '1024px',
40+
padding: '16px',
41+
display: 'flex',
42+
flexDirection: 'column',
43+
maxHeight: '85vh'
4444
}}>
4545
{/* HEADER */}
4646
<Box flexShrink="0" mb="2">
@@ -121,12 +121,12 @@ export default function BackupModal({
121121
{backup.nextRun && (
122122
<DataList.Item>
123123
<DataList.Label color="gray">Next Run</DataList.Label>
124-
<DataList.Value>
125-
<Flex align="center" gap="2" style={{ color: "gray" }}>
126-
<CalendarIcon width="14" height="14" />
127-
<Text size="2">{new Date(backup.nextRun).toLocaleString(undefined, {hour12: false})}</Text>
128-
</Flex>
129-
</DataList.Value>
124+
<DataList.Value>
125+
<Flex align="center" gap="2" style={{ color: "gray" }}>
126+
<CalendarIcon width="14" height="14" />
127+
<Text size="2">{new Date(backup.nextRun).toLocaleString(undefined, { hour12: false })}</Text>
128+
</Flex>
129+
</DataList.Value>
130130
</DataList.Item>
131131
)}
132132
</DataList.Root>

src/components/studio/CollectionContextPanel.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
5151
align="center"
5252
justify="between"
5353
py="1"
54-
style={{ cursor: 'pointer', userSelect: 'none' }}
54+
className="cursor-pointer select-none"
5555
onClick={() => toggleSection('rooms')}
5656
>
5757
<Text size="2" weight="bold">Rooms</Text>
@@ -66,7 +66,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
6666
align="center"
6767
justify="between"
6868
py="1"
69-
style={{ cursor: 'pointer', userSelect: 'none' }}
69+
className="cursor-pointer select-none"
7070
onClick={() => toggleSection('tasks')}
7171
>
7272
<Text size="2" weight="bold">Tasks</Text>
@@ -81,7 +81,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
8181
align="center"
8282
justify="between"
8383
py="1"
84-
style={{ cursor: 'pointer', userSelect: 'none' }}
84+
className="cursor-pointer select-none"
8585
onClick={() => toggleSection('procedures')}
8686
>
8787
<Text size="2" weight="bold">Procedures</Text>
@@ -96,7 +96,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
9696
align="center"
9797
justify="between"
9898
py="1"
99-
style={{ cursor: 'pointer', userSelect: 'none' }}
99+
className="cursor-pointer select-none"
100100
onClick={() => toggleSection('enums')}
101101
>
102102
<Text size="2" weight="bold">Enums</Text>
@@ -111,7 +111,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
111111
align="center"
112112
justify="between"
113113
py="1"
114-
style={{ cursor: 'pointer', userSelect: 'none' }}
114+
className="cursor-pointer select-none"
115115
onClick={() => toggleSection('types')}
116116
>
117117
<Text size="2" weight="bold">Types</Text>
@@ -126,7 +126,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
126126
align="center"
127127
justify="between"
128128
py="1"
129-
style={{ cursor: 'pointer', userSelect: 'none' }}
129+
className="cursor-pointer select-none"
130130
onClick={() => toggleSection('explorer')}
131131
>
132132
<Text size="2" weight="bold">Explorer</Text>
@@ -142,7 +142,7 @@ export default function CollectionContextPanel({ scope, requireCommit }: Collect
142142
align="center"
143143
justify="between"
144144
py="1"
145-
style={{ cursor: 'pointer', userSelect: 'none' }}
145+
className="cursor-pointer select-none"
146146
onClick={() => toggleSection('history')}
147147
>
148148
<Text size="2" weight="bold">History</Text>

0 commit comments

Comments
 (0)