devcontainer: inital config

This adds a devcontainer config for devs to have an easy way to get a working dev environment.
This commit is contained in:
David Lechner
2024-02-19 22:50:14 -06:00
committed by David Lechner
parent 4c4ce8f375
commit 3a57f40a93
5 changed files with 49 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
FROM mcr.microsoft.com/devcontainers/typescript-node:1-18-bookworm
# Install the xz-utils package
RUN apt-get update && apt-get install -y libpango1.0-dev
+33
View File
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Pybricks Code",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "Dockerfile"
},
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "yarn",
// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"psioniq.psi-header"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
+10
View File
@@ -1,3 +1,9 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot
version: 2
updates:
- package-ecosystem: npm
@@ -9,3 +15,7 @@ updates:
- dependency-name: "@types/node"
versions:
- ">= 19.a"
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
+1 -1
View File
@@ -12,7 +12,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.validate": [
"javascript",
+2
View File
@@ -16,6 +16,8 @@ will do nice things like automatically format the code for you.
These are the required software tools you need to install on your computer.
Alternatly, you can use a devcontainer locally via Docker or using GitHub Codespaces.
### Node.js
We are using [Node.js][node] v18.x. We recommend using a tool such as [asdf][asdf]