A utility for inferring runtime types of expression nodes within ESLint rules, enabling type-aware linting without a full TypeScript type checker. Version 0.5.2 is the latest stable release with support for Temporal, Math.sumPrecise(), well-known symbols, and improved type definitions. It is published under MIT license and maintained by ota-meshi. Key differentiators: lightweight, no external runtime dependencies, limited to single-file analysis (no cross-module inference), and exports ESM via .mjs extension. Designed for ESLint v8.57+, Node.js >=18. Typical use cases include validating arrays, strings, numbers, and other built-in types inside ESLint rule implementations.
npm install eslint-type-tracerVerified import paths — ran on the pinned version, not inferred.
Creates an ESLint rule that uses buildTypeTracer to infer the type of the object in a member expression and reports if it is an Array.
Update to v0.5.2 or later where Temporal definitions were improved.
Migrate to v0.2.0+ using buildTypeTracer and buildTypeChecker.
Switch to ESM imports ('import { ... } from "eslint-type-tracer"') or use dynamic import.Do not rely on the tool for cross-module inference; consider using TypeScript's type checker if needed.
Use dynamic import: const { buildTypeTracer } = await import('eslint-type-tracer'); or use ESM in your project.Ensure eslint-type-tracer is installed and that you are using the correct import: import { buildTypeTracer } from 'eslint-type-tracer'.