Skip to main content

Module ts

Module ts 

Source
Expand description

TypeScript isolation analysis (issue #43), parsed with oxc.

This is the TypeScript counterpart to the Python crate::lint module. The integration direction (#75) lands first: an integration test runs first-party code for real, so it may mock third-party packages and Node built-ins but never a first-party module.

Detection is AST-based — each *.test.{ts,tsx,mts,cts} file is parsed with oxc_parser and walked for vi.mock() / vi.doMock() calls whose target specifier is first-party. The specifier classify-ication (first-party / Node-builtin / third-party) is the shared foundation the unit-direction slices (#76, #77) build on.

Enums§

Origin
Where a module specifier resolves, for isolation purposes.

Functions§

classify
Classify a module specifier as first-party, Node-builtin, or third-party.
find_integration_violations
Scan the TypeScript test files under root and return every integration-isolation violation, sorted by (file, line) for deterministic output.
find_unit_violations
Scan the unit test files under root and return every isolation violation — a runtime import that isn’t vi.mock()-ed (#76) — sorted by (file, line). The TypeScript arm of unit isolation (crate::isolation::Language::TypeScript).