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
11 changes: 8 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ name: Node.js CI

on:
push:
branches: ['main']
branches: ["main"]
pull_request:
branches: ['main']
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -33,6 +33,11 @@ jobs:
- name: npm run build
run: |
npm run build --if-present

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: docker-compose up
run: |
docker-compose up -d
Expand Down
14 changes: 14 additions & 0 deletions cucumber.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const common = [
'--import ts-node/esm/db.ts',
'--loader ts-node/esm'
];

const backend = [
...common,
'tests/**/integration/*.feature',
'--import tests/step_definitions/*.steps.ts'
].join(' ');

module.exports = {
backend
};
116 changes: 116 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
import { defineConfig } from "eslint/config";
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import unusedImports from "eslint-plugin-unused-imports";
import _import from "eslint-plugin-import";
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";

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: fixupConfigRules(compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
)),

plugins: {
"@typescript-eslint": fixupPluginRules(typescriptEslint),
"simple-import-sort": simpleImportSort,
"unused-imports": unusedImports,
import: fixupPluginRules(_import),
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
project: ["./tsconfig.json", "./tests/tsconfig.json"],
},
},

rules: {
"array-callback-return": ["error", {
checkForEach: true,
}],

"no-await-in-loop": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-promise-executor-return": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "error",
"no-use-before-define": "error",
"require-atomic-updates": "error",
complexity: ["error", 8],
camelcase: "error",
eqeqeq: "error",
"no-array-constructor": "error",
"no-console": "warn",

"no-else-return": ["error", {
allowElseIf: false,
}],

"no-extend-native": "error",
"no-lonely-if": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-throw-literal": "error",
"no-var": "error",
"object-shorthand": "error",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
curly: "error",

"lines-between-class-members": ["error", "always", {
exceptAfterSingleLine: true,
}],

"padding-line-between-statements": ["error", {
blankLine: "always",
prev: "*",
next: "return",
}],

"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "error",
"import/no-webpack-loader-syntax": "error",
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error",
"unused-imports/no-unused-imports": "error",
"no-unused-vars": "off",

"unused-imports/no-unused-vars": ["warn", {
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
}],
},
}]);
Loading
Loading