Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,18 @@ jobs:
run: pnpm lint
env:
SKIP_ENV_VALIDATION: true
knip:
runs-on: blacksmith-2vcpu-ubuntu-2204
container:
image: node:22-slim
steps:
- name: Checkout Repo
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
with:
fetch-depth: 1
- name: pnpm setup
uses: pnpm/action-setup@9b5745cdf0a2e8c2620f0746130f809adb911c19
- name: Install packages
run: pnpm install --frozen-lockfile --prefer-offline
- name: Run Knip
run: pnpm knip
6 changes: 2 additions & 4 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
"dependencies": {
"@react-email/components": "workspace:*",
"email-dev": "workspace:*",
"react": "catalog:",
"react-dom": "catalog:"
"react": "catalog:"
},
"devDependencies": {
"@react-email/preview-server": "workspace:*",
"next": "catalog:"
"@react-email/preview-server": "workspace:*"
}
}
3 changes: 1 addition & 2 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"dev": "mintlify dev"
},
"dependencies": {
"mintlify": "4.2.423",
"zod": "catalog:"
"mintlify": "4.2.423"
}
}
4 changes: 1 addition & 3 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
},
"dependencies": {
"@babel/parser": "catalog:",
"@babel/preset-typescript": "7.27.0",
"@babel/traverse": "catalog:",
"@radix-ui/react-popover": "catalog:",
"@react-email/components": "workspace:*",
Expand Down Expand Up @@ -44,18 +43,17 @@
"@radix-ui/react-tooltip": "catalog:",
"@react-email/preview-server": "workspace:*",
"@tailwindcss/postcss": "catalog:",
"@types/babel__core": "catalog:",
"@types/babel__traverse": "catalog:",
"@types/node": "catalog:",
"@types/three": "0.170.0",
"@vercel/firewall": "1.1.2",
"classnames": "2.5.1",
"html-to-ast": "0.0.6",
"jsdom": "29.0.0",
"postcss": "catalog:",
"tailwindcss": "catalog:",
"tsconfig": "workspace:*",
"typescript": "catalog:",
"webpack": "5.105.4",
"zod": "catalog:"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ export const StripeWelcomeEmail = () => (
</Html>
);

export default StripeWelcomeEmail;

const main = {
backgroundColor: '#f6f9fc',
fontFamily:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const getComponentElement = async (
return patternModule.component as React.ReactElement;
};

export const getImportedComponent = async (
const getImportedComponent = async (
component: Component,
): Promise<ImportedComponent> => {
const dirpath = getComponentPathFromSlug(component.slug);
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/components/tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
import type * as React from 'react';
import { TooltipContent } from './tooltip-content';

export type TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;
export const Tooltip = TooltipPrimitive.Root;

const TooltipTrigger = TooltipPrimitive.TooltipTrigger;
Expand Down
43 changes: 0 additions & 43 deletions apps/web/src/webgl/materials/MeshBannerMaterial.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/web/src/webgl/materials/MeshImageMaterial.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { extend } from '@react-three/fiber';
import * as THREE from 'three';
import type { WebGLProgramParametersWithUniforms } from 'three/src/renderers/webgl/WebGLPrograms.js';

export class MeshImageMaterial extends THREE.MeshBasicMaterial {
class MeshImageMaterial extends THREE.MeshBasicMaterial {
constructor(parameters: THREE.MeshBasicMaterialParameters = {}) {
super(parameters);
}
Expand Down
1 change: 0 additions & 1 deletion benchmarks/preview-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"tinybench": "catalog:"
},
"devDependencies": {
"tsconfig": "workspace:*",
"typescript": "catalog:"
}
}

This file was deleted.

3 changes: 0 additions & 3 deletions benchmarks/preview-server/src/utils/sleep.ts

This file was deleted.

2 changes: 1 addition & 1 deletion benchmarks/tailwind/src/emails/with-tailwind.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: '';

export const GooglePlayPolicyUpdateEmailWithTailwind = ({
const GooglePlayPolicyUpdateEmailWithTailwind = ({
Tailwind,
}: {
Tailwind: React.FC<TailwindProps>;
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/tailwind/src/emails/without-tailwind.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const baseUrl = process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}`
: '';

export const GooglePlayPolicyUpdateEmail = () => (
const GooglePlayPolicyUpdateEmail = () => (
<Html>
<Head />
<Body style={main}>
Expand Down
56 changes: 56 additions & 0 deletions knip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
"ignoreExportsUsedInFile": {
"interface": true,
"type": true
},
"tags": ["-lintignore"],
"ignore": ["examples/**", "apps/web/public/**"],
"workspaces": {
".": {
"entry": ["scripts/*.ts", "scripts/*.mts"]
},
"apps/demo": {
"entry": ["emails/**/*.tsx", "emails/**/*.ts"]
},
"apps/web": {
"entry": ["components/**/*.tsx", "src/illustrations/**/*.tsx"]
},
"benchmarks/preview-server": {
"entry": ["src/*.ts"]
},
"benchmarks/tailwind": {
"entry": ["src/*.tsx", "tailwind.config.js"]
},
"packages/create-email": {
"entry": ["template/**/*.tsx"],
"ignoreDependencies": ["@react-email/components"]
},
"packages/preview-server": {
"entry": [
"jsx-runtime/**",
"scripts/utils/default-seed/**/*.tsx",
"src/utils/caniemail/tailwind/tests/**",
"src/utils/testing/**"
]
},
"packages/react-email": {
"entry": [
"src/commands/testing/**",
"src/utils/preview/hot-reloading/test/**"
]
},
"packages/tailwind": {
"entry": ["e2e/**"],
"ignoreDependencies": ["@react-email/components", "next", "yalc"]
},
"packages/tsconfig": {
"ignoreDependencies": ["next"]
},
"playground": {
"entry": ["*.ts", "emails/**/*.tsx"]
}
},
"ignoreDependencies": ["@react-email/preview-server", "react-email"],
"exclude": ["duplicates", "optionalPeerDependencies"]
}
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"build": "turbo run build",
"canary:enter": "changeset pre enter canary",
"canary:exit": "changeset pre exit",
"knip": "knip",
"lint": "biome check",
"lint:fix": "biome check --write .",
"release": "turbo run build --filter=./packages/* && pnpm changeset publish",
Expand All @@ -17,27 +18,23 @@
"@actions/core": "3.0.0",
"@actions/exec": "3.0.0",
"@actions/github": "9.0.0",
"@actions/http-client": "4.0.0",
"@biomejs/biome": "2.3.11",
"@changesets/cli": "2.30.0",
"@changesets/pre": "2.0.2",
"@manypkg/get-packages": "3.1.0",
"@octokit/core": "7.0.6",
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"happy-dom": "20.8.3",
"knip": "5.75.2",
"mdast-util-to-string": "4.0.0",
"nypm": "catalog:",
"pkg-pr-new": "0.0.65",
"rollup": "4.59.0",
"remark": "15.0.1",
"tsconfig": "workspace:*",
"tsdown": "catalog:",
"tsx": "catalog:",
"turbo": "2.8.13",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "4.0.17"
},
"pnpm": {
Expand Down
1 change: 0 additions & 1 deletion packages/code-block/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"react": "^18.0 || ^19.0 || ^19.0.0-rc"
},
"devDependencies": {
"@react-email/render": "workspace:*",
"@types/prismjs": "1.26.5",
"tsconfig": "workspace:*",
"typescript": "catalog:"
Expand Down
1 change: 0 additions & 1 deletion packages/code-inline/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"react": "^18.0 || ^19.0 || ^19.0.0-rc"
},
"devDependencies": {
"@react-email/render": "workspace:*",
"tsconfig": "workspace:*",
"typescript": "catalog:"
}
Expand Down
1 change: 0 additions & 1 deletion packages/create-email/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
},
"devDependencies": {
"nypm": "catalog:",
"react": "catalog:",
"tsconfig": "workspace:*",
"typescript": "catalog:"
}
Expand Down
9 changes: 0 additions & 9 deletions packages/preview-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@
"next": "catalog:"
},
"devDependencies": {
"@babel/core": "7.26.10",
"@babel/parser": "catalog:",
"@babel/traverse": "catalog:",
"@lottiefiles/dotlottie-react": "0.17.13",
"@radix-ui/colors": "catalog:",
"@radix-ui/react-collapsible": "1.1.12",
"@radix-ui/react-dropdown-menu": "2.1.16",
"@radix-ui/react-popover": "catalog:",
"@radix-ui/react-slot": "catalog:",
"@radix-ui/react-tabs": "catalog:",
Expand All @@ -57,16 +54,11 @@
"@react-email/tailwind": "workspace:2.0.6",
"@react-email/text": "workspace:*",
"@tailwindcss/postcss": "catalog:",
"@types/babel__core": "catalog:",
"@types/babel__traverse": "catalog:",
"@types/css-tree": "catalog:",
"@types/fs-extra": "11.0.4",
"@types/mime-types": "catalog:",
"@types/node": "catalog:",
"@types/normalize-path": "3.0.2",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@types/webpack": "5.28.5",
"clsx": "2.1.1",
"colorjs.io": "0.6.0",
"cross-env": "10.1.0",
Expand All @@ -83,7 +75,6 @@
"react-dom": "catalog:",
"resend": "catalog:",
"rimraf": "6.1.3",
"sharp": "0.34.5",
"socket.io-client": "4.8.3",
"sonner": "catalog:",
"source-map-js": "1.2.1",
Expand Down
19 changes: 0 additions & 19 deletions packages/preview-server/src/components/icons/icon-bug.tsx

This file was deleted.

Loading
Loading