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
17 changes: 15 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,30 @@ on:

jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 18
- run: npm ci
- run: npm test
- run: make unit-test

lint:
name: Lint & format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 26
- run: npm ci
- run: make lint

publish-npm:
needs: build
name: Publish to npm
needs: [build, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
build:
name: Test (Node.js ${{ matrix.node-version }})

runs-on: ubuntu-latest

Expand All @@ -27,4 +28,19 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: make unit-test

lint:
name: Lint & format

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7
- name: Use Node.js 26.x
uses: actions/setup-node@v6
with:
node-version: 26.x
- run: npm ci
- name: Lint and check formatting
run: make lint
11 changes: 11 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf",
"insertFinalNewline": true
}
32 changes: 32 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "oxc"],
"categories": {
"correctness": "error"
},
"env": {
"browser": true,
"node": true,
"es2020": true
},
"rules": {
"no-console": ["error", { "allow": ["warn", "error", "info", "debug"] }],
"no-constant-condition": ["error", { "checkLoops": false }],
"no-unused-vars": ["error", { "ignoreRestSiblings": true, "args": "none" }],

"typescript/ban-ts-comment": ["error", {
"ts-expect-error": "allow-with-description",
"ts-nocheck": "allow-with-description"
}],
"typescript/ban-tslint-comment": "error",
"typescript/consistent-type-assertions": ["error", {
"assertionStyle": "as",
"objectLiteralTypeAssertions": "never"
}],
"typescript/no-invalid-void-type": "error",
"typescript/no-namespace": "error",
"typescript/no-non-null-asserted-optional-chain": "error",
"typescript/prefer-for-of": "error",
"typescript/prefer-ts-expect-error": "error"
}
}
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ clean:
rm -rf dist/ cjs/ test/httpwg-tests

.PHONY: test
test: lint test/httpwg-tests/list.json dist/build
test: lint unit-test

.PHONY: unit-test
unit-test: test/httpwg-tests/list.json dist/build
node --test

.PHONY: test-debug
Expand All @@ -17,11 +20,13 @@ test-debug:

.PHONY: lint
lint:
node_modules/.bin/eslint --quiet 'src/**/*.ts'
node_modules/.bin/oxlint src
node_modules/.bin/oxfmt --check src

.PHONY: fix
fix:
node_modules/.bin/eslint --quiet 'src/**/*.ts' --fix
node_modules/.bin/oxlint --fix src
node_modules/.bin/oxfmt src

.PHONY: watch
watch:
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ChangeLog
(@gyanu2507)
* Fix: serialization of displaystring that encodes to byte values under 0xf,
they were missing the 0 padding of %0?.
* Upgrade to Typescript 6.
* Switch from ESLint to oxfmt/oxlint.


2.1.0 (2026-09-11)
Expand Down
101 changes: 0 additions & 101 deletions eslint.config.mjs

This file was deleted.

Loading
Loading