Skip to content

Commit f2b1457

Browse files
authored
Merge pull request #21 from curveball/upgrade-base-config-5
Updated standard Curveball configuration.
2 parents f05950b + 50f2b69 commit f2b1457

12 files changed

+1264
-3025
lines changed

.eslintrc.json

-67
This file was deleted.

.github/workflows/bun.yml

-24
This file was deleted.

.github/workflows/node.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818

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

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
- run: npm ci
@@ -37,9 +37,9 @@ jobs:
3737
runs-on: ubuntu-latest
3838

3939
steps:
40-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
4141
- name: Use Node.js
42-
uses: actions/setup-node@v3
42+
uses: actions/setup-node@v4
4343
with:
4444
node-version: 18.x
4545
- run: npm ci

.github/workflows/npm-publish.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1616
with:
1717
node-version: 18
1818
- run: npm ci
@@ -22,8 +22,8 @@ jobs:
2222
needs: build
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v3
26-
- uses: actions/setup-node@v3
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-node@v4
2727
with:
2828
node-version: 18
2929
registry-url: https://registry.npmjs.org/
@@ -36,12 +36,12 @@ jobs:
3636
needs: build
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v3
40-
- uses: actions/setup-node@v3
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
4141
with:
4242
node-version: 18
4343
- run: npm ci
44-
- uses: actions/setup-node@v3
44+
- uses: actions/setup-node@v4
4545
with:
4646
node-version: 18
4747
registry-url: 'https://npm.pkg.github.com'

Makefile

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')
2+
TEST_FILES:=$(shell find test/ -type f -name '*.ts')
23

34
.PHONY:all
45
all: build
@@ -8,18 +9,18 @@ build: dist/build
89

910
.PHONY:test
1011
test:
11-
npx nyc mocha
12+
npx tsx --test ${TEST_FILES}
1213

1314
.PHONY:lint
1415
lint:
15-
npx eslint --quiet 'src/**/*.ts' 'test/**/*.ts'
16+
npx eslint --quiet
1617

1718
.PHONY:lint-fix
1819
lint-fix: fix
1920

2021
.PHONY:fix
2122
fix:
22-
npx eslint --quiet 'src/**/*.ts' 'test/**/*.ts' --fix
23+
npx eslint --quiet --fix
2324

2425
.PHONY:watch
2526
watch:

changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
1.0.2 (????-??-??)
5+
------------------
6+
7+
* Updated standard Curveball configuration.
8+
* Migrated from mocha to node:test.
9+
* Migrated from chai to node:assert.
10+
11+
412
1.0.1 (2024-01-25)
513
------------------
614

eslint.config.mjs

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// @ts-check
2+
import eslint from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
5+
export default tseslint.config({
6+
7+
files: ['src/**/*.ts', 'test/**/*.ts'],
8+
9+
extends: [
10+
eslint.configs.recommended,
11+
...tseslint.configs.recommended,
12+
],
13+
rules: {
14+
indent: ["error", 2, {
15+
SwitchCase: 1,
16+
}],
17+
18+
"linebreak-style": ["error", "unix"],
19+
20+
"no-constant-condition": ["error", {
21+
checkLoops: false,
22+
}],
23+
24+
quotes: ["error", "single", {
25+
allowTemplateLiterals: false,
26+
avoidEscape: true,
27+
}],
28+
29+
semi: ["error", "always"],
30+
31+
"no-console": ["error", {
32+
allow: ["warn", "error", "info", "debug"],
33+
}],
34+
35+
"no-trailing-spaces": "error",
36+
"eol-last": "error",
37+
38+
"@typescript-eslint/ban-ts-comment": ["error", {
39+
"ts-expect-error": "allow-with-description",
40+
"ts-nocheck": "allow-with-description",
41+
}],
42+
43+
"@typescript-eslint/ban-tslint-comment": "error",
44+
45+
"@typescript-eslint/consistent-type-assertions": ["error", {
46+
assertionStyle: "as",
47+
objectLiteralTypeAssertions: "never",
48+
}],
49+
50+
"@typescript-eslint/no-inferrable-types": "off",
51+
"@typescript-eslint/no-explicit-any": 0,
52+
"@typescript-eslint/no-for-in-array": "error",
53+
"@typescript-eslint/no-invalid-void-type": "error",
54+
"@typescript-eslint/no-namespace": "error",
55+
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
56+
57+
"@typescript-eslint/no-unused-vars": ["error", {
58+
ignoreRestSiblings: true,
59+
args: "none",
60+
}],
61+
62+
"@typescript-eslint/prefer-for-of": ["error"],
63+
"@typescript-eslint/prefer-ts-expect-error": ["error"],
64+
},
65+
});

0 commit comments

Comments
 (0)