diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..2b86cdb02 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,28 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +trim_trailing_whitespace = true +# We shall not define indent_size ⬇️ when using tabs. +# tab_width doesn't make much sense as it can be left to the reader to decide. +indent_style = tab +insert_final_newline = true + +[**.{js,jsx,ts,tsx}] +indent_size = 2 +max_line_length = 80 + + +[**.{yml,yaml}] +# Spaces are mandatory for yaml files: +indent_style = space +indent_size = 2 +# A high max_line_length is needed as prettier doesn't manage property-name +# line-wrapping correctly: +# See https://github.com/prettier/prettier/issues/5599 +max_line_length = 1000 +trim_trailing_whitespace = false + +[*.md] +trim_trailing_whitespace = false diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 5adefc0b1..000000000 --- a/.prettierrc +++ /dev/null @@ -1,14 +0,0 @@ -{ - "bracketSpacing": true, - "useTabs": true, - "semi": false, - "singleQuote": true, - "overrides": [ - { - "files": "*.yaml", - "options": { - "printWidth": 1000 - } - } - ] -} diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 000000000..857612a22 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,3 @@ +bracketSpacing: true +semi: false +singleQuote: true