Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add biome #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,32 @@ jobs:

- name: Lint
run: bun run lint --quiet

biome:
# The type of runner that the job will run on
runs-on: ${{ inputs.os || 'ubuntu-latest' }}
timeout-minutes: 10
env:
MONGOMS_DISABLE_POSTINSTALL: true

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
id: checkout

- uses: cardinalby/export-env-action@v2
with:
envFile: .env.github

- uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ inputs.bun-version || env.BUN_VERSION }}

- run: bun install --ignore-scripts

- name: Biome
run: bun run biome

codegen:
# The type of runner that the job will run on
Expand Down
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"dbaeumer.vscode-eslint",
"streetsidesoftware.code-spell-checker",
"graphql.vscode-graphql-syntax",
"graphql.vscode-graphql"
"graphql.vscode-graphql",
"biomejs.biome",
]
}
51 changes: 51 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.2/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"json": {
"formatter": {
"indentStyle": "space"
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"quoteStyle": "single",
"semicolons": "asNeeded",
"trailingCommas": "all"
},
"linter": {
"enabled": true
}
},
"linter": {
"enabled": true,
"rules": {
"all": true,
"style": {
"noDefaultExport": "off"
},
"correctness": {
"noNodejsModules": "off"
},
"complexity": {
"noVoid": "off"
},
"suspicious": {
"noExportsInTest": "off"
}
}
},
"files": {
"ignore": [
"**/*.generated.*",
"**/router.d.ts",
"**/*.generated/*.*"
]
}
}
1 change: 1 addition & 0 deletions build.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable no-console */
import Bun from 'bun'
import { readdirSync, statSync } from 'node:fs'
import { join } from 'node:path'

Expand Down
Binary file modified bun.lockb
Binary file not shown.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"typecheck": "bunx turbo run typecheck --continue",
"codegen": "bunx turbo run codegen",
"build": "bunx turbo run build",
"biome": "bunx biome check",
"prepare": "husky install",
"postinstall": "cp manual-patches/sofa-api/package.json node_modules/sofa-api/",
"prepush": "bunx turbo run lint test typecheck --continue",
Expand Down Expand Up @@ -51,6 +52,7 @@
"license": "ISC",
"private": true,
"devDependencies": {
"@biomejs/biome": "^1.8.2",
"@graphql-eslint/eslint-plugin": "^3.20.1",
"@graphql-typed-document-node/core": "^3.2.0",
"@tsconfig/bun": "^1.0.5",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "./packages/eslint/tsconfig.base.json",
"compilerOptions": {
"types": [ "bun-types" ]
"types": [ "bun-types" ],
"noPropertyAccessFromIndexSignature": false
},
"exclude": [
"**/*.generated/*.ts",
Expand Down
Loading