Skip to content

Commit 50bcae1

Browse files
committed
Update devcontainer, ESLint 10 migration, and dependency refresh
1 parent b3e6155 commit 50bcae1

File tree

6 files changed

+497
-972
lines changed

6 files changed

+497
-972
lines changed

.devcontainer/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# --------------------------------------------------------------------
55
# BEGIN Standard MS Devcontainer for Typescript-Node
66

7-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.155.1/containers/typescript-node/.devcontainer/base.Dockerfile
8-
# [Choice] Node.js version: 14, 12, 10
9-
ARG VARIANT="22-bullseye"
10-
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:1-${VARIANT}
7+
# See here for image contents: https://github.com/devcontainers/images/tree/main/src/typescript-node
8+
# [Choice] Node.js version comes from the base devcontainer variant
9+
ARG VARIANT="24-bookworm"
10+
FROM mcr.microsoft.com/devcontainers/typescript-node:${VARIANT}
1111

1212
# [Optional] Uncomment if you want to install an additional version of node using nvm
1313
# ARG EXTRA_NODE_VERSION=10
@@ -24,7 +24,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:1-${VARIANT}
2424
# Install EMSDK to /emsdk just like the EMSDK Dockerfile: https://github.com/emscripten-core/emsdk/blob/master/docker/Dockerfile
2525
ENV EMSDK /emsdk
2626
# We pin the EMSDK version rather than 'latest' so that everyone is using the same compiler version
27-
ENV EMSCRIPTEN_VERSION 4.0.5
27+
ENV EMSCRIPTEN_VERSION 5.0.0
2828

2929
RUN git clone https://github.com/emscripten-core/emsdk.git $EMSDK
3030

@@ -72,5 +72,5 @@ RUN echo 'export EM_NODE_JS="$EMSDK_NODE"' >> /etc/bash.bashrc
7272

7373
# Install wget, gnupg, and sha3sum
7474
RUN apt-get update \
75-
&& apt-get install -y wget gnupg libdigest-sha3-perl \
76-
&& rm -rf /var/lib/apt/lists/*
75+
&& apt-get install -y wget gnupg libdigest-sha3-perl default-jre-headless \
76+
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"dockerfile": "Dockerfile",
77
// Update 'VARIANT' to pick a Node version
88
"args": {
9-
"VARIANT": "22-bullseye"
9+
"VARIANT": "24-bookworm"
1010
}
1111
},
1212
// Use 'forwardPorts' to make a list of ports inside the container available locally.
@@ -17,4 +17,4 @@
1717
"postCreateCommand": "npm ci",
1818
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
1919
"remoteUser": "node"
20-
}
20+
}

eslint.config.cjs

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"use strict";
2+
3+
const js = require("@eslint/js");
4+
const globals = require("globals");
5+
6+
module.exports = [
7+
{
8+
ignores: [
9+
".eslintrc.js",
10+
"dist/**",
11+
"examples/**",
12+
"documentation/**",
13+
"node_modules/**",
14+
"out/**",
15+
"src/shell-post.js",
16+
"src/shell-pre.js",
17+
"test/**"
18+
]
19+
},
20+
js.configs.recommended,
21+
{
22+
files: ["**/*.js"],
23+
languageOptions: {
24+
ecmaVersion: 5,
25+
sourceType: "script",
26+
globals: {
27+
...globals.browser,
28+
...globals.node,
29+
...globals.es2015,
30+
Atomics: "readonly",
31+
SharedArrayBuffer: "readonly"
32+
}
33+
},
34+
rules: {
35+
camelcase: "off",
36+
"comma-dangle": "off",
37+
"dot-notation": "off",
38+
indent: ["error", 4, { SwitchCase: 1 }],
39+
"max-len": ["error", { code: 80 }],
40+
"no-bitwise": "off",
41+
"no-cond-assign": ["error", "except-parens"],
42+
"no-param-reassign": "off",
43+
"no-throw-literal": "off",
44+
"no-useless-assignment": "off",
45+
"no-var": "off",
46+
"no-unused-vars": ["error", { caughtErrors: "none" }],
47+
"object-shorthand": "off",
48+
"prefer-arrow-callback": "off",
49+
"prefer-destructuring": "off",
50+
"prefer-spread": "off",
51+
"prefer-template": "off",
52+
quotes: ["error", "double"],
53+
strict: "off",
54+
"vars-on-top": "off"
55+
}
56+
}
57+
];

0 commit comments

Comments
 (0)