Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

NODE_IMG=laminas-ci/node:dev

build-container:
$(if ${NODE_IMG}, $(info Image already built), docker build -t ${NODE_IMG} .)
.PHONY: build-container

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

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

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

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

shell: build-container
docker run -it -w /app -v ${PWD}:/app --rm ${NODE_IMG} sh
.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