Rules
no-unused-internal
Keep internal exports used and out of public API signatures.
Purpose and behavior
Keep internal exports used and out of public API signatures.
The vendored official Effect rule scans .ts source files under cwd/packages/**/src, excluding .d.ts, dist, build and node_modules. It reports unused exported @internal declarations, public re-exports and references in public type signatures. Relative imports and workspace package names are resolved from package metadata. Flat src projects and .tsx files are outside this scan. Every matching .ts file under src, including test files, participates because the scanner has no test-file exclusion. Analysis is cached per working directory for the lifetime of the process, so restart lint after file changes. The package uses a TypeScript 6 compiler API alias for this analysis, not the TypeScript 7 checker.
Options
No configurable options. Enable with "rules/no-unused-internal": "error".
Invalid example
// packages/example/src/value.ts
/** @internal */
export const unused = 1Valid example
// packages/example/src/value.ts
/** @internal */
export const used = 1
const result = used + 1Fixes and exceptions
This rule reports diagnostics without an automatic fix. Rewrite the code deliberately rather than guessing its intended semantics.
For a genuine boundary exception, use an oxlint-disable-next-line rules/no-unused-internal -- reason comment. Examples illustrate this rule alone and may omit imports and declarations.
Source and tests
Enabled by the Effect preset.