Skip to content

fix: resolve knip false positives blocking pre-commit hook#249

Open
jamesbroadhead wants to merge 1 commit intodatabricks:mainfrom
jamesbroadhead:fix/knip-unused-deps
Open

fix: resolve knip false positives blocking pre-commit hook#249
jamesbroadhead wants to merge 1 commit intodatabricks:mainfrom
jamesbroadhead:fix/knip-unused-deps

Conversation

@jamesbroadhead
Copy link
Copy Markdown

Summary

  • The knip check in the pre-commit hook fails on every commit due to false positives
  • globals.css is reported as unused (knip doesn't trace CSS files, but it's used by build config and package exports)
  • tailwindcss and tw-animate-css are reported as unused devDeps (imported via CSS @import in globals.css)
  • json-schema-to-typescript is reported as unused (used in tools/generate-schema-types.ts, but tools/** is in knip's file ignore list)
  • Adds appropriate ignore rules to knip.json for all four false positives

Test plan

  • pnpm knip passes cleanly after the change
  • Pre-commit hook passes

This pull request was AI-assisted by Isaac.

…cies

knip doesn't trace CSS @import directives or files in ignored
directories, causing false positives for:
- globals.css (used by build config and package exports)
- tailwindcss/tw-animate-css (imported in globals.css)
- json-schema-to-typescript (used in tools/generate-schema-types.ts)

Co-authored-by: Isaac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant