这是indexloc提供的服务,不要输入任何密码
Skip to content

ci: introduce knip #10384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 25, 2025
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
- name: Lint
# Manually set TURBO_API to an empty string to override Hetzner env
run: |
TURBO_API= turbo run lint --env-mode=strict
TURBO_API= turbo run lint knip --env-mode=strict

cleanup:
name: Cleanup
Expand Down
1 change: 1 addition & 0 deletions docs/site/app/(no-sidebar)/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default async function Page(props: {
return (
<article className="prose pt-10 mx-auto mb-10 w-full min-w-0 max-w-5xl px-6 md:px-12">
<h1 className="text-left">{page.data.title}</h1>
{/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Types not inferred correctly */}
<Mdx components={mdxComponents} />
</article>
);
Expand Down
1 change: 1 addition & 0 deletions docs/site/app/(no-sidebar)/blog/[...slug]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default async function Page(props: {
</Link>
</div>

{/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Types not inferred correctly */}
<Mdx components={mdxComponents} />
</article>
);
Expand Down
1 change: 1 addition & 0 deletions docs/site/app/(sidebar)/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default async function Page(props: {

<CopyToMarkdown markdownContent={rawMarkdown} />
</div>
{/* eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- Types not inferred correctly */}
<Mdx components={mdxComponents} />
</>
);
Expand Down
7 changes: 1 addition & 6 deletions docs/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"collect-examples-data": "node ./scripts/collect-examples-data.mjs"
},
"dependencies": {
"@headlessui/react": "^1.7.17",
"@heroicons/react": "1.0.6",
"@radix-ui/react-collapsible": "^1.1.3",
"@radix-ui/react-dialog": "^1.1.6",
Expand All @@ -31,7 +30,6 @@
"@radix-ui/react-slot": "^1.1.2",
"@radix-ui/react-tooltip": "^1.1.8",
"@react-spring/web": "^9.7.3",
"@turbo/gen": "workspace:*",
"@vercel/speed-insights": "1.2.0",
"algoliasearch": "^4.23.3",
"class-variance-authority": "^0.7.1",
Expand Down Expand Up @@ -59,13 +57,11 @@
"zod": "^3.24.2"
},
"devDependencies": {
"@mdx-js/mdx": "^3.0.1",
"@next/env": "15.3.1-canary.12",
"@turbo/eslint-config": "workspace:*",
"@next/eslint-plugin-next": "15.3.1-canary.12",
"@turbo/eslint-config": "workspace:*",
"@turbo/tsconfig": "workspace:^",
"@turbo/types": "workspace:*",
"@types/mdx": "^2.0.8",
"@types/node": "20.11.30",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
Expand All @@ -75,7 +71,6 @@
"autoprefixer": "^10.4.20",
"eslint": "8.57.0",
"gray-matter": "^4.0.3",
"openapi-types": "^12.1.3",
"postcss": "^8.4.35",
"rss": "^1.2.2",
"spellchecker-cli": "^6.2.0",
Expand Down
22 changes: 22 additions & 0 deletions knip.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "https://unpkg.com/knip@5/schema-jsonc.json",
"ignore": [
"turborepo-tests/**",
// Not working well for this package for some reason
"docs/link-checker/**",
// TODO: Widen coverage
"packages/**"
],
"workspaces": {
"docs/site": {
"ignoreDependencies": [
// TODO: We're using this but its getting reported?
"copy-to-clipboard",
"@next/env",
"@next/eslint-plugin-next",
"rss",
"@radix-ui/react-dropdown-menu"
]
}
}
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"lint:prettier": "turbo run lint:prettier",
"check:toml": "taplo format --check",
"docs:dev": "turbo run dev --filter=turborepo-docs",
"knip": "knip --include dependencies",
"turbo": "pnpm run build:turbo && node turbow.js",
"turbo-prebuilt": "node turbow.js",
"prepare": "husky install",
Expand All @@ -19,8 +20,10 @@
},
"devDependencies": {
"@taplo/cli": "^0.5.2",
"@types/node": "^22.15.1",
"eslint": "^8.55.0",
"husky": "^8.0.0",
"knip": "^5.50.5",
"lint-staged": "^13.1.0",
"prettier": "^2.8.7",
"semver": "^7.3.8",
Expand Down
Loading
Loading