Skip to content

Commit

Permalink
Merge pull request #114 from fleet-sdk/biome
Browse files Browse the repository at this point in the history
Add biome and adhere to linter rules
  • Loading branch information
arobsn authored Jun 20, 2024
2 parents bbbf2d2 + 99868a5 commit 8e15e37
Show file tree
Hide file tree
Showing 168 changed files with 6,906 additions and 4,296 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- run: pnpm install --frozen-lockfile
- run: pnpm run test:lint

prettier:
format:
name: Format
runs-on: ubuntu-latest
steps:
Expand All @@ -46,7 +46,7 @@ jobs:
cache: "pnpm"

- run: pnpm install --frozen-lockfile
- run: pnpm run test:prettier
- run: pnpm run test:format

build-and-test-node:
name: "[node] build and test"
Expand Down
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

11 changes: 0 additions & 11 deletions .prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"biomejs.biome",
"streetsidesoftware.code-spell-checker",
"vitest.explorer"
]
Expand Down
36 changes: 36 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"files": {
"ignore": [
"**/coverage/*",
"**/dist/*",
"**/node_modules/*",
"**/_test-vectors/mockedGraphQLBoxResponses.json"
]
},
"organizeImports": {
"enabled": true
},
"formatter": {
"indentStyle": "space"
},
"javascript": {
"formatter": {
"trailingCommas": "none"
}
},
"linter": {
"enabled": true,
"ignore": ["**/sigmastate*.d.ts"],
"rules": {
"recommended": true,
"style": {
"noParameterAssign": { "level": "off" }
},
"suspicious": {
"noConsoleLog": { "level": "error" },
"noAssignInExpressions": { "level": "off" }
}
}
}
}
21 changes: 6 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"watch:unit": "vitest --no-coverage --reporter=dot",
"watch:types": "vitest typecheck --reporter=dot",
"ci:publish": "pnpm clear && pnpm -r build && changeset publish --provenance",
"fix:prettier": "prettier ./**/*.ts --write",
"fix:lint": "eslint ./ --ext .ts --fix",
"test:lint": "eslint ./ --ext .ts",
"test:prettier": "prettier ./**/*.ts --list-different",
"fix:format": "biome format --write",
"fix:lint": "biome lint --write",
"test:lint": "biome lint",
"test:format": "biome format",
"test:unit": "vitest run --no-coverage --environment=node",
"test:unit-browser": "vitest run --no-coverage --environment=happy-dom",
"test:unit-edge": "vitest run --no-coverage --environment=edge-runtime",
Expand All @@ -24,25 +24,18 @@
"snapshot:publish": "pnpm clear && pnpm -r build && changeset publish --no-git-tag --tag snapshot"
},
"devDependencies": {
"@biomejs/biome": "1.8.2",
"@changesets/cli": "^2.27.5",
"@edge-runtime/vm": "^3.2.0",
"@fleet-sdk/common": "workspace:^",
"@fleet-sdk/crypto": "workspace:^",
"@types/diff": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@vitest/coverage-v8": "^1.6.0",
"ergo-lib-wasm-nodejs": "^0.26.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^6.6.0",
"eslint-plugin-import": "^2.29.1",
"fast-check": "^3.19.0",
"happy-dom": "^14.12.0",
"npm-run-all": "^4.1.5",
"open-cli": "^8.0.0",
"prettier": "^3.3.2",
"sigmastate-js": "0.4.6",
"tsup": "^8.1.0",
"type-fest": "^4.20.1",
Expand All @@ -56,8 +49,6 @@
"pnpm": ">=8"
},
"pnpm": {
"requiredScripts": [
"build"
]
"requiredScripts": ["build"]
}
}
Loading

0 comments on commit 8e15e37

Please sign in to comment.