From 4638cf9e47e01eabe54b13716026722cde979ef6 Mon Sep 17 00:00:00 2001 From: Kalle <15094562+ThatKalle@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:11:05 +0100 Subject: [PATCH 1/6] Add inital devcontainer --- .devcontainer/Dockerfile | 15 +++++++++++++++ .devcontainer/devcontainer.json | 26 ++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..70ada49 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +# trunk-ignore-all(trivy/DS026) +# trunk-ignore-all(trivy/DS002) +# trunk-ignore-all(checkov/CKV_DOCKER_2) +# trunk-ignore-all(checkov/CKV_DOCKER_3) +FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12 + +# trunk-ignore(terrascan/AC_DOCKER_0002) +# trunk-ignore(hadolint/DL3008) +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + ca-certificates \ + git \ + wget \ + zip \ + && apt-get clean && rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..fa9bacc --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,26 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +{ + "name": "Meshtastic Device-UI Dev", + "build": { + "dockerfile": "Dockerfile" + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/trunk-io/devcontainer-feature/trunk:1": {}, + "ghcr.io/devcontainers/features/node:1": {} + }, + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "Trunk.io", + "ms-vscode.cpptools-extension-pack", + "ms-azuretools.vscode-docker" + ] + } + }, + + "postCreateCommand": "npm i lv_i18n -g" +} From 0e5a5dfe95d05d998f9d474384fed12774678d53 Mon Sep 17 00:00:00 2001 From: Kalle <15094562+ThatKalle@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:12:22 +0100 Subject: [PATCH 2/6] Add vscode config --- .vscode/extensions.json | 3 +++ .vscode/settings.json | 11 +++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..d253f78 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Trunk.io"] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..1de1191 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "trunk.io", + "trunk.enableWindows": true, + "files.insertFinalNewline": false, + "files.trimFinalNewlines": false, + "cmake.configureOnOpen": false, + "[cpp]": { + "editor.defaultFormatter": "trunk.io" + } +} From 86653e3b1ee4747564f2e6a5b58da6f978b2cfb3 Mon Sep 17 00:00:00 2001 From: Kalle <15094562+ThatKalle@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:29:45 +0100 Subject: [PATCH 3/6] remove npm funding message on build --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fa9bacc..3df1033 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,5 +22,5 @@ } }, - "postCreateCommand": "npm i lv_i18n -g" + "postCreateCommand": "npm install lv_i18n -g --no-fund" } From a14a57bc67f54f23d7ad12cbc75bf0ccf2f2d6c4 Mon Sep 17 00:00:00 2001 From: Kalle <15094562+ThatKalle@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:43:00 +0100 Subject: [PATCH 4/6] add vscode settings to devcontainer --- .devcontainer/devcontainer.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3df1033..da8824d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,7 +18,18 @@ "Trunk.io", "ms-vscode.cpptools-extension-pack", "ms-azuretools.vscode-docker" - ] + ], + "settings": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "trunk.io", + "trunk.enableWindows": true, + "files.insertFinalNewline": false, + "files.trimFinalNewlines": false, + "cmake.configureOnOpen": false, + "[cpp]": { + "editor.defaultFormatter": "trunk.io" + } + } } }, From 79e4cb032e113f9d3e52727950ae71ffaf16972d Mon Sep 17 00:00:00 2001 From: Kalle <15094562+ThatKalle@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:51:00 +0100 Subject: [PATCH 5/6] Add helpers --- .devcontainer/devcontainer.json | 2 +- .vscode/extensions.json | 2 ++ .vscode/settings.json | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index da8824d..39dd3ca 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// For format details, see https://aka.ms/devcontainer.json. { "name": "Meshtastic Device-UI Dev", "build": { diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d253f78..2838c0e 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,5 @@ { + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format. "recommendations": ["Trunk.io"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 1de1191..4ceda58 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,6 @@ { + // See https://code.visualstudio.com/docs/getstarted/settings#_settings-json-file + // for the documentation about the settings.json format. "editor.formatOnSave": true, "editor.defaultFormatter": "trunk.io", "trunk.enableWindows": true, From 2db2d19bd1a5abd97512ef748a02446bfd9fe10a Mon Sep 17 00:00:00 2001 From: Kalle <15094562+ThatKalle@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:42:53 +0100 Subject: [PATCH 6/6] trunk fmt --- .devcontainer/devcontainer.json | 60 ++++++++++++++++----------------- .vscode/extensions.json | 6 ++-- .vscode/settings.json | 22 ++++++------ 3 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 39dd3ca..d8a7e10 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,37 +1,37 @@ // For format details, see https://aka.ms/devcontainer.json. { - "name": "Meshtastic Device-UI Dev", - "build": { - "dockerfile": "Dockerfile" - }, + "name": "Meshtastic Device-UI Dev", + "build": { + "dockerfile": "Dockerfile" + }, - // Features to add to the dev container. More info: https://containers.dev/features. - "features": { - "ghcr.io/trunk-io/devcontainer-feature/trunk:1": {}, - "ghcr.io/devcontainers/features/node:1": {} - }, + // Features to add to the dev container. More info: https://containers.dev/features. + "features": { + "ghcr.io/trunk-io/devcontainer-feature/trunk:1": {}, + "ghcr.io/devcontainers/features/node:1": {} + }, - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "Trunk.io", - "ms-vscode.cpptools-extension-pack", - "ms-azuretools.vscode-docker" - ], - "settings": { - "editor.formatOnSave": true, - "editor.defaultFormatter": "trunk.io", - "trunk.enableWindows": true, - "files.insertFinalNewline": false, - "files.trimFinalNewlines": false, - "cmake.configureOnOpen": false, - "[cpp]": { - "editor.defaultFormatter": "trunk.io" - } - } + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "Trunk.io", + "ms-vscode.cpptools-extension-pack", + "ms-azuretools.vscode-docker" + ], + "settings": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "trunk.io", + "trunk.enableWindows": true, + "files.insertFinalNewline": false, + "files.trimFinalNewlines": false, + "cmake.configureOnOpen": false, + "[cpp]": { + "editor.defaultFormatter": "trunk.io" } - }, + } + } + }, - "postCreateCommand": "npm install lv_i18n -g --no-fund" + "postCreateCommand": "npm install lv_i18n -g --no-fund" } diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 2838c0e..2746afa 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,5 @@ { - // See http://go.microsoft.com/fwlink/?LinkId=827846 - // for the documentation about the extensions.json format. - "recommendations": ["Trunk.io"] + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format. + "recommendations": ["Trunk.io"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 4ceda58..395983e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,13 +1,13 @@ { - // See https://code.visualstudio.com/docs/getstarted/settings#_settings-json-file - // for the documentation about the settings.json format. - "editor.formatOnSave": true, - "editor.defaultFormatter": "trunk.io", - "trunk.enableWindows": true, - "files.insertFinalNewline": false, - "files.trimFinalNewlines": false, - "cmake.configureOnOpen": false, - "[cpp]": { - "editor.defaultFormatter": "trunk.io" - } + // See https://code.visualstudio.com/docs/getstarted/settings#_settings-json-file + // for the documentation about the settings.json format. + "editor.formatOnSave": true, + "editor.defaultFormatter": "trunk.io", + "trunk.enableWindows": true, + "files.insertFinalNewline": false, + "files.trimFinalNewlines": false, + "cmake.configureOnOpen": false, + "[cpp]": { + "editor.defaultFormatter": "trunk.io" + } }