From 220bffca54dfef8929adc6774ee7c96c61ad2d9c Mon Sep 17 00:00:00 2001 From: Carl Sverre <82591+carlsverre@users.noreply.github.com> Date: Sat, 6 Jan 2024 14:05:33 -0800 Subject: [PATCH] enforce biome --- .vscode/settings.json | 15 +-------------- biome.json | 5 +++++ justfile | 1 + lib/sqlsync-react/src/index.ts | 1 - lib/sqlsync-worker/src/index.ts | 5 ++--- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ff9e6b7..a25ef89 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,20 +5,7 @@ // this allows rust-analyzer to compile sqlsync_reducer::host_ffi "rust-analyzer.cargo.features": ["host"], "rust-analyzer.showUnlinkedFileNotification": false, - "[typescriptreact][typescript][javascript][javascriptreact]": { - "editor.defaultFormatter": "biomejs.biome", - "editor.formatOnSave": false, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "never", - "quickfix.biome": "always", - "source.addMissingImports": "always", - "source.formatDocument": "always", - "source.organizeImports": "always" - }, - "editor.tabSize": 2, - "editor.insertSpaces": true - }, - "[json][jsonc]": { + "[typescriptreact][typescript][javascript][javascriptreact][json][jsonc]": { "editor.defaultFormatter": "biomejs.biome", "editor.tabSize": 2, "editor.insertSpaces": true diff --git a/biome.json b/biome.json index ffd0a49..93e9e7b 100644 --- a/biome.json +++ b/biome.json @@ -3,6 +3,11 @@ "organizeImports": { "enabled": false }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, "linter": { "enabled": true, "rules": { diff --git a/justfile b/justfile index 4d1a4cd..739f4dd 100644 --- a/justfile +++ b/justfile @@ -6,6 +6,7 @@ default: lint: cargo clippy --all-targets --all-features -- -D warnings cargo fmt --check + pnpm exec biome check . unit-test: cargo test diff --git a/lib/sqlsync-react/src/index.ts b/lib/sqlsync-react/src/index.ts index 056554d..2be0745 100644 --- a/lib/sqlsync-react/src/index.ts +++ b/lib/sqlsync-react/src/index.ts @@ -1,3 +1,2 @@ export { SQLSyncProvider } from "./context"; export { createDocHooks, useConnectionStatus } from "./hooks"; - diff --git a/lib/sqlsync-worker/src/index.ts b/lib/sqlsync-worker/src/index.ts index c60a945..0ba1304 100644 --- a/lib/sqlsync-worker/src/index.ts +++ b/lib/sqlsync-worker/src/index.ts @@ -2,7 +2,7 @@ export { journalIdFromString, journalIdToString, randomJournalId, - randomJournalId256 + randomJournalId256, } from "./journal-id"; export { normalizeQuery, sql } from "./sql"; export { SQLSync } from "./sqlsync"; @@ -30,6 +30,5 @@ export type { ParameterizedQuery, QuerySubscription, Row, - SqlValue + SqlValue, }; -