Skip to content

Commit ade2f30

Browse files
authored
Upgrade all packages and fix new eslint findings (#96)
1 parent f980243 commit ade2f30

20 files changed

Lines changed: 1248 additions & 952 deletions

.github/workflows/actions.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v5
1616
- uses: actions/setup-node@v5
1717
with:
18-
node-version: 22
18+
node-version: 24
1919
cache: 'npm'
2020
- run: npm install --no-audit --no-fund --cache .npm
2121
- run: npx tsc
@@ -27,7 +27,7 @@ jobs:
2727
- uses: actions/checkout@v5
2828
- uses: actions/setup-node@v5
2929
with:
30-
node-version: 22
30+
node-version: 24
3131
cache: 'npm'
3232
- run: npm install --no-audit --no-fund --cache .npm
3333
- run: npx eslint .
@@ -38,19 +38,21 @@ jobs:
3838
- uses: actions/checkout@v5
3939
- uses: actions/setup-node@v5
4040
with:
41-
node-version: 22
41+
node-version: 24
4242
cache: 'npm'
4343
- run: npm install --no-audit --no-fund --cache .npm
4444
- run: npx tsc
4545
- run: npm test
46+
env:
47+
NODE_OPTIONS: --experimental-vm-modules
4648

4749
generate-schema-has-changes:
4850
runs-on: ubuntu-latest
4951
steps:
5052
- uses: actions/checkout@v5
5153
- uses: actions/setup-node@v5
5254
with:
53-
node-version: 22
55+
node-version: 24
5456
cache: 'npm'
5557
- run: npm install --no-audit --no-fund --cache .npm
5658
- run: npx tsc

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:22.20.0-alpine AS builder
1+
FROM node:24.11.0-alpine AS builder
22
WORKDIR /usr/src/app
33
COPY package*.json /usr/src/app/
44
RUN --mount=type=cache,target=.npm npm install --cache .npm
@@ -7,7 +7,7 @@ COPY src /usr/src/app/src
77
RUN npx tsc
88
RUN find . -name "*.ts" -type f -delete
99

10-
FROM node:22.20.0-alpine
10+
FROM node:24.11.0-alpine
1111
WORKDIR /usr/src/app
1212
COPY package*.json /usr/src/app/
1313
RUN --mount=type=cache,target=.npm npm install --production --cache .npm

eslint.config.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import {defineConfig} from "eslint/config";
2+
import eslint from "@eslint/js";
3+
import stylistic from "@stylistic/eslint-plugin";
4+
import tseslint from "typescript-eslint";
5+
6+
export default defineConfig(
7+
{
8+
ignores: [
9+
"node_modules",
10+
"dist",
11+
"**/*.js",
12+
"**/*.d.ts",
13+
"eslint.config.ts",
14+
],
15+
},
16+
17+
eslint.configs.recommended,
18+
stylistic.configs.all,
19+
20+
{
21+
files: ["**/*.{ts,tsx}"],
22+
extends: [
23+
...tseslint.configs.strictTypeChecked,
24+
...tseslint.configs.stylisticTypeChecked,
25+
],
26+
languageOptions: {
27+
parserOptions: {
28+
projectService: true,
29+
},
30+
},
31+
rules: {
32+
"@stylistic/padded-blocks": ["error", {blocks: "never", classes: "always", switches: "never"}],
33+
"@stylistic/comma-dangle": ["error", "always-multiline"],
34+
"@stylistic/quote-props": ["error", "consistent"],
35+
"@stylistic/array-element-newline": ["error", "consistent"],
36+
"@stylistic/object-property-newline": ["error", {allowAllPropertiesOnSameLine: true}],
37+
"@stylistic/multiline-ternary": ["error", "always-multiline"],
38+
"@stylistic/newline-per-chained-call": ["error", {ignoreChainWithDepth: 3}],
39+
"@typescript-eslint/restrict-template-expressions": ["error", {allow: ["Error"]}],
40+
41+
"@stylistic/function-call-argument-newline": "off",
42+
"@typescript-eslint/no-unnecessary-condition": "off", // TODO: We want this one enabled.
43+
},
44+
},
45+
);

jest.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export default {
2+
preset: 'ts-jest/presets/default-esm',
3+
testMatch: [
4+
"**/*.test.ts"
5+
],
6+
coverageReporters: [
7+
"text-summary",
8+
"json-summary",
9+
"lcov"
10+
],
11+
collectCoverageFrom: [
12+
"**/*.js",
13+
"!src/index.js",
14+
"!tests/**.*.js",
15+
"!**/node_modules/**",
16+
"!**/coverage/**"
17+
]
18+
};

0 commit comments

Comments
 (0)