pub fn typed_eslint(
cwd: &Path,
ns_dir: &Path,
deadline: Instant,
cancel: &AtomicBool,
) -> boolExpand description
Whether eslint here uses type information. FAIL-CLOSED: anything but a definite “untyped” reads as typed, which only costs the cache, where a wrong “untyped” would let a stale per-file cache prove a typed tree.
Two looks, either of which says typed:
- the TEXT of every tracked eslint config (
eslint.config.*,.eslintrc*):projectService, orparserOptionswithproject. This catches a block that types files by name (**/*.test.ts) that no sample would hit; eslint --print-configfor one tracked file per (directory, extension) pair where eslint runs, as flat configs select files — bounded bydeadline, cancellable, throughtree_run. A file eslint ignores (it printsundefined) answers nothing.
Untyped is remembered only when both looks are clean and at least one
sampled file answered. More pairs than [MAX_TYPED_SAMPLE], a probe error,
or no answer at all reads typed and remembers nothing, so a transient
failure never disables the cache for good. Known gap: a shared config
PACKAGE that types by file name, whose words never appear in a local
config and whose files no sample hits.