Skip to main content

๐Ÿ“ฆ module-resolution

Rules that enforce modern and consistent module resolution settings in tsconfig, including moduleResolution, module, and esModuleInterop options.

Config keyโ€‹

tsconfig.configs["module-resolution"]

Flat Config exampleโ€‹

import tsconfig from "eslint-plugin-tsconfig";

export default [tsconfig.configs["module-resolution"]];

Rules in this presetโ€‹

  • Fix legend:
    • ๐Ÿ”ง = autofixable
    • ๐Ÿ’ก = suggestions available
    • โ€” = report only
RuleFix
consistent-module-resolutionโ€”
no-esmoduleinterop-with-verbatim๐Ÿ”ง
no-legacy-module-detectionโ€”
no-legacy-module-resolutionโ€”
require-bundler-module-resolution๐Ÿ”ง
require-isolated-modules๐Ÿ”ง
require-verbatim-module-syntax๐Ÿ”ง
PresetDescription
๐ŸŸก recommendedDefault baseline for most TypeScript codebases
๐Ÿ”ด strictRecommended plus a richer set of safety rules
๐ŸŸฃ allEvery rule, including experimental coverage
๐Ÿ“ค emit-configBest practices for TypeScript emit/output configuration
๐Ÿงน include-hygieneClean include, exclude, and files patterns
๐ŸŽฏ lib-targetConsistency between target, lib, and downlevelling
๐Ÿ”— project-referencesCorrect TypeScript project references setup
๐Ÿ”’ strict-modeStrict mode options beyond the base strict flag