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
30 changes: 26 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: CI

on:
pull_request:
Expand All @@ -9,6 +9,31 @@ on:
- main

jobs:
lint:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.14.0

- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: 'pnpm'

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Check formatting and linting
run: pnpm lint

test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -32,8 +57,5 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run linter
run: pnpm lint

- name: Run tests
run: pnpm test
63 changes: 63 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.10/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"includes": ["**", "!**/scratch", "!**/node_modules", "!**/output", "!**/coverage"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedFunctionParameters": "warn",
"noUnusedVariables": "warn",
"noUnusedImports": "warn",
"noUnsafeFinally": "warn",
"useYield": "warn",
"noInvalidUseBeforeDeclaration": "warn"
},
"complexity": {
"useLiteralKeys": "warn",
"useOptionalChain": "warn",
"noStaticOnlyClass": "warn"
},
"style": {
"useBlockStatements": "off",
"useTemplate": "warn",
"useConst": "warn"
},
"suspicious": {
"noAssignInExpressions": "warn",
"noAsyncPromiseExecutor": "warn",
"noTemplateCurlyInString": "warn",
"noControlCharactersInRegex": "warn",
"useIterableCallbackReturn": "warn",
"useAdjacentOverloadSignatures": "warn",
"noShadowRestrictedNames": "warn"
},
"performance": {
"noDynamicNamespaceImportAccess": "warn"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "none",
"arrowParentheses": "asNeeded"
}
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"scripts": {
"test": "node --test test/*.test.js",
"lint": "xo",
"lint:fix": "xo --fix",
"lint": "biome check",
"lint:fix": "biome check --fix",
"changeset": "changeset"
},
"keywords": [
Expand Down Expand Up @@ -41,7 +41,7 @@
"undici": "^7.13.0"
},
"devDependencies": {
"@changesets/cli": "^2.29.5",
"xo": "^1.2.1"
"@biomejs/biome": "^2.4.10",
"@changesets/cli": "^2.29.5"
}
}
Loading
Loading