diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..19dcffaf5 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..c660a3ccf --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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": {} + } +} \ No newline at end of file diff --git a/tools/format.ts b/tools/format.ts index fca615d5f..d8396d1f7 100755 --- a/tools/format.ts +++ b/tools/format.ts @@ -37,6 +37,7 @@ const p3 = await Deno.run({ "www/pages", "docs/rules", "README.md", + ".devcontainer", ], stdin: "null", }).status();