Skip to content

Commit a5d3d13

Browse files
committed
biome 2
1 parent ffea73c commit a5d3d13

File tree

5,457 files changed

+359192
-362452
lines changed

Some content is hidden

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

5,457 files changed

+359192
-362452
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/acceptInvite.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,50 @@ import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
44
import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs";
55

66
export async function acceptInvite(options: {
7-
teamId: string;
8-
inviteId: string;
7+
teamId: string;
8+
inviteId: string;
99
}) {
10-
const token = await getAuthToken();
10+
const token = await getAuthToken();
1111

12-
if (!token) {
13-
return {
14-
ok: false,
15-
errorMessage: "You are not authorized to perform this action",
16-
};
17-
}
12+
if (!token) {
13+
return {
14+
ok: false,
15+
errorMessage: "You are not authorized to perform this action",
16+
};
17+
}
1818

19-
const res = await fetch(
20-
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${options.teamId}/invites/${options.inviteId}/accept`,
21-
{
22-
method: "POST",
23-
headers: {
24-
"Content-Type": "application/json",
25-
Authorization: `Bearer ${token}`,
26-
},
27-
body: JSON.stringify({}),
28-
},
29-
);
19+
const res = await fetch(
20+
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${options.teamId}/invites/${options.inviteId}/accept`,
21+
{
22+
method: "POST",
23+
headers: {
24+
"Content-Type": "application/json",
25+
Authorization: `Bearer ${token}`,
26+
},
27+
body: JSON.stringify({}),
28+
},
29+
);
3030

31-
if (!res.ok) {
32-
let errorMessage = "Failed to accept invite";
33-
try {
34-
const result = (await res.json()) as {
35-
error: {
36-
code: string;
37-
message: string;
38-
statusCode: number;
39-
};
40-
};
41-
errorMessage = result.error.message;
42-
} catch {}
31+
if (!res.ok) {
32+
let errorMessage = "Failed to accept invite";
33+
try {
34+
const result = (await res.json()) as {
35+
error: {
36+
code: string;
37+
message: string;
38+
statusCode: number;
39+
};
40+
};
41+
errorMessage = result.error.message;
42+
} catch {}
4343

44-
return {
45-
ok: false,
46-
errorMessage,
47-
};
48-
}
44+
return {
45+
ok: false,
46+
errorMessage,
47+
};
48+
}
4949

50-
return {
51-
ok: true,
52-
};
50+
return {
51+
ok: true,
52+
};
5353
}

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

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
44
import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs";
55

66
export async function reSubscribePlan(options: {
7-
teamId: string;
7+
teamId: string;
88
}): Promise<{ status: number }> {
9-
const token = await getAuthToken();
10-
if (!token) {
11-
return {
12-
status: 401,
13-
};
14-
}
9+
const token = await getAuthToken();
10+
if (!token) {
11+
return {
12+
status: 401,
13+
};
14+
}
1515

16-
const res = await fetch(
17-
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${options.teamId}/checkout/resubscribe-plan`,
18-
{
19-
method: "PUT",
20-
headers: {
21-
"Content-Type": "application/json",
22-
Authorization: `Bearer ${token}`,
23-
},
24-
body: JSON.stringify({}),
25-
},
26-
);
16+
const res = await fetch(
17+
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/teams/${options.teamId}/checkout/resubscribe-plan`,
18+
{
19+
method: "PUT",
20+
headers: {
21+
"Content-Type": "application/json",
22+
Authorization: `Bearer ${token}`,
23+
},
24+
body: JSON.stringify({}),
25+
},
26+
);
2727

28-
if (!res.ok) {
29-
return {
30-
status: res.status,
31-
};
32-
}
28+
if (!res.ok) {
29+
return {
30+
status: res.status,
31+
};
32+
}
3333

34-
return {
35-
status: 200,
36-
};
34+
return {
35+
status: 200,
36+
};
3737
}

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

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,39 @@ import { getAuthToken } from "../../app/(app)/api/lib/getAuthToken";
44
import { NEXT_PUBLIC_THIRDWEB_API_HOST } from "../constants/public-envs";
55

66
export async function confirmEmailWithOTP(otp: string) {
7-
const token = await getAuthToken();
7+
const token = await getAuthToken();
88

9-
if (!token) {
10-
return {
11-
errorMessage: "You are not authorized to perform this action",
12-
};
13-
}
9+
if (!token) {
10+
return {
11+
errorMessage: "You are not authorized to perform this action",
12+
};
13+
}
1414

15-
const res = await fetch(
16-
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/account/confirmEmail`,
17-
{
18-
method: "PUT",
19-
headers: {
20-
"Content-Type": "application/json",
21-
Authorization: `Bearer ${token}`,
22-
},
23-
body: JSON.stringify({
24-
confirmationToken: otp,
25-
}),
26-
},
27-
);
15+
const res = await fetch(
16+
`${NEXT_PUBLIC_THIRDWEB_API_HOST}/v1/account/confirmEmail`,
17+
{
18+
method: "PUT",
19+
headers: {
20+
"Content-Type": "application/json",
21+
Authorization: `Bearer ${token}`,
22+
},
23+
body: JSON.stringify({
24+
confirmationToken: otp,
25+
}),
26+
},
27+
);
2828

29-
if (!res.ok) {
30-
const json = await res.json();
29+
if (!res.ok) {
30+
const json = await res.json();
3131

32-
if (json.error) {
33-
return {
34-
errorMessage: json.error.message,
35-
};
36-
}
32+
if (json.error) {
33+
return {
34+
errorMessage: json.error.message,
35+
};
36+
}
3737

38-
return {
39-
errorMessage: "Failed to confirm email",
40-
};
41-
}
38+
return {
39+
errorMessage: "Failed to confirm email",
40+
};
41+
}
4242
}

0 commit comments

Comments
 (0)