Skip to content

Commit

Permalink
feat: biome 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
o-az committed Sep 16, 2024
1 parent f470c33 commit 0604160
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion app/src/hooks.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import type { HandleClientError } from "@sveltejs/kit"
*/

// biome-ignore lint/suspicious/useAwait: no need
export const handleError = (async ({ error, event, status, message, ...context }) => {
export const handleError = (async ({ error, message }) => {
const errorId = crypto.randomUUID()

return { errorId, message: `${message} - ${error}` }
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/actions/copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const resolveConfiguration = <K extends keyof HTMLElementEventMap>(
const events =
typeof parameters.event === "string"
? [parameters.event]
: parameters.event ?? (["click"] as K | Array<K>)
: (parameters.event ?? (["click"] as K | Array<K>))
return { trigger, enabled, text, events, synthetic }
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/components/precise.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const abbreviateNumber = (num: number, displayDecimals: number): string => {
$: supportedAsset = asset ? getSupportedAsset(chain, asset.address) : null
$: balance = asset ? asset.balance ?? BigInt(0) : BigInt(0)
$: balance = asset ? (asset.balance ?? BigInt(0)) : BigInt(0)
$: decimals = asset && supportedAsset ? supportedAsset.decimals : asset ? asset.decimals : 0
$: symbol =
asset && supportedAsset ? supportedAsset.display_symbol : asset ? asset.symbol : "Unknown"
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/transfer/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type TransferState = DiscriminatedUnion<
>

export const transferStep = (state: TransferState): number => {
// biome-ignore lint/nursery/useDefaultSwitchClause: i want typescript to error if we forgot a case
// biome-ignore lint/style/useDefaultSwitchClause: i want typescript to error if we forgot a case
switch (state.kind) {
case "PRE_TRANSFER":
return 1
Expand Down
35 changes: 19 additions & 16 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://esm.sh/@biomejs/biome@1.8.3/configuration_schema.json",
"$schema": "https://esm.sh/@biomejs/biome@1.9.1/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
Expand Down Expand Up @@ -70,7 +70,8 @@
"*.json",
"*.jsonc",
"*.astro",
"*.svelte"
"*.svelte",
"*.graphql"
],
"ignoreUnknown": true,
"ignore": [
Expand Down Expand Up @@ -122,7 +123,8 @@
"*.json",
"*.jsonc",
"*.astro",
"*.svelte"
"*.svelte",
"*.graphql"
],
"ignore": [
"_",
Expand Down Expand Up @@ -172,29 +174,30 @@
},
"nursery": {
"all": true,
"noConsole": "off",
"useTopLevelRegex": "off",
"noSecrets": "off",
"noProcessEnv": "off",
"useStrictMode": "off",
"noExportedImports": "off",
"useImportRestrictions": "off",
"noUndeclaredDependencies": "off",
"noUnusedFunctionParameters": "off",
"noUselessUndefinedInitialization": "off"
"useImportRestrictions": "off"
},
"performance": {
"all": true,
"noDelete": "off",
"noBarrelFile": "off",
"noReExportAll": "off",
"useTopLevelRegex": "off",
"noAccumulatingSpread": "warn"
},
"correctness": {
"all": true,
"noNodejsModules": "off",
"noUnusedVariables": "off",
"noUndeclaredVariables": "off"
"noUndeclaredVariables": "off",
"noUndeclaredDependencies": "off"
},
"suspicious": {
"all": true,
"noConsole": "off",
"noConsoleLog": "off",
"noExplicitAny": "off",
"noCatchAssign": "off",
Expand Down Expand Up @@ -228,7 +231,8 @@
"*.json",
"*.jsonc",
"*.astro",
"*.svelte"
"*.svelte",
"*.graphql"
],
"ignore": [
"_",
Expand Down Expand Up @@ -294,7 +298,8 @@
"correctness": {
"noUnusedLabels": "off",
"noUnusedImports": "off",
"useHookAtTopLevel": "off"
"useHookAtTopLevel": "off",
"noUnusedFunctionParameters": "off"
},
"style": {
"useConst": "off",
Expand All @@ -303,7 +308,7 @@
"suspicious": {
"noConfusingLabels": "off"
},
"nursery": {
"complexity": {
"noUselessUndefinedInitialization": "off"
}
}
Expand All @@ -313,9 +318,7 @@
"include": ["scripts", "*config*"],
"linter": {
"rules": {
"nursery": {
"noConsole": "off"
}
"nursery": {}
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
flake = false;
};
biome = {
url = "github:biomejs/biome/cli/v1.8.3";
url = "github:biomejs/biome/cli/v1.9.1";
flake = false;
};

Expand Down
2 changes: 1 addition & 1 deletion site/src/lib/contentful/live-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function findElementByDataAttribute({ entryId, fieldId }: { entryId: string; fie

function displayFieldData({
entry,
client,
client: _client,
fieldId,
entryId
}: {
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/api/blog/webhook.json.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { APIRoute } from "astro"
import { purgeCache } from "@netlify/functions"

export const POST: APIRoute = async ({ params, request, ...context }) => {
export const POST: APIRoute = async ({ request }) => {
const body = (await request.json()) as { sys: { id: string } }

const contentfulWebhookSecret = process.env.CONTENTFUL_WEBHOOK_SECRET
Expand Down
2 changes: 1 addition & 1 deletion tools/biome/biome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

rustToolchain = rust.mkNightly { targets = [ CARGO_BUILD_TARGET ]; };

BIOME_VERSION = "1.8.3";
BIOME_VERSION = "1.9.1";

biome = (crane.lib.overrideToolchain rustToolchain).buildPackage {
inherit CARGO_BUILD_TARGET BIOME_VERSION;
Expand Down
4 changes: 2 additions & 2 deletions typescript-sdk/src/client/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export const createCosmosClient = (parameters: CosmosClientParameters) =>
receiver,
denomAddress,
destinationChainId,
memo = timestamp(),
relayContractAddress,
memo: _memo = timestamp(),
account = parameters.account,
gasPrice = parameters.gasPrice
}: TransferAssetsParameters<CosmosChainId>): Promise<Result<string, Error>> => {
Expand Down Expand Up @@ -138,9 +138,9 @@ export const createCosmosClient = (parameters: CosmosClientParameters) =>
return err(new Error("Unsupported network"))
},
simulateTransaction: async ({
memo,
amount,
receiver,
memo: _memo,
denomAddress,
destinationChainId,
relayContractAddress,
Expand Down
2 changes: 1 addition & 1 deletion typescript-sdk/src/transfer/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export async function approveTransferAssetFromEvm(
* ```
*/
export async function transferAssetFromEvmSimulate(
client: WalletClient & PublicActions,
_client: WalletClient & PublicActions,
{
memo,
amount,
Expand Down

0 comments on commit 0604160

Please sign in to comment.