Configuration Hints
Knip emits configuration hints to help keep your configuration file tidy and reduce drift.
They’re warnings by default, not lint findings. But addressing the hints might improve results significantly. The hints on this page are sorted by impact/importance (most impactful first).
Each hint shows the value, followed by a message that points to the location in the configuration file:
generated/** Remove from knip.json → packages/app → ignore (gitignored)lodash Remove from knip.json → ignoreDependenciesThe location reads as file → workspace → option. The workspace segment is the
key in workspaces (such as packages/*), or (root) for workspaces["."].
Options at the top level have no workspace segment.
Use --treat-config-hints-as-errors or treatConfigHintsAsErrors to
make any configuration hint an error and result in a non-zero exit code to fail
CI.
Unconfigured projects
Section titled “Unconfigured projects”Too many unused files in a single workspace-codebase, caused by a missing configuration file or incomplete configuration:
Create knip.json configuration file, and add entry and/or refine project files (42 unused files)Or if you have a config file:
Add entry and/or refine project files in knip.json (42 unused files)Solution: Add and refine entry and/or project patterns.
Related resources:
Unconfigured workspaces
Section titled “Unconfigured workspaces”Too many unused files in a monorepo, caused by a missing configuration file or incomplete configuration:
Create knip.json configuration file with workspaces["packages/app"] object (42 unused files)Or if you have a config file:
Add entry and/or refine project files in knip.json → workspaces["packages/app"] (42 unused files)Solution: add a workspaces object to configuration. Add and refine entry
and/or project patterns. For instance, the example message translates to
configuration like this:
{ "workspaces": { "packages/app": { "entry": ["src/App.tsx"], "project": ["src/**/*.ts"] } }}Related resources:
Top-level entry/project
Section titled “Top-level entry/project”In monorepos, Knip uses only entry and project under workspaces. The
top-level keys with the same name are ignored.
Remove unused knip.json → entry, or move to "workspaces"Remove unused knip.json → project, or move to "workspaces"Solution: Remove top-level entry and project keys, use these options in
workspaces instead.
{ "entry": ["src/App.tsx"], // move entry/project from here... ↴ "project": ["src/**/*.ts"], "workspaces": { ".": { "entry": ["src/App.tsx"], // ...to the correct workspace(s) ↲ "project": ["src/**/*.ts"], }, },}Stale workspace configuration
Section titled “Stale workspace configuration”A key in the workspaces configuration matches no workspace in the project, for
instance after the workspace was removed or renamed.
Remove from knip.json → workspacesSolution: Remove the stale key from workspaces, or correct its path.
Unused ignore patterns
Section titled “Unused ignore patterns”A pattern in ignore or ignoreFiles did not suppress any issue.
Remove from knip.json → ignore (gitignored)Remove from knip.json → ignore (no issues)Remove from knip.json → ignore (no matches)Remove from knip.json → ignoreFiles (files are used)The reason in parentheses tells why the pattern is not needed:
gitignored: the pattern is already matched in some.gitignorefileno issues: matching files exist, but there are no issues to ignorefiles are used: matching files exist, and they’re usedno matches: the pattern matches no files
Solution: Remove the pattern from the array.
Unused entry in ignore group
Section titled “Unused entry in ignore group”An entry of an ignore list is no longer needed, remove it.
Remove from knip.json → ignoreWorkspacesRemove from knip.json → ignoreDependenciesRemove from knip.json → ignoreBinariesRemove from knip.json → ignoreUnresolvedSolution: Remove the entry from the array.
Useless patterns
Section titled “Useless patterns”A glob pattern in entry or project does not match any files.
Refine knip.json → entry pattern (no matches)Refine knip.json → project pattern (no matches)Solution: Refine or remove the entry or project entry.
Redundant patterns
Section titled “Redundant patterns”A glob/pattern is redundant, because it’s already covered by defaults or added by an enabled plugin.
Remove redundant pattern from knip.json → entryRemove redundant pattern from knip.json → projectSolution: Remove the entry or project entry.
Missing package entry file
Section titled “Missing package entry file”Package entry file not found in packages/app/package.jsonSolution: Refine or remove the entry in package.json.
ISC License © 2026Lars Kappert