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

This file was deleted.

29 changes: 17 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v6

- name: Use pnpm
uses: pnpm/action-setup@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2

- name: Use Node.js
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "pnpm"
- name: Run linting
run: biome lint

- name: Install dependencies
run: pnpm install --frozen-lockfile
format:
name: Format
runs-on: ubuntu-24.04-arm

steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Biome
uses: biomejs/setup-biome@v2

- name: Run lint
run: pnpm lint
- name: Run formatting
run: biome format

unit:
name: Unit tests
Expand All @@ -54,7 +59,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm test
run: pnpm unit

build:
name: Build
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ npm-debug.log

# Built files
/index.js

5 changes: 0 additions & 5 deletions .prettierrc

This file was deleted.

44 changes: 44 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"files": {
"includes": ["src/**"]
},
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"formatter": {
"indentStyle": "space"
},
"linter": {
"rules": {
"correctness": {
"noUnusedImports": "warn",
"noUnusedVariables": {
"level": "warn",
"options": {
"ignoreRestSiblings": true
}
}
},
"suspicious": {
"noConsole": "warn"
}
}
},
"css": {
"formatter": {
"quoteStyle": "single"
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "es5"
}
}
}
20 changes: 8 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
"types": "index.d.ts",
"scripts": {
"build": "rollup ./src/index.js -o index.js --f cjs && babel index.js -o index.js",
"test": "vitest",
"test:watch": "vitest --watch",
"lint": "eslint src",
"prepublish": "npm run build",
"format": "biome format",
"lint": "biome lint",
"precommit": "lint-staged",
"lint-staged": "lint-staged"
"prepublish": "npm run build",
"test": "pnpm lint && pnpm format && pnpm unit",
"unit": "vitest",
"unit:watch": "vitest --watch"
},
"files": [
"index.js",
Expand Down Expand Up @@ -39,13 +40,8 @@
"@babel/cli": "^7.6.2",
"@babel/core": "^7.1.0",
"@babel/preset-env": "^7.6.2",
"eslint": "^4.17.0",
"eslint-config-airbnb-base": "^12.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-prettier": "^2.6.0",
"@biomejs/biome": "2.4.9",
"lint-staged": "^6.1.0",
"prettier": "^1.18.2",
"rollup": "^1.22.0",
"vitest": "^4.0.1"
},
Expand All @@ -56,7 +52,7 @@
},
"lint-staged": {
"*.js": [
"eslint --fix",
"biome check",
"git add"
]
},
Expand Down
Loading
Loading