refactor: remove true from boolean attribute (#2579)

When using a boolean attribute in JSX, you can set the attribute value to true or omit the value. This helps to keep consistency in code.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
deepsource-autofix[bot] 2023-11-01 12:30:21 +05:30 committed by GitHub
parent b7d5a42d45
commit 80e6d7e1ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 35 additions and 35 deletions

View file

@ -114,7 +114,7 @@ export const IssueDescriptionForm: FC<IssueDetailsProps> = (props) => {
onChange(e.target.value);
debouncedFormSave();
}}
required={true}
required
className="min-h-10 block w-full resize-none overflow-hidden rounded border-none bg-transparent px-3 py-2 text-xl outline-none ring-0 focus:ring-1 focus:ring-custom-primary"
hasError={Boolean(errors?.description)}
role="textbox"

View file

@ -111,7 +111,7 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
onChange={handleState}
states={states}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
)}
@ -121,7 +121,7 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
value={issue?.priority || null}
onChange={handlePriority}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
)}
@ -132,7 +132,7 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
onChange={handleLabel}
labels={labels}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
)}
@ -140,7 +140,7 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
{displayProperties && displayProperties?.assignee && (
<IssuePropertyAssignee
value={issue?.assignees || null}
hideDropdownArrow={true}
hideDropdownArrow
onChange={handleAssignee}
members={members}
disabled={false}
@ -174,7 +174,7 @@ export const KanBanProperties: React.FC<IKanBanProperties> = observer((props) =>
onChange={handleEstimate}
estimatePoints={estimates}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
)}

View file

@ -136,7 +136,7 @@ export const List: React.FC<IList> = observer((props) => {
handleIssues={handleIssues}
quickActions={quickActions}
display_properties={display_properties}
is_list={true}
is_list
states={states}
labels={labels}
members={members}

View file

@ -62,7 +62,7 @@ export const KanBanProperties: FC<IKanBanProperties> = observer((props) => {
{display_properties && display_properties?.state && states && (
<IssuePropertyState
value={issue?.state_detail || null}
hideDropdownArrow={true}
hideDropdownArrow
onChange={handleState}
disabled={false}
states={states}
@ -75,7 +75,7 @@ export const KanBanProperties: FC<IKanBanProperties> = observer((props) => {
value={issue?.priority || null}
onChange={handlePriority}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
)}
@ -86,7 +86,7 @@ export const KanBanProperties: FC<IKanBanProperties> = observer((props) => {
onChange={handleLabel}
labels={labels}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
)}
@ -94,7 +94,7 @@ export const KanBanProperties: FC<IKanBanProperties> = observer((props) => {
{display_properties && display_properties?.assignee && members && (
<IssuePropertyAssignee
value={issue?.assignees || null}
hideDropdownArrow={true}
hideDropdownArrow
onChange={handleAssignee}
disabled={false}
members={members}
@ -126,7 +126,7 @@ export const KanBanProperties: FC<IKanBanProperties> = observer((props) => {
<IssuePropertyEstimates
value={issue?.estimate_point || null}
estimatePoints={estimates}
hideDropdownArrow={true}
hideDropdownArrow
onChange={handleEstimate}
disabled={false}
/>

View file

@ -57,7 +57,7 @@ export const PeekOverviewProperties: FC<IPeekOverviewProperties> = (props) => {
onChange={handleState}
states={states}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
</div>
</div>
@ -75,7 +75,7 @@ export const PeekOverviewProperties: FC<IPeekOverviewProperties> = (props) => {
value={issue?.assignees || null}
onChange={(ids: string[]) => handleAssignee(ids)}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
members={members}
/>
</div>
@ -94,7 +94,7 @@ export const PeekOverviewProperties: FC<IPeekOverviewProperties> = (props) => {
value={issue?.priority || null}
onChange={handlePriority}
disabled={false}
hideDropdownArrow={true}
hideDropdownArrow
/>
</div>
</div>

View file

@ -50,7 +50,7 @@ export const IssueAssigneeSelect: React.FC<Props> = ({ projectId, value = [], on
<div className="flex items-center gap-2 cursor-pointer text-xs text-custom-text-200">
{value && value.length > 0 && Array.isArray(value) ? (
<div className="-my-0.5 flex items-center justify-center gap-2">
<AssigneesList userIds={value} length={3} showLength={true} />
<AssigneesList userIds={value} length={3} showLength />
</div>
) : (
<div className="flex items-center justify-center gap-2 px-1.5 py-1 rounded shadow-sm border border-custom-border-300 hover:bg-custom-background-80">

View file

@ -49,7 +49,7 @@ export const IssueLabelSelect: React.FC<Props> = ({ setIsOpen, value, onChange,
<IssueLabelsList
labels={value.map((v) => issueLabels?.find((l) => l.id === v)) ?? []}
length={3}
showLength={true}
showLength
/>
</span>
) : (