Skip to content

Commit 2236699

Browse files
authored
chore: Remove high vulnerabilities (M2-9964) (#181)
- `npm audit fix` to remove vulnerabilities - Upgrade Node `22.15.x` → `24.x.x` - Update ESLint `8.57.1` → `9.39.1` - Migrate `.eslintrc.js` → `eslint.config.js` `npm audit` before: 10 vulnerabilities (1 low, 4 moderate, 5 high) `npm audit` after: 3 vulnerabilities (1 low, 2 moderate) To test changes: 1. Configure `keys` and `outputs` as described in README. 2. Run tests. npm test 3. Run app. docker build -t mindlogger-report-server:latest . docker run -d -v "./keys:/app/keys" -p "3000:3000" --name mindlogger-report-server mindlogger-report-server:latest
1 parent 179a406 commit 2236699

File tree

7 files changed

+1580
-1389
lines changed

7 files changed

+1580
-1389
lines changed

.eslintrc.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.15.0
1+
24

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM node:22-alpine3.20
2-
1+
FROM node:24-alpine3.23
32

43
WORKDIR /app
54

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Server for MindLogger PDF reports
44

55
## Requirements
66

7-
- Node >= 20
7+
- Node >= 24
88

99
## Installation
1010

@@ -76,7 +76,7 @@ open http://localhost:3000
7676
### Build the image first
7777

7878
```
79-
docker build -t mindlogger-report-server:latest -f ./Dockerfile .
79+
docker build -t mindlogger-report-server:latest .
8080
```
8181

8282
### Run the image
@@ -107,4 +107,4 @@ Sometimes a clean install of command line tools is needed on MacOS:
107107
```shell
108108
sudo rm -rf /Library/Developer/CommandLineTools
109109
xcode-select --install
110-
```
110+
```

eslint.config.js

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
const {
2+
defineConfig,
3+
globalIgnores,
4+
} = require("eslint/config");
5+
6+
const tsParser = require("@typescript-eslint/parser");
7+
const typescriptEslintEslintPlugin = require("@typescript-eslint/eslint-plugin");
8+
const unusedImports = require("eslint-plugin-unused-imports");
9+
const globals = require("globals");
10+
const js = require("@eslint/js");
11+
12+
const {
13+
FlatCompat,
14+
} = require("@eslint/eslintrc");
15+
16+
const compat = new FlatCompat({
17+
baseDirectory: __dirname,
18+
recommendedConfig: js.configs.recommended,
19+
allConfig: js.configs.all
20+
});
21+
22+
module.exports = defineConfig([{
23+
languageOptions: {
24+
parser: tsParser,
25+
sourceType: "module",
26+
27+
parserOptions: {
28+
project: "tsconfig.json",
29+
},
30+
31+
globals: {
32+
...globals.node,
33+
...globals.jest,
34+
},
35+
},
36+
37+
plugins: {
38+
"@typescript-eslint": typescriptEslintEslintPlugin,
39+
"unused-imports": unusedImports,
40+
},
41+
42+
extends: compat.extends("plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"),
43+
44+
rules: {
45+
"@typescript-eslint/interface-name-prefix": "off",
46+
"@typescript-eslint/explicit-function-return-type": "off",
47+
"@typescript-eslint/explicit-module-boundary-types": "off",
48+
"@typescript-eslint/no-explicit-any": "off",
49+
"unused-imports/no-unused-imports": "error",
50+
51+
"no-console": ["error", {
52+
allow: ["warn", "error", "info"],
53+
}],
54+
},
55+
}, globalIgnores(["**/.eslintrc.js"])]);

0 commit comments

Comments
 (0)