.js-to-.ts Import Extension Convention

Description

Codebase-wide convention of writing ESM imports with .js extensions (import x from './foo.js') even though the source is TypeScript. Required by Node's strict ESM resolver but must be unwound at build time. The esbuild build resolves this via resolveExtensions: ['.tsx', '.ts', '.jsx', '.js', '.json'] so ./foo.js imports are first tried as ./foo.tsx then ./foo.ts.

Key claims

Relations

Sources

src-20260420-5444205c5d32