From b7d9417abd58bbe213269acb40ea576d22091364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20L=C3=BCscher?= Date: Thu, 27 Apr 2023 06:10:08 +0000 Subject: [PATCH] chore(devcontainer): init for everyone who wants to use it ;) --- .devcontainer/devcontainer.json | 76 ++++++++++++++++++++++++++++++ .devcontainer/forge.code-workspace | 19 ++++++++ .devcontainer/install-dev-tools.sh | 47 ++++++++++++++++++ .gitignore | 0 .gitmessage | 19 ++++++++ .markdownlint.json | 3 ++ .prettierignore | 3 ++ .prettierrc | 3 ++ .vscode/cspell_custom.txt | 0 .vscode/tasks.json | 39 +++++++++++++++ 10 files changed, 209 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/forge.code-workspace create mode 100644 .devcontainer/install-dev-tools.sh create mode 100644 .gitignore create mode 100644 .gitmessage create mode 100644 .markdownlint.json create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 .vscode/cspell_custom.txt create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..dc4b119 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,76 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/alpine +{ + "name": "ublue-os/forge", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:alpine-3.17", + + // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode", + // podman needs this + "containerUser": "vscode", + "runArgs": [ + // run container as current user + "--userns=keep-id", + // disable selinux isolation that breaks bind mounts + "--security-opt=label=disable" + ], + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Mounts from host system + "mounts": [ + "source=/run/user/${localEnv:UID:1000}/podman/podman.sock,target=/run/podman/podman.sock,type=bind" + ], + + // Install DevTools + "postCreateCommand": "bash ./.devcontainer/install-dev-tools.sh", + // Configure tool-specific properties. + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.profiles.linux": { + "zsh": { + "path": "zsh", + "args": ["-l"] + } + }, + "terminal.integrated.defaultProfile.linux": "zsh", + "terminal.integrated.automation.linux": "zsh", + "terminal.integrated.automationProfile.linux": { "path": "zsh" }, + "editor.suggestSelection": "first", + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "cSpell.customDictionaries": { + "project-words": { + "name": "custom-dictionary", + "path": "${workspaceFolder}/.vscode/cspell_custom.txt", + "description": "Words used in this project", + "addWords": true + }, + "custom": true, + "internal-terms": false + }, + "docker.host": "unix:///run/podman/podman.sock", + "peacock.affectActivityBar": false, + "peacock.affectStatusBar": true, + "peacock.affectTitleBar": false, + "peacock.surpriseMeOnStartup": false + }, + "extensions": [ + "bungcip.better-toml", + "DavidAnson.vscode-markdownlint", + "esbenp.prettier-vscode", + "GitHub.vscode-pull-request-github", + "Gruntfuggly.todo-tree", + "kokakiwi.vscode-just", + "ms-azuretools.vscode-docker", + "nico-castell.linux-desktop-file", + "redhat.vscode-yaml", + "shakram02.bash-beautify", + "streetsidesoftware.code-spell-checker" + ] + } + } +} diff --git a/.devcontainer/forge.code-workspace b/.devcontainer/forge.code-workspace new file mode 100644 index 0000000..c1e45ec --- /dev/null +++ b/.devcontainer/forge.code-workspace @@ -0,0 +1,19 @@ +{ + "folders": [ + { + "path": ".." + } + ], + "settings": { + "workbench.colorCustomizations": { + "sash.hoverBorder": "#7cb9e3", + "statusBar.background": "#52a2da", + "statusBarItem.hoverBackground": "#2c8bcd", + "statusBarItem.remoteBackground": "#52a2da", + "statusBar.foreground": "#15202b", + "statusBarItem.remoteForeground": "#15202b" + }, + "peacock.remoteColor": "#52a2da", + "cSpell.enableFiletypes": ["shellscript"] + } +} diff --git a/.devcontainer/install-dev-tools.sh b/.devcontainer/install-dev-tools.sh new file mode 100644 index 0000000..9860fc7 --- /dev/null +++ b/.devcontainer/install-dev-tools.sh @@ -0,0 +1,47 @@ +#!/bin/bash +cat <(optional scope): + +[optional body] + +[optional footer(s)] + +#### +# Allowed values +# --------------------- +# feat: –> A new feature +# fix: –> Fixed a bug +# refactor: –> A code change that's not mainly a bug or new feature +# docs: –> Documentation only changes +# style: –> Changes to styling like white space, formatting, semi-colons) +# chore: –> Other changes that don't modify src or test files +# ci: –> Changes made to the CI configuration like Travis, Circle, Actions +# revert: –> Revert a previous commit +# test: –> Add or fix tests +#### diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..8b4473c --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,3 @@ +{ + "MD024": { "allow_different_nesting": true } +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..523402d --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# Created by https://github.com/google-github-actions/release-please-action +CHANGELOG.md +version.txt \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..75fa134 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "tabWidth": 2 +} diff --git a/.vscode/cspell_custom.txt b/.vscode/cspell_custom.txt new file mode 100644 index 0000000..e69de29 diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..c2da266 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,39 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Git: Fetch upstream", + "type": "shell", + "command": "git fetch upstream", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Git: Merge from upstream", + "type": "shell", + "command": "git merge --no-ff --no-commit upstream/main", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Git: Delete merged branches", + "type": "shell", + "command": "git delete-merged-branches", + "options": { + "cwd": "${workspaceFolder}" + } + }, + { + "label": "Git: Prune remote", + "type": "shell", + "command": "git remote prune origin", + "options": { + "cwd": "${workspaceFolder}" + } + } + ] +}