From 7c8c6ab6489f76319e27ede2ad87ad101d2e6ad8 Mon Sep 17 00:00:00 2001 From: Gabriele Venturi Date: Mon, 14 Oct 2024 09:04:28 +0200 Subject: [PATCH] build: add prettier format on save --- .vscode/settings.json | 20 ++++++++++++++++++++ frontend/.prettierrc | 6 ++++++ settings.json | 20 ++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 frontend/.prettierrc create mode 100644 settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a2650a8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "editor.formatOnSave": true, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "prettier.configPath": "frontend/.prettierrc", + "prettier.ignorePath": "frontend/.prettierignore", + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + }, + "ruff.organizeImports": true, + "ruff.fixAll": true, + "ruff.path": ["backend"] +} diff --git a/frontend/.prettierrc b/frontend/.prettierrc new file mode 100644 index 0000000..8f1866a --- /dev/null +++ b/frontend/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": true, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5" +} diff --git a/settings.json b/settings.json new file mode 100644 index 0000000..a2650a8 --- /dev/null +++ b/settings.json @@ -0,0 +1,20 @@ +{ + "editor.formatOnSave": true, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "prettier.configPath": "frontend/.prettierrc", + "prettier.ignorePath": "frontend/.prettierignore", + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff" + }, + "ruff.organizeImports": true, + "ruff.fixAll": true, + "ruff.path": ["backend"] +}