Skip to content

Update scalafmt-core to 3.9.5 #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Scala Steward: Reformat with scalafmt 3.5.9
e1d1b1e181abf55ca0d846d122ad757c17f1036c

# Scala Steward: Reformat with scalafmt 3.9.5
66affb7024d675212b689e5b3e2b9f9556e0ee6e
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.5.9
version = 3.9.5

maxColumn = 120

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import scala.scalajs.js.JSConverters._
trait Transitions extends js.Object {
def easing: Easing = js.native
def duration: Duration = js.native
def create: js.Function2[js.Array[String], js.UndefOr[CreateTransitionsOptions], String] = js.native

def create: js.Function2[
js.Array[String],
js.UndefOr[CreateTransitionsOptions],
String
] = js.native

def getAutoHeightDuration: js.Function1[Double, Double] = js.native
}

Expand All @@ -16,7 +22,11 @@ object Transitions {
def apply(
easing: Easing,
duration: Duration,
create: js.Function2[js.Array[String], js.UndefOr[CreateTransitionsOptions], String],
create: js.Function2[
js.Array[String],
js.UndefOr[CreateTransitionsOptions],
String
],
getAutoHeightDuration: Double => Double
) = {
val o: Map[String, Any] = Map(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ import scala.scalajs.js.JSConverters._
trait TransitionsOptions extends js.Object {
def easing: js.UndefOr[EasingPartial] = js.native
def duration: js.UndefOr[DurationPartial] = js.native
def create: js.UndefOr[js.Function2[js.Array[String], js.UndefOr[CreateTransitionsOptions], String]] = js.native

def create: js.UndefOr[
js.Function2[
js.Array[String],
js.UndefOr[CreateTransitionsOptions],
String
]
] = js.native

def getAutoHeightDuration: js.UndefOr[js.Function1[Double, Double]] = js.native
}

Expand All @@ -16,7 +24,13 @@ object TransitionsOptions {
def apply(
easing: js.UndefOr[EasingPartial] = js.undefined,
duration: js.UndefOr[DurationPartial] = js.undefined,
create: js.UndefOr[js.Function2[js.Array[String], js.UndefOr[CreateTransitionsOptions], String]] = js.undefined,
create: js.UndefOr[
js.Function2[
js.Array[String],
js.UndefOr[CreateTransitionsOptions],
String
]
] = js.undefined,
getAutoHeightDuration: js.UndefOr[Double => Double] = js.undefined
) = {
val o: Map[String, Any] = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ package object styles {
override def apply(palette: PaletteOptions): Palette = js.native
}

@JSImport("@material-ui/core/styles/createMixins.js", JSImport.Default)
@JSImport(
"@material-ui/core/styles/createMixins.js",
JSImport.Default
)
@js.native
object createMixins extends js.Function3[Breakpoints, Spacing, MixinsOptions, Mixins] {
override def apply(breakpoints: Breakpoints, spacing: Spacing, mixins: MixinsOptions): Mixins = js.native
Expand All @@ -76,7 +79,11 @@ package object styles {
)
@js.native
object createTypography
extends js.Function2[Palette, TypographyOptions | js.Function1[Palette, TypographyOptions], Typography] {
extends js.Function2[
Palette,
TypographyOptions | js.Function1[Palette, TypographyOptions],
Typography
] {

override def apply(
palette: Palette,
Expand Down Expand Up @@ -111,7 +118,10 @@ package object styles {
@js.native
object spacing extends Spacing

@JSImport("@material-ui/core/styles/transitions.js", JSImport.Default)
@JSImport(
"@material-ui/core/styles/transitions.js",
JSImport.Default
)
@js.native
object transitions extends Transitions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ object DotBadge extends ScalaCssReactImplicits {
css.badgeMargin,
MuiIcons(MuiIconsModule.Mail)()
),
MuiBadge(variant = MuiBadge.Variant.dot, color = MuiBadge.Color.secondary)(
MuiBadge(
variant = MuiBadge.Variant.dot,
color = MuiBadge.Color.secondary
)(
css.badgeMargin,
MuiIcons(MuiIconsModule.Mail)()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ object ButtonSizes extends ScalaCssReactImplicits {
MuiIcons(MuiIconsModule.Navigation)()(css.extendedIcon),
"Extended"
),
MuiFab(variant = MuiFab.Variant.extended, color = MuiFab.Color.primary)(
MuiFab(
variant = MuiFab.Variant.extended,
color = MuiFab.Color.primary
)(
css.marginButton,
aria.label := "Add",
MuiIcons(MuiIconsModule.Navigation)()(css.extendedIcon),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ object FloatingActionButtonZoom extends ScalaCssReactImplicits {
val css = props.style

val fabs = List(
Fab(MuiFab.Color.inherit, css.fab, MuiIcons(MuiIconsModule.Add)()),
Fab(
MuiFab.Color.inherit,
css.fab,
MuiIcons(MuiIconsModule.Add)()
),
Fab(
MuiFab.Color.secondary,
css.fab,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ object FloatingActionButtons extends ScalaCssReactImplicits {
aria.label := "Add",
MuiIcons(MuiIconsModule.Add)()
),
MuiFab(color = MuiFab.Color.secondary)(css.marginButton, aria.label := "Edit", MuiIcon()("edit_icon")),
MuiFab(color = MuiFab.Color.secondary)(
css.marginButton,
aria.label := "Edit",
MuiIcon()("edit_icon")
),
MuiFab(variant = MuiFab.Variant.extended)(
css.marginButton,
aria.label := "Delete",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ object OutlinedChips extends ScalaCssReactImplicits {
ComponentContainer("Outlined Chips")(
div(
css.root,
MuiChip(label = "Basic Chip".toVdom, variant = MuiChip.Variant.outlined)(css.chip),
MuiChip(
label = "Basic Chip".toVdom,
variant = MuiChip.Variant.outlined
)(css.chip),
MuiChip(
label = "Clickable Chip".toVdom,
avatar = MuiAvatar()("MB").rawElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ object InsetDividers extends ScalaCssReactImplicits {
),
MuiListItem()(
MuiAvatar()(MuiIcons(MuiIconsModule.Work)()),
MuiListItemText(primary = VdomNode("Work"), secondary = VdomNode("Jan 7, 2014"))
MuiListItemText(
primary = VdomNode("Work"),
secondary = VdomNode("Jan 7, 2014")
)
),
MuiDivider(variant = MuiDivider.Variant.inset, component = "li"),
MuiListItem()(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ object SubheaderDividers extends ScalaCssReactImplicits {
)(css.dividerFullWidth, "Divider")
),
MuiListItem()(
MuiListItemText(primary = VdomNode("Work"), secondary = VdomNode("Jan 7, 2014"))
MuiListItemText(
primary = VdomNode("Work"),
secondary = VdomNode("Jan 7, 2014")
)
),
MuiDivider(variant = MuiDivider.Variant.inset, component = "li"),
li(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ object FolderList extends ScalaCssReactImplicits {
MuiAvatar()(
MuiIcons(MuiIconsModule.Work)()
),
MuiListItemText(primary = VdomNode("Work"), secondary = VdomNode("Jan 7, 2014"))
MuiListItemText(
primary = VdomNode("Work"),
secondary = VdomNode("Jan 7, 2014")
)
),
MuiListItem()(
MuiAvatar()(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ object DelayingAppearance extends ScalaCssReactImplicits {
MuiCircularProgress()
)
),
MuiButton()(css.button, onClick --> handleClickLoading, state.loadingTitle),
MuiButton()(
css.button,
onClick --> handleClickLoading,
state.loadingTitle
),
div(
css.placeholder,
if (state.isSuccess) MuiTypography()("Success!")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,11 @@ object NativeSelects extends ScalaCssReactImplicits {
),
MuiFormControl(variant = MuiFormControl.Variant.outlined)(
css.formControl,
MuiInputLabel()(id := inputRefId, htmlFor := "outlined-age-native-simple", "Age"),
MuiInputLabel()(
id := inputRefId,
htmlFor := "outlined-age-native-simple",
"Age"
),
MuiSelect(
native = true,
input = MuiOutlinedInput(labelWidth = state.labelWidth)(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ object CustomizedSnackbars extends ScalaCssReactImplicits {
div(
ComponentContainer("Customized Snackbars")(
div(
MuiButton()(css.snackbar, onClick --> handleClick, "Open success snackbar"),
MuiButton()(
css.snackbar,
onClick --> handleClick,
"Open success snackbar"
),
MuiSnackbar(
open = state.open,
autoHideDuration = 6000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,21 @@ object CustomizedTabs extends ScalaCssReactImplicits {
css.rootPaper(Layout.isPaletteLight),
MuiTabs(onChange = handleChange, classes = tabsClasses)(
value := state.value,
MuiTab(disableRipple = true, classes = tabClasses, label = "Tab 1".toVdom),
MuiTab(disableRipple = true, classes = tabClasses, label = "Tab 2".toVdom),
MuiTab(disableRipple = true, classes = tabClasses, label = "Tab 3".toVdom)
MuiTab(
disableRipple = true,
classes = tabClasses,
label = "Tab 1".toVdom
),
MuiTab(
disableRipple = true,
classes = tabClasses,
label = "Tab 2".toVdom
),
MuiTab(
disableRipple = true,
classes = tabClasses,
label = "Tab 3".toVdom
)
),
MuiTypography()(css.typography, "Ant Design UI powered by Material-UI")
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ object FilledInputAdornments extends ScalaCssReactImplicits {
MuiTextField(
label = "Password".toVdom,
variant = MuiTextField.Variant.filled,
InputProps = MuiInputProps(endAdornment = passwordEndAdormnent.rawNode.some.orUndefined)
InputProps = MuiInputProps(
endAdornment = passwordEndAdormnent.rawNode.some.orUndefined
)
)(
css.cssMargin,
css.textField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ object FilledTextFields extends ScalaCssReactImplicits {
label = "Uncontrolled".toVdom,
margin = MuiTextField.Margin.normal,
variant = MuiTextField.Variant.filled
)(css.textField, id := "filled-uncontrolled", defaultValue := "foo"),
)(
css.textField,
id := "filled-uncontrolled",
defaultValue := "foo"
),
MuiTextField(
label = "Required".toVdom,
margin = MuiTextField.Margin.normal,
Expand Down Expand Up @@ -232,7 +236,11 @@ object FilledTextFields extends ScalaCssReactImplicits {
value := state.currency,
onChange ==> handleChangeCurrency,
Currency.commons.toVdomArray { option =>
MuiMenuItem()(Attr("key") := option.value, value := option.value, option.label)
MuiMenuItem()(
Attr("key") := option.value,
value := option.value,
option.label
)
}
),
MuiTextField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ object OutlinedInputAdornments extends ScalaCssReactImplicits {
MuiTextField(
label = "Password".toVdom,
variant = MuiTextField.Variant.outlined,
InputProps = MuiInputProps(endAdornment = passwordEndAdormnent.rawNode.some.orUndefined)
InputProps = MuiInputProps(
endAdornment = passwordEndAdormnent.rawNode.some.orUndefined
)
)(
css.cssMargin,
css.textField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,11 @@ object OutlinedTextFields extends ScalaCssReactImplicits {
value := state.currency,
onChange ==> handleChangeCurrency,
Currency.commons.toVdomArray { option =>
MuiMenuItem()(Attr("key") := option.value, value := option.value, option.label)
MuiMenuItem()(
Attr("key") := option.value,
value := option.value,
option.label
)
}
),
MuiTextField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ object TextFieldMargins extends ScalaCssReactImplicits {
ComponentContainer("Layout")(
div(
css.container,
MuiTextField(label = "None".toVdom, helperText = "Some important text".toVdom)(
MuiTextField(
label = "None".toVdom,
helperText = "Some important text".toVdom
)(
css.textField,
id := "margin-none",
defaultValue := "Default Value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ object TextFields extends ScalaCssReactImplicits {
value := state.currency,
onChange ==> handleChangeCurrency,
Currency.commons.toVdomArray { option =>
MuiMenuItem()(Attr("key") := option.value, value := option.value, option.label)
MuiMenuItem()(
Attr("key") := option.value,
value := option.value,
option.label
)
}
),
MuiTextField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ object ToggleButtons extends ScalaCssReactImplicits {
value := "center",
MuiIcons(MuiIconsModule.FormatAlignCenter)()
),
MuiToggleButton()(value := "right", MuiIcons(MuiIconsModule.FormatAlignRight)()),
MuiToggleButton()(
value := "right",
MuiIcons(MuiIconsModule.FormatAlignRight)()
),
MuiToggleButton()(
value := "justify",
disabled := true,
Expand Down
4 changes: 3 additions & 1 deletion demo/src/main/scala/io/kinoplan/demo/router/AppRouter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ object AppRouter {
| staticRoute("/#lab/slider/", LabSliderRoute) ~> renderR(SliderPage(_))
| staticRoute("/#lab/speed-dial/", LabSpeedDialRoute) ~> renderR(SpeedDialPage(_))
| staticRoute("/#lab/toggle-button/", LabToggleButtonRoute) ~> renderR(ToggleButtonPage(_))
).notFound(redirectToPage(DashboardRoute)(SetRouteVia.HistoryReplace))
).notFound(
redirectToPage(DashboardRoute)(SetRouteVia.HistoryReplace)
)
}.renderWith(layout)

def layout(c: RouterCtl[Page], r: Resolution[Page]) = Layout(c, r)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ case class CustomizedSwitchesStyle(common: CommonStyle = DefaultCommonStyle) ext
)

private val iOSCheckedCond = style(
unsafeRoot(s".${iOSCheckedTransform.htmlClass} + .${iOSBar.htmlClass}")(
unsafeRoot(
s".${iOSCheckedTransform.htmlClass} + .${iOSBar.htmlClass}"
)(
opacity(1),
border.none
)
Expand Down
Loading