Skip to content

Commit

Permalink
replace eslint with biome
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 committed Feb 21, 2024
1 parent b259b86 commit 86de967
Show file tree
Hide file tree
Showing 13 changed files with 216 additions and 1,400 deletions.
14 changes: 0 additions & 14 deletions .eslintrc.json

This file was deleted.

44 changes: 22 additions & 22 deletions .github/workflows/build-test-publish-on-push-cached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,28 +85,28 @@ jobs:
# token: ${{ secrets.CODECOV_TOKEN }}
# fail_ci_if_error: false

# lint:
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: pnpm/action-setup@v3
# with:
# version: 8
# - run: pnpm add -g pnpm
# - name: 'Restore build output'
# uses: actions/cache/restore@v4
# with:
# path: ${{ github.workspace }}
# key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
# restore-keys: ${{ runner.os }}-build-${{ github.sha }}
# fail-on-cache-miss: true
# - name: 'Setup Node.js with pnpm cache'
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: 'pnpm'
# - name: 'Run lint'
# run: pnpm run lint
lint:
needs: build
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v3
with:
version: 8
- run: pnpm add -g pnpm
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }}
restore-keys: ${{ runner.os }}-build-${{ github.sha }}
fail-on-cache-miss: true
- name: 'Setup Node.js with pnpm cache'
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: 'Run lint'
run: pnpm run lint

# Only run this job when the push is on main, next or unstable
publish:
Expand Down
12 changes: 12 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"description": "sd-jwt draft 7 implementation in typescript",
"scripts": {
"build": "lerna run build --stream",
"lint": "lerna run lint --stream",
"lint": "biome lint ./packages",
"test": "vitest run --coverage",
"clean": "lerna clean -y",
"publish:latest": "lerna publish --conventional-commits --include-merged-tags --create-release github --yes --dist-tag latest",
"publish:next": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid next --pre-dist-tag next --yes",
"publish:unstable": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid unstable --pre-dist-tag unstable --yes"
"publish:unstable": "lerna publish --conventional-prerelease --force-publish --canary --no-git-tag-version --include-merged-tags --preid unstable --pre-dist-tag unstable --yes",
"biome": "biome"
},
"keywords": [
"sd-jwt",
Expand All @@ -27,6 +28,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@biomejs/biome": "1.5.3",
"@types/node": "^20.10.2",
"@vitest/coverage-v8": "^1.2.2",
"jsdom": "^24.0.0",
Expand All @@ -36,13 +38,5 @@
"typescript": "^5.3.2",
"vite": "^5.1.1",
"vitest": "^1.2.2"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.4.0",
"eslint": "^8.0.1",
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^16.0.0",
"eslint-plugin-promise": "^6.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/broswer-crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:browser && pnpm run test:cov",
"test:browser": "vitest run ./src/test/*.spec.ts",
"test:cov": "vitest run --coverage"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:browser && pnpm run test:e2e && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts && vitest run ./src/test/*.spec.ts --environment jsdom",
"test:browser": "vitest run ./src/test/*.spec.ts --environment jsdom",
Expand Down
2 changes: 1 addition & 1 deletion packages/decode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:browser && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts --coverage",
"test:browser": "vitest run ./src/test/*.spec.ts --environment jsdom --coverage"
Expand Down
2 changes: 1 addition & 1 deletion packages/hash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:browser && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts",
"test:browser": "vitest run ./src/test/*.spec.ts --environment jsdom",
Expand Down
2 changes: 1 addition & 1 deletion packages/node-crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts",
"test:cov": "vitest run --coverage"
Expand Down
2 changes: 1 addition & 1 deletion packages/present/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:browser && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts",
"test:browser": "vitest run ./src/test/*.spec.ts --environment jsdom",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:browser && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts",
"test:browser": "vitest run ./src/test/*.spec.ts --environment jsdom",
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"build": "rm -rf **/dist && tsup",
"lint": "eslint src/**/*.ts",
"lint": "biome lint ./src",
"test": "pnpm run test:node && pnpm run test:browser && pnpm run test:cov",
"test:node": "vitest run ./src/test/*.spec.ts",
"test:browser": "vitest run ./src/test/*.spec.ts --environment jsdom",
Expand Down
Loading

0 comments on commit 86de967

Please sign in to comment.