From 977b49f659b19103ecb2333cf5160d1abd350f06 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Thu, 20 Feb 2025 13:24:37 +0100 Subject: [PATCH] chore: Configueer formatting Prettier en .editorconfig --- frontend/.editorconfig => .editorconfig | 17 ++++++++++------- frontend/.prettierrc.json | 7 ------- frontend/prettier.config.js | 11 +++++++++++ prettier.config.js | 13 +++++++++++++ 4 files changed, 34 insertions(+), 14 deletions(-) rename frontend/.editorconfig => .editorconfig (53%) delete mode 100644 frontend/.prettierrc.json create mode 100644 frontend/prettier.config.js create mode 100644 prettier.config.js diff --git a/frontend/.editorconfig b/.editorconfig similarity index 53% rename from frontend/.editorconfig rename to .editorconfig index 7f5b23fc..f81c6724 100644 --- a/frontend/.editorconfig +++ b/.editorconfig @@ -1,9 +1,12 @@ -[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}] -charset = utf-8 -indent_size = 2 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true +# top-most EditorConfig file +root = true +[*] +indent_style = space +indent_size = tab +tab_width = 4 end_of_line = lf -max_line_length = 100 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 \ No newline at end of file diff --git a/frontend/.prettierrc.json b/frontend/.prettierrc.json deleted file mode 100644 index 17a23d07..00000000 --- a/frontend/.prettierrc.json +++ /dev/null @@ -1,7 +0,0 @@ - -{ - "$schema": "https://json.schemastore.org/prettierrc", - "semi": false, - "singleQuote": true, - "printWidth": 100 -} diff --git a/frontend/prettier.config.js b/frontend/prettier.config.js new file mode 100644 index 00000000..00145504 --- /dev/null +++ b/frontend/prettier.config.js @@ -0,0 +1,11 @@ +/** + * @type {import("prettier").Options} + */ + +const rootConfig = import ('../prettier.config.js'); + +export default { + ...rootConfig, + vueIndentScriptAndStyle: true, + singleAttributePerLine: true +}; diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..f78ee017 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,13 @@ +/** + * @type {import("prettier").Options} + */ +export default { + printWidth: 80, + semi: true, + singleQuote: true, + trailingComma: 'es5', + bracketSpacing: true, + objectWrap: 'preserve', + bracketSameLine: false, + arrowParens: 'always', +}