Skip to content

Commit d424ec9

Browse files
author
Sven Behrens
committed
Add scalafmt and .editorconfig
1 parent 2b6ce66 commit d424ec9

File tree

3 files changed

+48
-5
lines changed

3 files changed

+48
-5
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.scalafmt.conf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version = "3.8.1"
2+
3+
runner.dialect = scala213
4+
5+
preset = defaultWithAlign
6+
7+
maxColumn = 120
8+
9+
assumeStandardLibraryStripMargin = true
10+
11+
align {
12+
arrowEnumeratorGenerator = true
13+
}
14+
15+
newlines {
16+
penalizeSingleSelectMultiArgList = true
17+
}
18+
19+
rewrite {
20+
rules = [Imports, PreferCurlyFors, RedundantParens]
21+
imports.sort = scalastyle
22+
}
23+
24+
docstrings.wrap=no
25+
26+
// only format files tracked by git
27+
project.git = true

project/plugins.sbt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
2-
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
1+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
2+
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
44
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
5-
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
6-
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.4")
5+
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
6+
addSbtPlugin("io.get-coursier" % "sbt-shading" % "2.1.4")
7+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0")

0 commit comments

Comments
 (0)