feat(jobnik-manager): gate pull requests on an unused-code report - #13
Open
CptSchnitz wants to merge 2 commits into
Open
feat(jobnik-manager): gate pull requests on an unused-code report#13CptSchnitz wants to merge 2 commits into
CptSchnitz wants to merge 2 commits into
Conversation
Wire knip into the single turbo entry point as a root-scoped `//#knip` task and add it to the pull_request checks matrix, so unused files, exports and dependencies are reported across every workspace on every pull request. Declare the known-legitimate exceptions specifically in knip.json rather than suppressing checks wholesale: the manager's `--import`-only tracing bootstrap as an entry point, the Prisma and OpenAPI-error generated output as ignored paths, the SDK's vitest type-test files as an entry point, and the handful of dependencies that are real but invisible to static analysis (a bare-string prettier config, transitive `@types/*` needed only for .d.ts resolution, and e2e's deliberate `jobnik-manager` dependency that gives turbo's affected-graph an edge docker can't see). Everything left over after those exceptions was genuine dead weight, so it's removed: an unused IConfig interface, a stale pre-vitest jest config, several unexported-but-still-declared types and helpers, unused OpenTelemetry semantic-convention constants, a dangling typedoc config with no invoking script, and a batch of unused dependencies (date-fns and yaml from the SDK, @types/config and jest-create-mock-instance from the manager, pretty-quick from both, since only the root's own copy is ever invoked). Also declares the previously-unlisted @commitlint/types dependency that commitlint.config.js has relied on implicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Coverage Report for apps/jobnik-manager
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
… alias knip ignores src/db/prisma/generated/** for unused-export scanning, so it never parses the generated client file and can't resolve the @prismaClient path alias to it. It falls back to treating the alias as an unlisted npm dependency. Normalize errors.ts to use the @prismaClient alias like the rest of the codebase, and add it to ignoreDependencies. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire knip into the single turbo entry point as a root-scoped
//#kniptask and add it to the pull_request checks matrix, so unused files,
exports and dependencies are reported across every workspace on every
pull request.
Declare the known-legitimate exceptions specifically in knip.json
rather than suppressing checks wholesale: the manager's
--import-only tracing bootstrap as an entry point, the Prisma andOpenAPI-error generated output as ignored paths, the SDK's vitest
type-test files as an entry point, and the handful of dependencies
that are real but invisible to static analysis (a bare-string prettier
config, transitive
@types/*needed only for .d.ts resolution, ande2e's deliberate
jobnik-managerdependency that gives turbo'saffected-graph an edge docker can't see).
Everything left over after those exceptions was genuine dead weight,
so it's removed: an unused IConfig interface, a stale pre-vitest jest
config, several unexported-but-still-declared types and helpers,
unused OpenTelemetry semantic-convention constants, a dangling typedoc
config with no invoking script, and a batch of unused dependencies
(date-fns and yaml from the SDK, @types/config and
jest-create-mock-instance from the manager, pretty-quick from both,
since only the root's own copy is ever invoked).
Also declares the previously-unlisted @commitlint/types dependency
that commitlint.config.js has relied on implicitly.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Stack created with GitHub Stacks CLI • Give Feedback 💬