Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add devcontainer #1127

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ARG VARIANT=bullseye
FROM --platform=linux/amd64 mcr.microsoft.com/devcontainers/base:0-${VARIANT}

# install deno
ENV DENO_INSTALL=/deno
RUN mkdir -p /deno \
&& curl -fsSL https://deno.land/x/install/install.sh | sh \
&& chown -R vscode /deno

ENV PATH=${DENO_INSTALL}/bin:${PATH} \
DENO_DIR=${DENO_INSTALL}/.cache/deno
29 changes: 29 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "Deno",
"build": {
"dockerfile": "Dockerfile"
},

"customizations": {
"vscode": {
"settings": {
// Enables the project as a Deno project
"deno.enable": true,
// Enables Deno linting for the project
"deno.lint": true,
// Sets Deno as the default formatter for the project
"editor.defaultFormatter": "denoland.vscode-deno"
},

"extensions": [
"denoland.vscode-deno"
]
}
},

"remoteUser": "vscode",
"features": {
// Add rust support
"ghcr.io/devcontainers/features/rust:1": {}
}
}
1 change: 1 addition & 0 deletions tools/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const p3 = await Deno.run({
"www/pages",
"docs/rules",
"README.md",
".devcontainer",
],
stdin: "null",
}).status();
Expand Down