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
67 changes: 0 additions & 67 deletions .eslintrc.json

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/bun.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:

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

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
Expand All @@ -37,9 +37,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm ci
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
Expand All @@ -22,8 +22,8 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
Expand All @@ -36,12 +36,12 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: npm ci
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')
TEST_FILES:=$(shell find test/ -type f -name '*.ts')

.PHONY:all
all: build
Expand All @@ -8,18 +9,18 @@ build: dist/build

.PHONY:test
test:
npx nyc mocha
npx tsx --test ${TEST_FILES}

.PHONY:lint
lint:
npx eslint --quiet 'src/**/*.ts' 'test/**/*.ts'
npx eslint --quiet

.PHONY:lint-fix
lint-fix: fix

.PHONY:fix
fix:
npx eslint --quiet 'src/**/*.ts' 'test/**/*.ts' --fix
npx eslint --quiet --fix

.PHONY:watch
watch:
Expand Down
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

1.0.2 (????-??-??)
------------------

* Updated standard Curveball configuration.
* Migrated from mocha to node:test.
* Migrated from chai to node:assert.


1.0.1 (2024-01-25)
------------------

Expand Down
65 changes: 65 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config({

files: ['src/**/*.ts', 'test/**/*.ts'],

extends: [
eslint.configs.recommended,
...tseslint.configs.recommended,
],
rules: {
indent: ["error", 2, {
SwitchCase: 1,
}],

"linebreak-style": ["error", "unix"],

"no-constant-condition": ["error", {
checkLoops: false,
}],

quotes: ["error", "single", {
allowTemplateLiterals: false,
avoidEscape: true,
}],

semi: ["error", "always"],

"no-console": ["error", {
allow: ["warn", "error", "info", "debug"],
}],

"no-trailing-spaces": "error",
"eol-last": "error",

"@typescript-eslint/ban-ts-comment": ["error", {
"ts-expect-error": "allow-with-description",
"ts-nocheck": "allow-with-description",
}],

"@typescript-eslint/ban-tslint-comment": "error",

"@typescript-eslint/consistent-type-assertions": ["error", {
assertionStyle: "as",
objectLiteralTypeAssertions: "never",
}],

"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",

"@typescript-eslint/no-unused-vars": ["error", {
ignoreRestSiblings: true,
args: "none",
}],

"@typescript-eslint/prefer-for-of": ["error"],
"@typescript-eslint/prefer-ts-expect-error": ["error"],
},
});
Loading