From 6c7550ee563b92e1b6e4d403741cbcb748a0e876 Mon Sep 17 00:00:00 2001 From: Uriel Date: Mon, 16 Jan 2023 11:27:08 -0300 Subject: [PATCH] Add .editorconfig (#469) --- .editorconfig | 23 +++++++++++++++++++++++ .vscode/extensions.json | 3 ++- server/build.gradle.kts | 7 ++++--- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..5e8edbf21 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +root = true + +[*] +trim_trailing_whitespace = true +insert_final_newline = true +charset = utf-8 + +# Fluent files only support spaces for indentation +[*.ftl] +indent_size = 4 +indent_style = space + +# Current config in eslint uses 2 spaces for indentation +[*.{.tsx,ts,jsx,js}] +indent_size = 2 +indent_style = space +max_line_length = 88 + +# This is how everything should actually be +[*.{kt,kts,java,rs}] +indent_size = 4 +indent_style = tab +max_line_length = 88 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 12570e88f..e3f58fce8 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -8,7 +8,8 @@ "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "rust-lang.rust-analyzer", - "bradlc.vscode-tailwindcss" + "bradlc.vscode-tailwindcss", + "EditorConfig.EditorConfig" ], // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [] diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 2d71672ea..0a8b3795c 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -52,10 +52,11 @@ allprojects { dependencies { implementation(project(":solarxr-protocol")) - // This dependency is used internally, and not exposed to consumers on their own compile classpath. + // This dependency is used internally, + // and not exposed to consumers on their own compile classpath. implementation("com.google.flatbuffers:flatbuffers-java:22.10.26") implementation("commons-cli:commons-cli:1.3.1") - implementation("com.fasterxml.jackson.core:jackson-databind:2.12.6.1") + implementation("com.fasterxml.jackson.core:jackson-databind:2.12.7.1") implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3") implementation("com.github.jonpeterson:jackson-module-model-versioning:1.2.2") @@ -137,7 +138,7 @@ configure { mapOf( "indent_size" to 4, "indent_style" to "tab", - "max_line_length" to 88, +// "max_line_length" to 88, "ktlint_experimental" to "enabled" ) val ktlintVersion = "0.47.1"