Skip to content

Commit e8f690e

Browse files
twslilia-db
andauthored
Add devcontainer (#1571)
## Changes In order to supply a standardized development environment for further development, I decided to add a devcontainer. This also updates yarn to the latest stable version, as the mentioned yarn version was released almost exactly 3 years ago. Fix #1572 ## Tests Tested manually --------- Co-authored-by: Ilia Babanov <[email protected]>
1 parent 9ebc70c commit e8f690e

File tree

3 files changed

+62
-5
lines changed

3 files changed

+62
-5
lines changed

.devcontainer/devcontainer.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
3+
{
4+
"name": "Node.js & TypeScript",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
7+
"containerEnv": {
8+
"COREPACK_ENABLE_DOWNLOAD_PROMPT": "0"
9+
},
10+
// Features to add to the dev container. More info: https://containers.dev/features.
11+
"features": {
12+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
13+
"ghcr.io/devcontainers/features/git:1": {},
14+
"ghcr.io/devcontainers/features/github-cli:1": {},
15+
"ghcr.io/devcontainers-extra/features/act:1": {},
16+
"ghcr.io/devcontainers-extra/features/actionlint:1": {}
17+
},
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
20+
// Use 'postCreateCommand' to run commands after the container is created.
21+
"postCreateCommand": "sudo corepack enable yarn && sudo corepack install && yarn install",
22+
// Use 'postStartCommand' to run commands after the container is started.
23+
"postStartCommand": "yarn -v",
24+
// Configure tool-specific properties.
25+
"customizations": {
26+
"vscode": {
27+
"settings": {
28+
"editor.tabSize": 4,
29+
"editor.renderWhitespace": "all",
30+
"editor.formatOnPaste": false,
31+
"editor.formatOnSave": true,
32+
"editor.rulers": [
33+
120
34+
],
35+
"editor.defaultFormatter": "esbenp.prettier-vscode",
36+
"[typescript]": {
37+
"editor.defaultFormatter": "esbenp.prettier-vscode"
38+
},
39+
"[javascript]": {
40+
"editor.defaultFormatter": "esbenp.prettier-vscode"
41+
}
42+
},
43+
"extensions": [
44+
"dbaeumer.vscode-eslint",
45+
"connor4312.esbuild-problem-matchers",
46+
"ms-vscode.extension-test-runner",
47+
"amodio.tsl-problem-matcher",
48+
"esbenp.prettier-vscode",
49+
"Tobermory.es6-string-html"
50+
]
51+
}
52+
},
53+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
54+
// "remoteUser": "root"
55+
}

.yarnrc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
checksumBehavior: update
2+
3+
enableTelemetry: 0
4+
15
nodeLinker: node-modules
26

37
plugins:
@@ -9,5 +13,3 @@ plugins:
913
spec: "@yarnpkg/plugin-version"
1014

1115
yarnPath: .yarn/releases/yarn-3.2.1.cjs
12-
13-
checksumBehavior: update

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,11 +1469,11 @@ __metadata:
14691469
linkType: hard
14701470

14711471
"@types/node@npm:^18.19.23":
1472-
version: 18.19.75
1473-
resolution: "@types/node@npm:18.19.75"
1472+
version: 18.19.80
1473+
resolution: "@types/node@npm:18.19.80"
14741474
dependencies:
14751475
undici-types: ~5.26.4
1476-
checksum: 8f780a51a2dc1d597b104a2c33a2ab175fda492defbaab2cbb5fd098124d867ebed7cda0eaf80309bba25fbd4e41b4a04c91b7f14b50547b4377a39ccf749a7c
1476+
checksum: 08f5be60721d6b37c96dbef9124caf1a27ae1059d7cb1029d9da7d93be25b985106b6bd27af5f65550e20b481aa1985e3d47a63ae6b178b93ac9be5272a12907
14771477
languageName: node
14781478
linkType: hard
14791479

0 commit comments

Comments
 (0)