Skip to content

Commit a51af0f

Browse files
authored
chore(root): Use biome beta (#2101)
1 parent cc35ec7 commit a51af0f

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",

0 commit comments

Comments
 (0)