Public Access
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
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user