Skip to content

Commit 8e0dc68

Browse files
committed
format
1 parent 2befe8f commit 8e0dc68

File tree

20 files changed

+66
-72
lines changed

20 files changed

+66
-72
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
strategy:
2424
matrix:
2525
os: [ubuntu-latest]
26-
scala: [3.3.4]
26+
scala: [3.3.5]
2727
java: [zulu@8, temurin@17]
2828
runs-on: ${{ matrix.os }}
2929
steps:
@@ -73,7 +73,7 @@ jobs:
7373
strategy:
7474
matrix:
7575
os: [ubuntu-latest]
76-
scala: [3.3.4]
76+
scala: [3.3.5]
7777
java: [zulu@8]
7878
runs-on: ${{ matrix.os }}
7979
steps:
@@ -101,12 +101,12 @@ jobs:
101101
- name: Setup sbt
102102
uses: sbt/setup-sbt@v1
103103

104-
- name: Download target directories (3.3.4)
104+
- name: Download target directories (3.3.5)
105105
uses: actions/download-artifact@v4
106106
with:
107-
name: target-${{ matrix.os }}-3.3.4-${{ matrix.java }}
107+
name: target-${{ matrix.os }}-3.3.5-${{ matrix.java }}
108108

109-
- name: Inflate target directories (3.3.4)
109+
- name: Inflate target directories (3.3.5)
110110
run: |
111111
tar xf targets.tar
112112
rm targets.tar

.scalafix.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
rules = [
2+
RemoveUnused,
3+
OrganizeImports,
4+
RedundantSyntax,
5+
NoValInForComprehension
6+
]
7+
8+
OrganizeImports {
9+
groupedImports = Merge
10+
targetDialect = Scala3
11+
}
12+
13+
RemoveUnused.imports = false

build.sbt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ inThisBuild(
1313
organization := "io.github.kitlangton",
1414
homepage := Some(url("https://github.com/kitlangton/animus")),
1515
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
16+
semanticdbEnabled := true,
1617
developers := List(
1718
Developer(
1819
"kitlangton",
@@ -24,6 +25,9 @@ inThisBuild(
2425
)
2526
)
2627

28+
Global / onChangedBuildSource := ReloadOnSourceChanges
29+
addCommandAlias("prepare", "scalafixAll;githubWorkflowGenerate")
30+
2731
////////////////////////
2832
// sbt-github-actions //
2933
////////////////////////
@@ -57,9 +61,10 @@ lazy val scalacSettings =
5761
"-unchecked" ::
5862
"-deprecation" ::
5963
"-feature" ::
64+
"-Wunused:imports" ::
6065
Nil
6166

62-
val zioVersion = "2.1.15"
67+
val zioVersion = "2.1.16"
6368
val laminarVersion = "17.2.0"
6469

6570
lazy val commonSettings = Seq(
@@ -112,7 +117,7 @@ lazy val example = project
112117
skip / publish := true,
113118
libraryDependencies ++= Seq(
114119
"dev.zio" %%% "zio" % zioVersion,
115-
"dev.zio" %%% "zio-json" % "0.7.21"
120+
"dev.zio" %%% "zio-json" % "0.7.39"
116121
)
117122
)
118123
.enablePlugins(ScalaJSPlugin)

example/src/main/scala/example/AnimatedCount.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package example
22

3-
import com.raquo.laminar.api.L.*
43
import animus.*
4+
import com.raquo.laminar.api.L.*
55

66
case class AnimatedCount($count: Signal[Int]) extends Component:
77
val $digits: Signal[List[(String, Int)]] =

example/src/main/scala/example/AnimatedTitle.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package example
22

3-
import com.raquo.laminar.api.L.*
43
import animus.*
4+
import com.raquo.laminar.api.L.*
55

66
object AnimatedTitle extends Component:
77
val activeVar = Var(true)
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package example
22

3-
import com.raquo.laminar.api.L._
3+
import com.raquo.laminar.api.L.*
44

55
import scala.language.implicitConversions
66

7-
trait Component {
7+
trait Component:
88
def body: HtmlElement
9-
}
109

11-
object Component {
10+
object Component:
1211
implicit def toLaminarElement(component: Component): HtmlElement = component.body
13-
}

example/src/main/scala/example/Main.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ object Main:
219219
)
220220
},
221221
adjectiveOne.body,
222-
div(s"and"),
222+
div("and"),
223223
AdjectiveView().body
224224
),
225-
div(s"spring animation library for Scala.js.")
225+
div("spring animation library for Scala.js.")
226226
)
227227
// todosView
228228
)
@@ -276,7 +276,7 @@ object Main:
276276

277277
def body =
278278
div(
279-
cls(s"flex flex-col my-[8px] mx-2 overflow-hidden not-italic"),
279+
cls("flex flex-col my-[8px] mx-2 overflow-hidden not-italic"),
280280
// skew
281281
transform("skewX(-15deg)"),
282282
fontFamily("Bebas Neue"),

example/src/main/scala/example/PerformanceTest.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package example
22

33
import animus.SignalOps
4-
import com.raquo.laminar.api.L._
4+
import com.raquo.laminar.api.L.*
55

66
import scala.util.Random
77

8-
object PerformanceTest {
8+
object PerformanceTest:
99
val positionVar: Var[Double] = Var(0.0)
1010

1111
def every[A](a: => A, ms: => Int = 300): Signal[A] =
@@ -15,7 +15,7 @@ object PerformanceTest {
1515

1616
val colors = Vector("#888", "#ccc", "#ddd", "#fff")
1717

18-
def randomCube = {
18+
def randomCube =
1919

2020
def coord =
2121
((Random.nextDouble() * 150) - 75 + mousePosition._1, (Random.nextDouble() * 150) - 75 + mousePosition._2)
@@ -30,7 +30,6 @@ object PerformanceTest {
3030
svg.x <-- $xyPosition.map(_._1).px,
3131
svg.y <-- $xyPosition.map(_._2).px
3232
)
33-
}
3433

3534
def body: Div =
3635
div(
@@ -61,4 +60,3 @@ object PerformanceTest {
6160
// left <-- positionVar.signal.sprinkle.px
6261
// )
6362
)
64-
}

example/src/main/scala/example/TimeWasted.scala

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package example
22

3-
import animus._
4-
import com.raquo.laminar.api.L._
3+
import animus.*
4+
import com.raquo.laminar.api.L.*
55

66
import scala.util.Random
77

8-
object TimeWasted extends Component {
8+
object TimeWasted extends Component:
99
val $count: Signal[Int] =
1010
EventStream.periodic(1000).toSignal(0)
1111

@@ -78,5 +78,3 @@ object TimeWasted extends Component {
7878
)
7979
)
8080
)
81-
82-
}

example/src/main/scala/example/components/package.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package example
22

3-
import animus._
4-
import com.raquo.laminar.api.L._
3+
import animus.*
4+
import com.raquo.laminar.api.L.*
55

6-
package object components {
6+
package object components:
77
def FadeInWords(string: String, delay: Int = 0): Modifier[HtmlElement] =
88
string.split(" ").zipWithIndex.toList.map { case (word, idx) =>
99
val $opacity = Animation.from(0).wait(delay + 150 * idx).to(1).run
@@ -60,4 +60,3 @@ package object components {
6060
// )
6161
// )
6262
//
63-
}

0 commit comments

Comments
 (0)