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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

109 changes: 0 additions & 109 deletions .eslintrc.js

This file was deleted.

60 changes: 13 additions & 47 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [22]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -51,13 +51,13 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [22, 24]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -73,43 +73,6 @@ jobs:

# ===================

# Generate coverage reports when the unit tests have succeeded
# coverage:
# # Trigger this step only on pushes, because the job often fails for pull requests
# if: |
# contains(github.event.head_commit.message, '[skip ci]') == false &&
# github.event_name == 'push'

# needs: [check-and-lint, unit-tests]

# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [14.x]

# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v3
# with:
# node-version: ${{ matrix.node-version }}
# cache: 'npm'

# - name: Install dependencies
# run: npm ci

# - name: Generate coverage
# # Some tests are flaky, try them 3 times if necessary
# run: npm run coverage:ci || npm run coverage:ci || npm run coverage:ci
# env:
# CI: true
# - name: Upload to Coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}

# ===================

# Deploys the final package to NPM
deploy:
# Trigger this step only when a commit on master is tagged with a version number
Expand All @@ -123,14 +86,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [22]

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v5

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -147,6 +110,9 @@ jobs:
echo "BODY<<$EOF" >> $GITHUB_OUTPUT
echo "$BODY" >> $GITHUB_OUTPUT
echo "$EOF" >> $GITHUB_OUTPUT
if [[ $VERSION == *"-"* ]] ; then
echo "TAG=--tag next" >> $GITHUB_OUTPUT
fi

- name: Install dependencies
run: npm ci
Expand All @@ -161,7 +127,7 @@ jobs:
npm publish

- name: Create Github Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
9 changes: 0 additions & 9 deletions .lgtm.yml

This file was deleted.

18 changes: 9 additions & 9 deletions .prettierrc.js → .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
semi: true,
trailingComma: "all",
singleQuote: false,
printWidth: 80,
useTabs: true,
tabWidth: 4,
endOfLine: "lf",
};
module.exports = {
semi: true,
trailingComma: "all",
singleQuote: false,
printWidth: 80,
useTabs: true,
tabWidth: 4,
endOfLine: "lf",
};
File renamed without changes.
115 changes: 115 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import prettier from "eslint-plugin-prettier/recommended";

export default tseslint.config(
// Global ignores (equivalent to .eslintignore)
{
ignores: ["build/", "coverage/"],
},

// Base configs
eslint.configs.recommended,
...tseslint.configs.recommended,

// Main configuration for TypeScript files
{
languageOptions: {
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
project: "./tsconfig.json",
},
},
rules: {
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-use-before-define": [
"error",
{
functions: false,
typedefs: false,
classes: false,
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
ignoreRestSiblings: true,
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-object-literal-type-assertion": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-inferrable-types": [
"error",
{
ignoreProperties: true,
ignoreParameters: true,
},
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": false,
"ts-ignore": true,
"ts-nocheck": true,
"ts-check": false,
},
],
"@typescript-eslint/restrict-template-expressions": [
"error",
{
allowNumber: true,
allowBoolean: true,
allowAny: true,
allowNullish: true,
},
],
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: false,
},
],
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/explicit-module-boundary-types": [
"warn",
{ allowArgumentsExplicitlyTypedAsAny: true },
],
"@typescript-eslint/no-this-alias": "off",
},
},

// Override for test files
{
files: ["**/*.test.ts"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-member-return": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/unbound-method": "warn",
},
},

// Override for JavaScript files
{
files: ["**/*.js", "**/*.cjs", "**/*.mjs"],
...tseslint.configs.disableTypeChecked,
},

// Prettier must be last to override other configs
prettier,
);
Loading