diff --git a/.scalafmt.conf b/.scalafmt.conf new file mode 100644 index 0000000..3c89bd1 --- /dev/null +++ b/.scalafmt.conf @@ -0,0 +1,7 @@ +version = "2.7.5" +align.preset = more +docstrings = JavaDoc +assumeStandardLibraryStripMargin = true +project.git = true +maxColumn = 100 +trailingCommas = multiple diff --git a/build.sbt b/build.sbt index 6d6a88a..09d8717 100644 --- a/build.sbt +++ b/build.sbt @@ -1,18 +1,19 @@ -lazy val root = project.in(file(".")) +lazy val root = project + .in(file(".")) .aggregate(scalaLibraryNextJVM, scalaLibraryNextJS) .settings( publish / skip := true, // With CrossType.Pure, the root project also picks up the sources in `src` Compile / unmanagedSourceDirectories := Nil, - Test / unmanagedSourceDirectories := Nil, + Test / unmanagedSourceDirectories := Nil, ) lazy val scalaLibraryNext = crossProject(JVMPlatform, JSPlatform) .crossType(CrossType.Pure) .in(file(".")) .jvmSettings( - libraryDependencies += "junit" % "junit" % "4.13.1" % Test, - libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test, + libraryDependencies += "junit" % "junit" % "4.13.1" % Test, + libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test, testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"), ) .jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin)) @@ -21,11 +22,11 @@ lazy val scalaLibraryNext = crossProject(JVMPlatform, JSPlatform) scalaModuleMimaPreviousVersion := None, scalacOptions ++= Seq("-deprecation", "-feature", "-Werror"), libraryDependencies ++= Seq( - "org.scalacheck" %%% "scalacheck" % "1.15.0" % Test, + "org.scalacheck" %%% "scalacheck" % "1.15.0" % Test ), ) .jsSettings( - Test / fork := false, + Test / fork := false ) lazy val scalaLibraryNextJVM = scalaLibraryNext.jvm diff --git a/project/plugins.sbt b/project/plugins.sbt index 5ccad05..f9a6a26 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,3 +1,4 @@ -addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.3") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0") +addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "2.2.3") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.3.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")