From 9e6660cf2eef54ae53a11bff43aa65005fb1c6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20R=C3=BChl?= Date: Mon, 9 Dec 2024 09:33:31 +0100 Subject: [PATCH 1/6] Update SETUP.md to include part about format on save Related to #1263 --- docs/development/SETUP.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/development/SETUP.md b/docs/development/SETUP.md index ee91da3d2..c8a4addfe 100644 --- a/docs/development/SETUP.md +++ b/docs/development/SETUP.md @@ -62,6 +62,24 @@ VEDA-UI includes a GitHub action for checking TypeScript and lint errors. If you #### Pre-commit Hook Additionally, there's a pre-commit hook that performs the same error checks. This helps developers identify and address issues at an earlier stage. If you need to bypass the check (to make a local temporary commit etc.), include the `--no-verify`` flag in your commit command. +#### Format on Save +While the existing checks ensure that no linting errors are introduced into the main branch, enabling "Format on Save" in your code editor provides an additional layer of convenience. It helps catch formatting issues early in the development process, minimizing the risk of committing errors and ensuring consistent code style across the team. + +##### How to Set Up Format on Save in VS Code +Install Required Extensions: + +1. Install the ESLint extension ("dbaeumer.vscode-eslint"). +2. Enable Format on Save in the settings (Cmd+, on macOS) +3. Configure Formatter Settings: + Ensure ESLint is set as the default formatter: + ```json + "editor.defaultFormatter": "dbaeumer.vscode-eslint" + ``` +5. Test the Configuration: + Make a change to any file in your project, save it, and verify that it is automatically formatted. + +Note: The project contains a file `.vscode/settings.json.sample` with our recommended vscode settings. + ### Testing ## Unit tests From 3fe13df7b916b439713f52ea1e600b01b5aeedcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20R=C3=BChl?= Date: Thu, 12 Dec 2024 16:27:49 +0100 Subject: [PATCH 2/6] Make keyboard shortcut readable --- docs/development/SETUP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/SETUP.md b/docs/development/SETUP.md index c8a4addfe..d996261fb 100644 --- a/docs/development/SETUP.md +++ b/docs/development/SETUP.md @@ -69,7 +69,7 @@ While the existing checks ensure that no linting errors are introduced into the Install Required Extensions: 1. Install the ESLint extension ("dbaeumer.vscode-eslint"). -2. Enable Format on Save in the settings (Cmd+, on macOS) +2. Enable Format on Save in the settings (⌘ Command + , on macOS) 3. Configure Formatter Settings: Ensure ESLint is set as the default formatter: ```json From d92806444cf4f8f84605589816b536ad5920438f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20R=C3=BChl?= Date: Thu, 19 Dec 2024 16:21:02 +0100 Subject: [PATCH 3/6] Update docs/development/SETUP.md --- docs/development/SETUP.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/development/SETUP.md b/docs/development/SETUP.md index 684e87ea7..eee10d62d 100644 --- a/docs/development/SETUP.md +++ b/docs/development/SETUP.md @@ -87,6 +87,7 @@ Install Required Extensions: Make a change to any file in your project, save it, and verify that it is automatically formatted. Note: The project contains a file `.vscode/settings.json.sample` with our recommended vscode settings. +To apply these settings to your workspace in VS Code, rename the file to `.vscode/settings.json` by removing the `.sample` extension. ### Conventional Commit From 1cdb6d39a084f8313a7b78b4772c9d71d984e259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20R=C3=BChl?= Date: Thu, 19 Dec 2024 16:22:46 +0100 Subject: [PATCH 4/6] Update docs/development/SETUP.md --- docs/development/SETUP.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/development/SETUP.md b/docs/development/SETUP.md index eee10d62d..29c73c903 100644 --- a/docs/development/SETUP.md +++ b/docs/development/SETUP.md @@ -80,6 +80,9 @@ Install Required Extensions: 2. Enable Format on Save in the settings (⌘ Command + , on macOS) 3. Configure Formatter Settings: Ensure ESLint is set as the default formatter: + **Using Settings UI**: Open the Command Palette (Cmd+Shift+P or Ctrl+Shift+P), select Preferences: Open Settings (UI), search "default formatter," and select ESLint. + + **Using JSON**: Open Preferences: Open User Settings (JSON) and add: ```json "editor.defaultFormatter": "dbaeumer.vscode-eslint" ``` From 480495c73c78362e586ad5ecedc5ed19b9ea7a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20R=C3=BChl?= Date: Thu, 19 Dec 2024 16:25:26 +0100 Subject: [PATCH 5/6] Update docs/development/SETUP.md --- docs/development/SETUP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/SETUP.md b/docs/development/SETUP.md index 29c73c903..04b1f1311 100644 --- a/docs/development/SETUP.md +++ b/docs/development/SETUP.md @@ -80,7 +80,7 @@ Install Required Extensions: 2. Enable Format on Save in the settings (⌘ Command + , on macOS) 3. Configure Formatter Settings: Ensure ESLint is set as the default formatter: - **Using Settings UI**: Open the Command Palette (Cmd+Shift+P or Ctrl+Shift+P), select Preferences: Open Settings (UI), search "default formatter," and select ESLint. + **Using Settings UI**: Open the Command Palette (⌘ Command+Shift+P on macOS), select Preferences: Open Settings (UI), search "default formatter," and select ESLint _dbaeumer.vscode-eslint_. **Using JSON**: Open Preferences: Open User Settings (JSON) and add: ```json From fc0375ebaca1c4994dfa48c06926ee62fd4af3cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alice=20R=C3=BChl?= Date: Thu, 19 Dec 2024 16:26:15 +0100 Subject: [PATCH 6/6] Update docs/development/SETUP.md --- docs/development/SETUP.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/development/SETUP.md b/docs/development/SETUP.md index 04b1f1311..6af079f04 100644 --- a/docs/development/SETUP.md +++ b/docs/development/SETUP.md @@ -80,6 +80,7 @@ Install Required Extensions: 2. Enable Format on Save in the settings (⌘ Command + , on macOS) 3. Configure Formatter Settings: Ensure ESLint is set as the default formatter: + **Using Settings UI**: Open the Command Palette (⌘ Command+Shift+P on macOS), select Preferences: Open Settings (UI), search "default formatter," and select ESLint _dbaeumer.vscode-eslint_. **Using JSON**: Open Preferences: Open User Settings (JSON) and add: