Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 628 Bytes

readme.md

File metadata and controls

37 lines (24 loc) · 628 Bytes

JsonMacroFormatter

Scalafix rule to format json contained within Circe json literals.

E.g.

Before formatting:

val obj = json"""{"key":"value"}"""

val interpolatedObj =
  json"""{"key" : ${ obj }}"""

After formatting:

val obj = json"""{
            "key" : "value"
          }"""

val interpolatedObj =
  json"""{
    "key" : ${obj}
  }"""

Usage

Add to build.sbt:

ThisBuild / scalafixDependencies += "com.github.xplosunn" %% "JsonMacroFormatter" % "0.0.8"

Add to .scalafix.conf:

fix.JsoMacroFormatter