Skip to content

Commit b26fbd0

Browse files
committed
biome 2
1 parent 9fec4cc commit b26fbd0

File tree

2,518 files changed

+15117
-18364
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,518 files changed

+15117
-18364
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Setup Biome
6464
uses: biomejs/setup-biome@a9763ed3d2388f5746f9dc3e1a55df7f4609bc89 # v2.5.1
6565
with:
66-
version: latest
66+
version: 2.0.0
6767

6868
- run: pnpm lint
6969

.vscode/settings.json

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,43 @@
11
{
2-
"editor.formatOnSave": true,
3-
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": "explicit",
5-
"source.organizeImports.biome": "explicit",
6-
"quickfix.biome": "explicit"
7-
},
8-
"editor.defaultFormatter": "biomejs.biome",
9-
"typescript.preferences.autoImportFileExcludePatterns": [
10-
"./packages/thirdweb/src/exports"
11-
],
12-
"typescript.preferences.autoImportSpecifierExcludeRegexes": [
13-
"@radix-ui",
14-
"next/router",
15-
"next/dist",
16-
"^lucide-react/dist/lucide-react.suffixed$"
17-
],
18-
"typescript.tsdk": "node_modules/typescript/lib",
19-
"[typescriptreact]": {
20-
"editor.defaultFormatter": "biomejs.biome"
21-
},
22-
"[typescript]": {
23-
"editor.defaultFormatter": "biomejs.biome"
24-
},
25-
"[json]": {
26-
"editor.defaultFormatter": "biomejs.biome"
27-
},
28-
"[markdown]": {
29-
"editor.defaultFormatter": "esbenp.prettier-vscode"
30-
},
31-
"[javascript]": {
32-
"editor.defaultFormatter": "biomejs.biome"
33-
},
34-
"[css]": {
35-
"editor.defaultFormatter": "biomejs.biome"
36-
},
37-
"eslint.workingDirectories": [
38-
{ "pattern": "./packages/*/" },
39-
{ "pattern": "./apps/*/" }
40-
]
2+
"[css]": {
3+
"editor.defaultFormatter": "biomejs.biome"
4+
},
5+
"[javascript]": {
6+
"editor.defaultFormatter": "biomejs.biome"
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "biomejs.biome"
10+
},
11+
"[markdown]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"[typescript]": {
15+
"editor.defaultFormatter": "biomejs.biome"
16+
},
17+
"[typescriptreact]": {
18+
"editor.defaultFormatter": "biomejs.biome"
19+
},
20+
"editor.codeActionsOnSave": {
21+
"quickfix.biome": "explicit",
22+
"source.fixAll.biome": "explicit",
23+
"source.action.organizeImports.biome": "explicit",
24+
"source.action.useSortedAttributes.biome": "explicit",
25+
"source.action.useSortedKeys.biome": "explicit"
26+
},
27+
"editor.defaultFormatter": "biomejs.biome",
28+
"editor.formatOnSave": true,
29+
"eslint.workingDirectories": [
30+
{ "pattern": "./packages/*/" },
31+
{ "pattern": "./apps/*/" }
32+
],
33+
"typescript.preferences.autoImportFileExcludePatterns": [
34+
"./packages/thirdweb/src/exports"
35+
],
36+
"typescript.preferences.autoImportSpecifierExcludeRegexes": [
37+
"@radix-ui",
38+
"next/router",
39+
"next/dist",
40+
"^lucide-react/dist/lucide-react.suffixed$"
41+
],
42+
"typescript.tsdk": "node_modules/typescript/lib"
4143
}

