Skip to content

Commit

Permalink
🚨 (swiftformat): --enable conditionalAssignment
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Dec 6, 2023
1 parent 1235358 commit fab62af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
--enable braces
--allman false

--enable conditionalAssignment

# Disabled rules

--disable blankLinesBetweenImports
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,14 @@ struct SignupView: View {

let mailLabelColor: Color = {
// TODO(@ladislas): review logic in the future
var color: Color

if mail.isValidEmail() || mail.isEmpty || isEditing {
var color: Color = if mail.isValidEmail() || mail.isEmpty || isEditing {
if accountAlreadyExists {
color = .red
.red
} else {
color = DesignKitAsset.Colors.lekaDarkBlue.swiftUIColor
DesignKitAsset.Colors.lekaDarkBlue.swiftUIColor
}
} else {
color = .red
.red
}

return color
Expand Down

0 comments on commit fab62af

Please sign in to comment.