Skip to content

Commit c93d87e

Browse files
gabrielmfernbukinoshita
authored andcommitted
chore(root): Use biome beta (#2101)
1 parent 6de6751 commit c93d87e

File tree

69 files changed

+307
-165
lines changed

Some content is hidden

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

69 files changed

+307
-165
lines changed

apps/web/components/code-block-with-line-numbers/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CodeBlock, Font, dracula } from '@react-email/components';
1+
import { CodeBlock, dracula, Font } from '@react-email/components';
22
import { Layout } from '../_components/layout';
33

44
export const component = (

apps/web/components/code-block-with-predefined-theme/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CodeBlock, Font, dracula } from '@react-email/components';
1+
import { CodeBlock, dracula, Font } from '@react-email/components';
22
import { Layout } from '../_components/layout';
33

44
export const component = (

apps/web/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Analytics } from '@vercel/analytics/react';
22
import type { Metadata } from 'next';
33
import '@/styles/globals.css';
4+
import localFont from 'next/font/local';
45
import { Footer } from '@/components/footer';
56
import { Topbar } from '@/components/topbar';
6-
import localFont from 'next/font/local';
77

88
const inter = localFont({
99
display: 'swap',

apps/web/src/components/component-code-view.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import type {
2-
CodeVariant,
3-
ImportedComponent,
4-
} from '@/app/components/get-imported-components-for';
5-
import { useStoredState } from '@/hooks/use-stored-state';
6-
import { convertUrisIntoUrls } from '@/utils/convert-uris-into-urls';
71
import * as Select from '@radix-ui/react-select';
82
import * as Tabs from '@radix-ui/react-tabs';
93
import * as allReactEmailComponents from '@react-email/components';
@@ -15,6 +9,12 @@ import {
159
ClipboardIcon,
1610
} from 'lucide-react';
1711
import * as React from 'react';
12+
import type {
13+
CodeVariant,
14+
ImportedComponent,
15+
} from '@/app/components/get-imported-components-for';
16+
import { useStoredState } from '@/hooks/use-stored-state';
17+
import { convertUrisIntoUrls } from '@/utils/convert-uris-into-urls';
1818
import { CodeBlock } from './code-block';
1919
import { TabTrigger } from './tab-trigger';
2020

apps/web/src/components/template.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client';
22

33
import classNames from 'classnames';
4-
import type { ImageLoader } from 'next/image';
54
import Image from 'next/image';
5+
import type { ImageLoader } from 'next/image';
66
import Link from 'next/link';
77
import * as React from 'react';
88
import { Heading } from './heading';
@@ -67,7 +67,7 @@ export const Template: React.FC<Readonly<ExampleProps>> = ({
6767
{name}
6868
</Heading>
6969
<div className="mt-2 flex flex-row gap-2">
70-
<img
70+
<Image
7171
alt={author}
7272
className="rounded-full"
7373
height="24"

biome.json

Lines changed: 55 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
3-
"organizeImports": {
4-
"enabled": true
2+
"$schema": "https://biomejs.dev/schemas/2.0.0-beta.1/schema.json",
3+
"assist": {
4+
"actions": {
5+
"source": {
6+
"organizeImports": "on"
7+
}
8+
}
59
},
610
"vcs": {
711
"enabled": true,
@@ -21,54 +25,75 @@
2125
"linter": {
2226
"enabled": true,
2327
"rules": {
24-
"recommended": true,
28+
"style": {
29+
"noNonNullAssertion": "off",
30+
"useLiteralEnumMembers": "error",
31+
"noCommaOperator": "error",
32+
"useNodejsImportProtocol": "error",
33+
"useAsConstAssertion": "error",
34+
"useNumericLiterals": "error",
35+
"useEnumInitializers": "error",
36+
"useSelfClosingElements": "error",
37+
"useConst": "error",
38+
"useSingleVarDeclarator": "error",
39+
"noUnusedTemplateLiteral": "error",
40+
"useNumberNamespace": "error",
41+
"noInferrableTypes": "error",
42+
"useExponentiationOperator": "error",
43+
"useTemplate": "error",
44+
"noParameterAssign": "error",
45+
"useDefaultParameterLast": "error",
46+
"noArguments": "error",
47+
"useImportType": "error",
48+
"useExportType": "error",
49+
"noUselessElse": "error",
50+
"useShorthandFunctionType": "error"
51+
},
52+
"performance": {
53+
"noAccumulatingSpread": "off",
54+
"noDelete": "off"
55+
},
2556
"a11y": {
2657
"noSvgWithoutTitle": "off",
2758
"noAutofocus": "off"
2859
},
29-
"nursery": {
30-
"useSortedClasses": "off"
31-
},
32-
"suspicious": {
33-
"noArrayIndexKey": "off",
34-
"noExplicitAny": "off",
35-
"noAssignInExpressions": "off"
36-
},
3760
"correctness": {
3861
"noUnusedImports": "warn",
3962
"useExhaustiveDependencies": "off",
4063
"useJsxKeyInIterable": "off",
4164
"noChildrenProp": "off"
4265
},
66+
"nursery": {
67+
"useSortedClasses": "off"
68+
},
4369
"complexity": {
4470
"noUselessFragments": "off",
4571
"noForEach": "off"
4672
},
47-
"style": {
48-
"noNonNullAssertion": "off"
73+
"suspicious": {
74+
"noArrayIndexKey": "off",
75+
"noExplicitAny": "off",
76+
"noAssignInExpressions": "off"
4977
},
5078
"security": {
5179
"noDangerouslySetInnerHtml": "off"
52-
},
53-
"performance": {
54-
"noAccumulatingSpread": "off",
55-
"noDelete": "off"
5680
}
5781
}
5882
},
5983
"files": {
60-
"ignore": [
61-
"dist",
62-
"pnpm-lock.yaml",
63-
".next",
64-
"public",
65-
"./packages/react-email/src/actions/email-validation/caniemail-data.ts",
66-
"./**/.react-email/**/*",
67-
"./**/node_modules/**/*",
68-
"./**/*.d.ts",
69-
"./**/**/prism.ts",
70-
"out",
71-
".turbo"
84+
"includes": [
85+
"**",
86+
"!**/dist",
87+
"!**/pnpm-lock.yaml",
88+
"!**/.next",
89+
"!**/public",
90+
"!packages/react-email/src/actions/email-validation/caniemail-data.ts",
91+
"!**/.react-email/**/*",
92+
"!**/node_modules/**/*",
93+
"!**/*.d.ts",
94+
"!**/out",
95+
"!**/.turbo",
96+
"!**/prism.ts"
7297
]
7398
}
7499
}

examples/aws-ses/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"sideEffects": false,
66
"type": "module",
77
"main": "./dist/index.js",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch",

examples/mailersend/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"sideEffects": false,
66
"type": "module",
77
"main": "./dist/index.js",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch",

examples/nodemailer/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"sideEffects": false,
66
"type": "module",
77
"main": "./dist/index.js",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch",

examples/plunk/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"sideEffects": false,
66
"type": "module",
77
"main": "./dist/index.js",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch",

examples/postmark/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"type": "module",
66
"sideEffects": false,
77
"main": "./dist/index.js",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch",

examples/scaleway/next/src/lib/scaleway.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TransactionalEmail, createClient } from '@scaleway/sdk';
1+
import { createClient, TransactionalEmail } from '@scaleway/sdk';
22

33
const client = createClient({
44
accessKey: process.env.ACCESS_KEY,

examples/scaleway/node/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"sideEffects": false,
66
"main": "./dist/index.js",
77
"type": "module",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch"

examples/scaleway/node/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { render } from '@react-email/components';
2-
import { TransactionalEmail, createClient } from '@scaleway/sdk';
2+
import { createClient, TransactionalEmail } from '@scaleway/sdk';
33
import { Email } from './email.js';
44

55
const client = createClient({

examples/sendgrid/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"sideEffects": false,
66
"type": "module",
77
"main": "./dist/index.js",
8-
"files": ["dist/**"],
8+
"files": [
9+
"dist/**"
10+
],
911
"scripts": {
1012
"build": "tsup-node src/index.tsx --format esm --target node20",
1113
"dev": "tsup-node src/index.tsx --format esm --target node20 --watch",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"test:watch": "turbo run test:watch"
1616
},
1717
"devDependencies": {
18-
"@biomejs/biome": "1.9.4",
18+
"@biomejs/biome": "2.0.0-beta.1",
1919
"@changesets/cli": "2.28.1",
2020
"@types/node": "22.10.2",
2121
"@types/react": "19.0.1",

packages/body/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "./dist/index.js",
77
"module": "./dist/index.mjs",
88
"types": "./dist/index.d.ts",
9-
"files": ["dist/**"],
9+
"files": [
10+
"dist/**"
11+
],
1012
"exports": {
1113
".": {
1214
"import": {

packages/button/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "./dist/index.js",
77
"module": "./dist/index.mjs",
88
"types": "./dist/index.d.ts",
9-
"files": ["dist/**"],
9+
"files": [
10+
"dist/**"
11+
],
1012
"exports": {
1113
".": {
1214
"import": {
@@ -32,7 +34,10 @@
3234
"url": "https://github.com/resend/react-email.git",
3335
"directory": "packages/button"
3436
},
35-
"keywords": ["react", "email"],
37+
"keywords": [
38+
"react",
39+
"email"
40+
],
3641
"engines": {
3742
"node": ">=18.0.0"
3843
},

packages/code-block/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "./dist/index.js",
77
"module": "./dist/index.mjs",
88
"types": "./dist/index.d.ts",
9-
"files": ["dist/**"],
9+
"files": [
10+
"dist/**"
11+
],
1012
"exports": {
1113
".": {
1214
"import": {
@@ -30,7 +32,10 @@
3032
"url": "https://github.com/resend/react-email.git",
3133
"directory": "packages/code-block"
3234
},
33-
"keywords": ["react", "email"],
35+
"keywords": [
36+
"react",
37+
"email"
38+
],
3439
"engines": {
3540
"node": ">=18.0.0"
3641
},

packages/code-block/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export * from './code-block';
2-
export * from './themes';
32
export * from './languages-available';
3+
export * from './themes';

packages/code-inline/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "./dist/index.js",
77
"module": "./dist/index.mjs",
88
"types": "./dist/index.d.ts",
9-
"files": ["dist/**"],
9+
"files": [
10+
"dist/**"
11+
],
1012
"exports": {
1113
".": {
1214
"import": {

packages/column/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
"main": "./dist/index.js",
77
"module": "./dist/index.mjs",
88
"types": "./dist/index.d.ts",
9-
"files": ["dist/**"],
9+
"files": [
10+
"dist/**"
11+
],
1012
"exports": {
1113
".": {
1214
"import": {
@@ -32,7 +34,10 @@
3234
"url": "https://github.com/resend/react-email.git",
3335
"directory": "packages/column"
3436
},
35-
"keywords": ["react", "email"],
37+
"keywords": [
38+
"react",
39+
"email"
40+
],
3641
"engines": {
3742
"node": ">=18.0.0"
3843
},

0 commit comments

Comments
 (0)