apps/dashboard/.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,14 @@ module.exports = {
189189
"import/newline-after-import": "off",
190190
},
191191
},
192+
// turn OFF unused vars via eslint
193+
{
194+
files: ["*.ts", "*.tsx"],
195+
rules: {
196+
"@typescript-eslint/no-unused-vars": "off",
197+
"@next/next/no-img-element": "off",
198+
},
199+
},
192200
// THIS NEEDS TO GO LAST!
193201
{
194202
files: ["*.ts", "*.js", "*.tsx", "*.jsx"],

apps/dashboard/biome.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
3-
"extends": ["../../biome.json"],
2+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
3+
"extends": "//",
44
"overrides": [
55
{
6-
"include": ["src/css/swagger-ui.css"],
6+
"includes": ["**/src/css/swagger-ui.css"],
77
"linter": {
88
"rules": {
99
"suspicious": {

apps/dashboard/knip.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"$schema": "https://unpkg.com/knip@5/schema.json",
3-
"next": true,
4-
"ignore": [
5-
"src/@/components/ui/**",
6-
"src/components/notices/AnnouncementBanner.tsx",
7-
"src/components/cmd-k-search/index.tsx",
8-
"src/lib/search.ts"
9-
],
10-
"project": ["src/**"],
11-
"ignoreBinaries": ["only-allow", "biome"],
12-
"ignoreDependencies": [
13-
"@thirdweb-dev/service-utils",
14-
"@thirdweb-dev/vault-sdk",
15-
"@types/color",
16-
"fast-xml-parser"
17-
]
2+
"$schema": "https://unpkg.com/knip@5/schema.json",
3+
"next": true,
4+
"ignore": [
5+
"src/@/components/ui/**",
6+
"src/components/notices/AnnouncementBanner.tsx",
7+
"src/components/cmd-k-search/index.tsx",
8+
"src/lib/search.ts"
9+
],
10+
"project": ["src/**"],
11+
"ignoreBinaries": ["only-allow"],
12+
"ignoreDependencies": [
13+
"@thirdweb-dev/service-utils",
14+
"@thirdweb-dev/vault-sdk",
15+
"@types/color",
16+
"fast-xml-parser"
17+
]
1818
}

apps/dashboard/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
"zod": "3.25.62"
107107
},
108108
"devDependencies": {
109+
"@biomejs/biome": "2.0.0",
109110
"@chakra-ui/cli": "^2.4.1",
110111
"@chromatic-com/storybook": "4.0.0",
111112
"@next/bundle-analyzer": "15.3.3",

apps/dashboard/src/@/actions/createTeam.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,12 @@ import "server-only";
33

44
// biome-ignore lint/style/useNodejsImportProtocol: breaks storybook if it's `node:` prefixed
55
import { randomBytes } from "crypto";
6-
import type { Team } from "@/api/team";
76
import { format } from "date-fns";
7+
import type { Team } from "@/api/team";
88
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
99
import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs";
1010

11-
export async function createTeam(options?: {
12-
name?: string;
13-
slug?: string;
14-
}) {
11+
export async function createTeam(options?: { name?: string; slug?: string }) {
1512
const token = await getAuthToken();
1613

1714
if (!token) {

apps/dashboard/src/@/actions/deleteTeam.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import "server-only";
33
import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
44
import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs";
55

6-
export async function deleteTeam(options: {
7-
teamId: string;
8-
}) {
6+
export async function deleteTeam(options: { teamId: string }) {
97
const token = await getAuthToken();
108
if (!token) {
119
return {

apps/dashboard/src/@/actions/getBalancesFromMoralis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use server";
22
import { defineDashboardChain } from "lib/defineDashboardChain";
3-
import { ZERO_ADDRESS, isAddress, toTokens } from "thirdweb";
3+
import { isAddress, toTokens, ZERO_ADDRESS } from "thirdweb";
44
import { getWalletBalance } from "thirdweb/wallets";
55
import { MORALIS_API_KEY } from "../constants/server-envs";
66
import { serverThirdwebClient } from "../constants/thirdweb-client.server";

apps/dashboard/src/@/analytics/hooks/identify-team.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
import posthog from "posthog-js";
44
import { useEffect } from "react";
55

6-
export function useIdentifyTeam(opts?: {
7-
teamId: string;
8-
}) {
6+
export function useIdentifyTeam(opts?: { teamId: string }) {
97
// eslint-disable-next-line no-restricted-syntax
108
useEffect(() => {
119
// if no teamId, don't identify

0 commit comments

Comments
 (0)