Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
41 changes: 0 additions & 41 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- uses: "actions/setup-node@v4"
with:
check-latest: true
node-version: 21
node-version: 24
- name: "Install node modules"
run: "npm ci"
- name: Run ESLint
Expand All @@ -149,7 +149,7 @@ jobs:
- uses: "actions/setup-node@v4"
with:
check-latest: true
node-version: 21
node-version: 24
- name: "Install node modules"
run: "npm ci"
- name: Run Jest
Expand All @@ -162,6 +162,6 @@ jobs:
- uses: "actions/setup-node@v4"
with:
check-latest: true
node-version: 21
node-version: 24
- name: "Check package-lock.json is up2date"
run: "npx --yes package-lock-utd"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:21.7.3-alpine AS compiler
FROM node:24.10.0-alpine AS compiler

RUN mkdir -p /usr/local/source
WORKDIR /usr/local/source
Expand All @@ -11,7 +11,7 @@ COPY ./src ./src
RUN npm run build


FROM node:21.7.3-alpine
FROM node:24.10.0-alpine
LABEL "repository"="http://github.com/laminas/laminas-ci-matrix-action"
LABEL "homepage"="http://github.com/laminas/laminas-ci-matrix-action"
LABEL "maintainer"="https://github.com/laminas/technical-steering-committee/"
Expand Down
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

NODE_IMG=node:24.10.0-alpine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should reference a base layer in our Dockerfile, so this is always in sync?

Copy link
Member Author

@gsteel gsteel Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I do that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would meet to build+tag an image with --target=, then use that tag to run the remaining steps

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand - I've adjusted Makefile to build and tag the image locally, but docker build --target=compiler just builds everything anyway - not too familiar with multi-stage builds. At least what I've done will stop node versions drifting apart


npm-install: ## Install node deps
docker run -it -w /app -v ${PWD}:/app --rm ${NODE_IMG} npm ci
.PHONY: npm-install

npm-update: ## Update node deps
docker run -it -w /app -v ${PWD}:/app --rm ${NODE_IMG} npm update
.PHONY: npm-update

lint: ## Lint
docker run -it -w /app -v ${PWD}:/app --rm ${NODE_IMG} npm run lint
.PHONY: lint

test: ## Tests
docker run -it -w /app -v ${PWD}:/app --rm ${NODE_IMG} npm run test
.PHONY: test

shell:
docker run -it -w /app -v ${PWD}:/app --rm ${NODE_IMG}
.PHONY:
67 changes: 67 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { defineConfig } from "eslint/config";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";
import nodePlugin from "eslint-plugin-node";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([{
extends: compat.extends("plugin:@typescript-eslint/recommended"),

plugins: {
"@typescript-eslint": typescriptEslint,
"node": nodePlugin,
},

languageOptions: {
globals: {
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, "off"])),
...globals.node,
},

parser: tsParser,
ecmaVersion: 2022,
sourceType: "commonjs",

parserOptions: {
ecmaFeatures: {
modules: true,
},
},
},

settings: {
"import/resolver": {
typescript: {},
},
},

rules: {
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",

"node/no-unpublished-import": ["error", {
allowModules: ["@cfworker/json-schema", "dotenv"],
}],

"no-process-exit": "off",
"no-sync": "off",
"no-shadow": "off",
"object-curly-spacing": "off",
"comma-dangle": "off",
"censor/no-swear": "off",
"@typescript-eslint/no-inferrable-types": "off",
"object-shorthand": "off",
},
}]);
Loading
Loading