Skip to content

Commit

Permalink
Merge pull request #131 from armanbilge/pr/organize-imports
Browse files Browse the repository at this point in the history
Organize imports with scalafix
  • Loading branch information
armanbilge authored Jan 14, 2023
2 parents bc9b5cb + b4fad3d commit a05a0e3
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
- name: Test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

- name: Check scalafix lints
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' 'scalafixAll --check'

- name: Check binary compatibility
if: matrix.java == 'temurin@17' && matrix.os == 'ubuntu-latest'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues
Expand Down
3 changes: 3 additions & 0 deletions .scalafix.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
rules = [OrganizeImports]

OrganizeImports.removeUnused = false
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ThisBuild / tlSonatypeUseLegacyHost := false

ThisBuild / crossScalaVersions := Seq("3.2.1")
ThisBuild / scalacOptions ++= Seq("-new-syntax", "-indent", "-source:future")
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.6.0"

ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("17"))
ThisBuild / tlJdkRelease := Some(8)
Expand Down
2 changes: 1 addition & 1 deletion calico/src/main/scala/calico/html.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ import org.scalajs.dom
import shapeless3.deriving.K0

import scala.collection.mutable
import scala.scalajs.js
import scala.collection.mutable.ListBuffer
import scala.scalajs.js

object io extends Html[IO]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

package calico.unsafe

import scala.concurrent.ExecutionContext
import scala.scalajs.js
import scala.scalajs.js.annotation.JSGlobal
import scala.concurrent.ExecutionContext

private[calico] object MicrotaskExecutor extends ExecutionContext:

Expand Down
2 changes: 1 addition & 1 deletion frp/src/main/scala/calico/frp/SignallingSortedMapRef.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import cats.kernel.Order
import cats.syntax.all.*
import fs2.Stream
import fs2.concurrent.Signal
import fs2.concurrent.SignallingRef
import fs2.concurrent.SignallingMapRef
import fs2.concurrent.SignallingRef

import scala.collection.immutable.LongMap
import scala.collection.immutable.SortedMap
Expand Down
1 change: 1 addition & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
val sbtTypelevelVersion = "0.4.18"
addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion)
addSbtPlugin("org.typelevel" % "sbt-typelevel-scalafix" % sbtTypelevelVersion)
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % sbtTypelevelVersion)
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.6")
Expand Down
6 changes: 4 additions & 2 deletions todo-mvc/src/main/scala/todomvc/TodoMvc.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
package todomvc

import calico.*
import calico.frp.{*, given}
import calico.html.io.{*, given}
import calico.frp.*
import calico.frp.given
import calico.html.io.*
import calico.html.io.given
import calico.router.*
import calico.syntax.*
import cats.data.*
Expand Down

0 comments on commit a05a0e3

Please sign in to comment.