Source graph
Configuration
Understand entry files, project globs, test file patterns, ignores, aliases, and unresolved imports.
Config Discovery
Codescythe reads config from an explicit path, root config file, or package manifest. Explicit paths are best for CI because they remove ambiguity.
codescythe.jsoncodescythe.jsoncpackage.jsonunder thecodescythekey- an explicit
--configpath
Entry Files
Entry files are the reachable roots of the source graph. A file or export reachable from an entry is treated as used.
"entry": [
"src/index.ts",
"src/cli.ts",
"src/routes/**/*.tsx"
]Model detached applications, CLI entrypoints, package exports, and end-to-end specs as entries when they should keep their imports alive.
Project Files
Project globs define the files Codescythe is allowed to report as unused. Keep generated output, vendored code, build artifacts, and intentionally detached examples outside the project set or under ignore rules.
"project": [
"src/**/*.{js,jsx,ts,tsx}",
"packages/*/src/**/*.{ts,tsx}"
]Test File Patterns
Files matching test file patterns are treated as leaf files. They can be removed when they only test code that is being removed, but they do not make production imports look used.
"testFilePatterns": [
"**/*.test.*"
]Config Fields
entryFiles and globs that keep imports and exports alive. Use one entry per application, CLI, package boundary, or detached spec root that should anchor reachability.
"entry": [
"src/index.ts",
"src/cli.ts",
"src/routes/**/*.tsx"
]projectKeep generated output, vendored files, build output, and intentional examples outside this set or covered by ignore rules.
"project": [
"src/**/*.{js,jsx,ts,tsx}",
"packages/*/src/**/*.{ts,tsx}"
]testFilePatternsMatching files do not mark production imports as used. Configure .spec files explicitly if they should behave like test leaves.
"testFilePatterns": [
"**/*.test.*",
"**/*.spec.*"
]ignoreUse for generated, vendored, or otherwise intentionally detached files. Doctor warns when generated-looking ignore patterns also match checked source files.
"ignore": [
"src/generated/**",
"**/*.stories.tsx"
]aliasesExplicit source alias mappings override or supplement package metadata when package.json imports are not enough.
"aliases": {
"#app/*": "src/*",
"#generated/*": ["src/generated/*"]
}unresolvedImportsUse report while tuning config, error in CI when unresolved source imports are unacceptable, and ignore only for reviewed non-source patterns.
"unresolvedImports": {
"mode": "error",
"ignore": ["*.svg?raw", "virtual:*"]
}includeEntryExportsSet true when entry files are also public export surfaces and their exports should be checked instead of automatically preserved.
"includeEntryExports": trueignoreExportsUsedInFileSuppresses exported symbols that are referenced inside their declaring file. Use sparingly for modules with deliberate local export patterns.
"ignoreExportsUsedInFile": true