From e88c17ce515d0b87c3acf697f0e754eca00caed5 Mon Sep 17 00:00:00 2001 From: fbachus Date: Fri, 5 Jun 2026 20:52:38 +0200 Subject: [PATCH] tooling(style): add .editorconfig and change formatter settings editorconfig contains entries for yml and dart now the formatter will no longer collapse multiline code splits (like class constructors), where the last entry has a trailing comma --- .editorconfig | 17 +++++++++++++++++ analysis_options.yaml | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5c75f7a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# EditorConfig is awesome: https://editorconfig.org + +# top-most EditorConfig file +root = true + +[*] +end_of_line = lf +insert_final_newline = false +trim_trailing_whitespace = true + +[*.dart] +indent_style = space +indent_size = 2 + +[*.yaml,*.yml] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/analysis_options.yaml b/analysis_options.yaml index 0d29021..edcfd30 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -24,5 +24,10 @@ linter: # avoid_print: false # Uncomment to disable the `avoid_print` rule # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule +formatter: + # collapseable entries, e.g. classes, don't get put into a single line if + # there is a trailing comma behind the last entry + trailing_commas: preserve + # Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +# https://dart.dev/guides/language/analysis-options \ No newline at end of file