Skip to content

Commit

Permalink
Replace Eslint & Prettier with biome.js (#167)
Browse files Browse the repository at this point in the history
* chore: replace eslint and prettier with biome

* chore: address lint errors

* ci: update github action to use biome
  • Loading branch information
wd-David authored Jun 10, 2024
1 parent 463ed06 commit d22215f
Show file tree
Hide file tree
Showing 16 changed files with 2,443 additions and 2,718 deletions.
7 changes: 0 additions & 7 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
push:
branches: [main]
paths-ignore:
- '*.md'
- "*.md"
pull_request:
branches: [main]
paths-ignore:
- '*.md'
- "*.md"

jobs:
ci:
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"

- uses: pnpm/action-setup@v4
name: Install pnpm
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Run Formatter and Linter
id: format-lint
run: pnpm format && pnpm lint
run: pnpm check

- name: Run Tests
id: tests
Expand Down
11 changes: 0 additions & 11 deletions .prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

23 changes: 23 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": ["dist/**"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"formatter": {
"indentStyle": "space"
},
"javascript": {
"formatter": {
"semicolons": "asNeeded"
}
}
}
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"buildTS": "pkgroll && tsx test/buildScripts/buildTS.ts",
"buildTS2": "pkgroll && tsx test/buildScripts/arrayOfObjects.ts",
"test": "rm -rf dist && pkgroll && vitest run",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"check": "biome check --write .",
"release:major": "standard-version --no-verify --release-as major",
"release:minor": "standard-version --no-verify --release-as minor",
"release:patch": "standard-version --no-verify --release-as patch"
Expand All @@ -34,24 +33,17 @@
],
"author": "David Peng <[email protected]>",
"license": "MIT",
"files": [
"dist"
],
"files": ["dist"],
"devDependencies": {
"@biomejs/biome": "^1.8.0",
"@types/node": "20.14.2",
"@typescript-eslint/eslint-plugin": "7.12.0",
"@typescript-eslint/parser": "7.12.0",
"esbuild": "0.21.5",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"execa": "8.0.1",
"nodemon": "3.1.3",
"pino": "8.21.0",
"pino-loki": "2.3.0",
"pino-pretty": "10.3.1",
"pkgroll": "2.1.1",
"prettier": "3.3.1",
"standard-version": "9.5.0",
"thread-stream": "2.7.0",
"tsx": "4.15.1",
Expand Down
Loading

0 comments on commit d22215f

Please sign in to comment.