Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49fe618

Browse files
committed
fix linting issues
1 parenta918816 commit49fe618

File tree

10 files changed

+155
-167
lines changed

10 files changed

+155
-167
lines changed

‎site/biome.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"rules": {
77
"a11y": {
88
"noSvgWithoutTitle": {"level":"off" },
9-
"useButtonType": {"level":"off" }
9+
"useButtonType": {"level":"off" },
10+
"useSemanticElements": {"level":"off" }
1011
},
1112
"style": {
1213
"noNonNullAssertion": {"level":"off" },

‎site/src/modules/resources/ResourceCard.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const ResourceCard: FC<ResourceCardProps> = ({ resource, agentRow }) => {
8787
constmLength=
8888
resource.daily_cost>0
8989
?(resource.metadata?.length??0)+1
90-
:resource.metadata?.length??0;
90+
:(resource.metadata?.length??0);
9191

9292
constgridWidth=mLength===1 ?1 :4;
9393

‎site/src/pages/CreateTemplatePage/VariableInput.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const VariableField: FC<VariableInputProps> = ({
9595
placeholder={variable.sensitive ?"" :variable.default_value}
9696
required={variable.required}
9797
defaultValue={
98-
variable.sensitive ?"" :defaultValue??variable.default_value
98+
variable.sensitive ?"" :(defaultValue??variable.default_value)
9999
}
100100
onChange={(event)=>{
101101
onChange(event.target.value);

‎site/src/pages/TemplatePage/TemplateVersionsPage/VersionRow.tsx‎

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,34 +106,30 @@ export const VersionRow: FC<VersionRowProps> = ({
106106
</Pill>
107107
)}
108108

109-
{showActions&&(
110-
<>
111-
{jobStatus==="failed" ?(
112-
<Button
113-
css={styles.promoteButton}
114-
disabled={isActive||version.archived}
115-
onClick={(e)=>{
116-
e.preventDefault();
117-
e.stopPropagation();
118-
onArchiveClick?.(version.id);
119-
}}
120-
>
121-
Archive&hellip;
122-
</Button>
123-
) :(
124-
<Button
125-
css={styles.promoteButton}
126-
disabled={isActive||jobStatus!=="succeeded"}
127-
onClick={(e)=>{
128-
e.preventDefault();
129-
e.stopPropagation();
130-
onPromoteClick?.(version.id);
131-
}}
132-
>
133-
Promote&hellip;
134-
</Button>
135-
)}
136-
</>
109+
{showActions&&jobStatus==="failed" ?(
110+
<Button
111+
css={styles.promoteButton}
112+
disabled={isActive||version.archived}
113+
onClick={(e)=>{
114+
e.preventDefault();
115+
e.stopPropagation();
116+
onArchiveClick?.(version.id);
117+
}}
118+
>
119+
Archive&hellip;
120+
</Button>
121+
) :(
122+
<Button
123+
css={styles.promoteButton}
124+
disabled={isActive||jobStatus!=="succeeded"}
125+
onClick={(e)=>{
126+
e.preventDefault();
127+
e.stopPropagation();
128+
onPromoteClick?.(version.id);
129+
}}
130+
>
131+
Promote&hellip;
132+
</Button>
137133
)}
138134
</Stack>
139135
</Stack>

‎site/src/pages/TemplateSettingsPage/TemplatePermissionsPage/UserOrGroupAutocomplete.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export const UserOrGroupAutocomplete: FC<UserOrGroupAutocompleteProps> = ({
7474
}}
7575
onClose={()=>{
7676
setAutoComplete({
77-
value:isGroup(value) ?value.display_name :value?.email??"",
77+
value:isGroup(value) ?value.display_name :(value?.email??""),
7878
open:false,
7979
});
8080
}}

‎site/src/pages/TemplateSettingsPage/TemplateSchedulePage/TemplateScheduleForm.tsx‎

Lines changed: 110 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -467,122 +467,118 @@ export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
467467
</FormSection>
468468

469469
{allowAdvancedScheduling&&(
470-
<>
471-
<FormSection
472-
title="Dormancy"
473-
description="When enabled, Coder will mark workspaces as dormant after a period of time with no connections. Dormant workspaces can be auto-deleted (see below) or manually reviewed by the workspace owner or admins."
474-
>
475-
<FormFieldsspacing={FORM_FIELDS_SPACING}>
476-
<Stackspacing={DORMANT_FIELDSET_SPACING}>
477-
<FormControlLabel
478-
control={
479-
<Switch
480-
size="small"
481-
name="dormancyThreshold"
482-
checked={form.values.inactivity_cleanup_enabled}
483-
onChange={handleToggleInactivityCleanup}
484-
/>
485-
}
486-
label={<StackLabel>Enable Dormancy Threshold</StackLabel>}
487-
/>
488-
489-
<DurationField
490-
{...getFieldHelpers("time_til_dormant_ms",{
491-
helperText:(
492-
<DormancyTTLHelperText
493-
ttl={form.values.time_til_dormant_ms}
494-
/>
495-
),
496-
})}
497-
label="Time until dormant"
498-
valueMs={form.values.time_til_dormant_ms??0}
499-
onChange={(v)=>form.setFieldValue("time_til_dormant_ms",v)}
500-
disabled={
501-
isSubmitting||!form.values.inactivity_cleanup_enabled
502-
}
503-
/>
504-
</Stack>
505-
506-
<Stackspacing={DORMANT_FIELDSET_SPACING}>
507-
<FormControlLabel
508-
control={
509-
<Switch
510-
size="small"
511-
name="dormancyAutoDeletion"
512-
checked={form.values.dormant_autodeletion_cleanup_enabled}
513-
onChange={handleToggleDormantAutoDeletion}
470+
<FormSection
471+
title="Dormancy"
472+
description="When enabled, Coder will mark workspaces as dormant after a period of time with no connections. Dormant workspaces can be auto-deleted (see below) or manually reviewed by the workspace owner or admins."
473+
>
474+
<FormFieldsspacing={FORM_FIELDS_SPACING}>
475+
<Stackspacing={DORMANT_FIELDSET_SPACING}>
476+
<FormControlLabel
477+
control={
478+
<Switch
479+
size="small"
480+
name="dormancyThreshold"
481+
checked={form.values.inactivity_cleanup_enabled}
482+
onChange={handleToggleInactivityCleanup}
483+
/>
484+
}
485+
label={<StackLabel>Enable Dormancy Threshold</StackLabel>}
486+
/>
487+
488+
<DurationField
489+
{...getFieldHelpers("time_til_dormant_ms",{
490+
helperText:(
491+
<DormancyTTLHelperText
492+
ttl={form.values.time_til_dormant_ms}
514493
/>
515-
}
516-
label={
517-
<StackLabel>
518-
Enable Dormancy Auto-Deletion
519-
<StackLabelHelperText>
520-
When enabled, Coder will permanently delete dormant
521-
workspaces after a period of time.{" "}
522-
<strong>
523-
Once a workspace is deleted it cannot be recovered.
524-
</strong>
525-
</StackLabelHelperText>
526-
</StackLabel>
527-
}
528-
/>
529-
<DurationField
530-
{...getFieldHelpers("time_til_dormant_autodelete_ms",{
531-
helperText:(
532-
<DormancyAutoDeletionTTLHelperText
533-
ttl={form.values.time_til_dormant_autodelete_ms}
534-
/>
535-
),
536-
})}
537-
label="Time until deletion"
538-
valueMs={form.values.time_til_dormant_autodelete_ms??0}
539-
onChange={(v)=>
540-
form.setFieldValue("time_til_dormant_autodelete_ms",v)
541-
}
542-
disabled={
543-
isSubmitting||
544-
!form.values.dormant_autodeletion_cleanup_enabled
545-
}
546-
/>
547-
</Stack>
548-
549-
<Stackspacing={DORMANT_FIELDSET_SPACING}>
550-
<FormControlLabel
551-
control={
552-
<Switch
553-
size="small"
554-
name="failureCleanupEnabled"
555-
checked={form.values.failure_cleanup_enabled}
556-
onChange={handleToggleFailureCleanup}
494+
),
495+
})}
496+
label="Time until dormant"
497+
valueMs={form.values.time_til_dormant_ms??0}
498+
onChange={(v)=>form.setFieldValue("time_til_dormant_ms",v)}
499+
disabled={
500+
isSubmitting||!form.values.inactivity_cleanup_enabled
501+
}
502+
/>
503+
</Stack>
504+
505+
<Stackspacing={DORMANT_FIELDSET_SPACING}>
506+
<FormControlLabel
507+
control={
508+
<Switch
509+
size="small"
510+
name="dormancyAutoDeletion"
511+
checked={form.values.dormant_autodeletion_cleanup_enabled}
512+
onChange={handleToggleDormantAutoDeletion}
513+
/>
514+
}
515+
label={
516+
<StackLabel>
517+
Enable Dormancy Auto-Deletion
518+
<StackLabelHelperText>
519+
When enabled, Coder will permanently delete dormant
520+
workspaces after a period of time.{" "}
521+
<strong>
522+
Once a workspace is deleted it cannot be recovered.
523+
</strong>
524+
</StackLabelHelperText>
525+
</StackLabel>
526+
}
527+
/>
528+
<DurationField
529+
{...getFieldHelpers("time_til_dormant_autodelete_ms",{
530+
helperText:(
531+
<DormancyAutoDeletionTTLHelperText
532+
ttl={form.values.time_til_dormant_autodelete_ms}
557533
/>
558-
}
559-
label={
560-
<StackLabel>
561-
Enable Failure Cleanup
562-
<StackLabelHelperText>
563-
When enabled, Coder will attempt to stop workspaces that
564-
are in a failed state after a period of time.
565-
</StackLabelHelperText>
566-
</StackLabel>
567-
}
568-
/>
569-
<DurationField
570-
{...getFieldHelpers("failure_ttl_ms",{
571-
helperText:(
572-
<FailureTTLHelperTextttl={form.values.failure_ttl_ms}/>
573-
),
574-
})}
575-
label="Time until cleanup"
576-
valueMs={form.values.failure_ttl_ms??0}
577-
onChange={(v)=>form.setFieldValue("failure_ttl_ms",v)}
578-
disabled={
579-
isSubmitting||!form.values.failure_cleanup_enabled
580-
}
581-
/>
582-
</Stack>
583-
</FormFields>
584-
</FormSection>
585-
</>
534+
),
535+
})}
536+
label="Time until deletion"
537+
valueMs={form.values.time_til_dormant_autodelete_ms??0}
538+
onChange={(v)=>
539+
form.setFieldValue("time_til_dormant_autodelete_ms",v)
540+
}
541+
disabled={
542+
isSubmitting||
543+
!form.values.dormant_autodeletion_cleanup_enabled
544+
}
545+
/>
546+
</Stack>
547+
548+
<Stackspacing={DORMANT_FIELDSET_SPACING}>
549+
<FormControlLabel
550+
control={
551+
<Switch
552+
size="small"
553+
name="failureCleanupEnabled"
554+
checked={form.values.failure_cleanup_enabled}
555+
onChange={handleToggleFailureCleanup}
556+
/>
557+
}
558+
label={
559+
<StackLabel>
560+
Enable Failure Cleanup
561+
<StackLabelHelperText>
562+
When enabled, Coder will attempt to stop workspaces that
563+
are in a failed state after a period of time.
564+
</StackLabelHelperText>
565+
</StackLabel>
566+
}
567+
/>
568+
<DurationField
569+
{...getFieldHelpers("failure_ttl_ms",{
570+
helperText:(
571+
<FailureTTLHelperTextttl={form.values.failure_ttl_ms}/>
572+
),
573+
})}
574+
label="Time until cleanup"
575+
valueMs={form.values.failure_ttl_ms??0}
576+
onChange={(v)=>form.setFieldValue("failure_ttl_ms",v)}
577+
disabled={isSubmitting||!form.values.failure_cleanup_enabled}
578+
/>
579+
</Stack>
580+
</FormFields>
581+
</FormSection>
586582
)}
587583
{showScheduleDialog&&(
588584
<ScheduleDialog

‎site/src/pages/TemplatesPage/TemplatesFilter.tsx‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,13 @@ export const TemplatesFilter: FC<TemplatesFilterProps> = ({
4949
filter={filter}
5050
error={error}
5151
options={
52-
<>
53-
<SelectFilter
54-
placeholder="All organizations"
55-
label="Select an organization"
56-
options={organizationMenu.searchOptions}
57-
selectedOption={organizationMenu.selectedOption??undefined}
58-
onSelect={organizationMenu.selectOption}
59-
/>
60-
</>
52+
<SelectFilter
53+
placeholder="All organizations"
54+
label="Select an organization"
55+
options={organizationMenu.searchOptions}
56+
selectedOption={organizationMenu.selectedOption??undefined}
57+
onSelect={organizationMenu.selectOption}
58+
/>
6159
}
6260
optionsSkeleton={<MenuSkeleton/>}
6361
/>

‎site/src/pages/UserSettingsPage/ExternalAuthPage/ExternalAuthPageView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const ExternalAuthRow: FC<ExternalAuthRowProps> = ({
149149

150150
constauthenticated=externalAuth
151151
?externalAuth.authenticated
152-
:link?.authenticated??false;
152+
:(link?.authenticated??false);
153153

154154
letavatar=app.display_icon ?(
155155
<Avatarsrc={app.display_icon}variant="square"fitImagesize="sm"/>

‎site/src/pages/UsersPage/UsersPageView.tsx‎

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,14 @@ export const UsersPageView: FC<UsersPageViewProps> = ({
7474
<PageHeader
7575
css={{paddingTop:0}}
7676
actions={
77-
<>
78-
{canCreateUser&&(
79-
<Button
80-
onClick={()=>navigate("create")}
81-
startIcon={<PersonAdd/>}
82-
>
83-
Create user
84-
</Button>
85-
)}
86-
</>
77+
canCreateUser&&(
78+
<Button
79+
onClick={()=>navigate("create")}
80+
startIcon={<PersonAdd/>}
81+
>
82+
Create user
83+
</Button>
84+
)
8785
}
8886
>
8987
<PageHeaderTitle>Users</PageHeaderTitle>

‎site/src/pages/WorkspacePage/ResourcesSidebar.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export const ResourcesSidebar: FC<ResourcesSidebarProps> = ({
7070
css={{width:"100%",height:"100%",objectFit:"contain"}}
7171
src={getResourceIconPath(r.type)}
7272
alt=""
73-
role="presentation"
7473
/>
7574
</div>
7675
<div

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp