Skip to content

types-format

Check that types conditions use the correct .d.mts/.d.cts extensions for dual packages

PropertyValue
Rule IDexports/types-format
Categoryexports
Severity🟡 warning
FixableNo

What it Checks

In dual ESM/CJS packages, TypeScript expects .d.mts for ESM types and .d.cts for CJS types. Using .d.ts for both can cause resolution issues.

Configuration

Disable this rule:

bash
tspub check --ignore-rules "exports/types-format"

Or in tspub.config.ts:

typescript
export default {
  check: {
    severityOverrides: {
      "exports/types-format": "off",  // or "warning", "error", "info"
    },
  },
};

Released under the MIT License.