Skip to main content

๐Ÿ”— project-references

Rules that enforce correct TypeScript project references setup, requiring composite, declaration, and other settings that project references depend on.

Config keyโ€‹

tsconfig.configs["project-references"]

Flat Config exampleโ€‹

import tsconfig from "eslint-plugin-tsconfig";

export default [tsconfig.configs["project-references"]];

Rules in this presetโ€‹

  • Fix legend:
    • ๐Ÿ”ง = autofixable
    • ๐Ÿ’ก = suggestions available
    • โ€” = report only
RuleFix
no-emit-in-root-config๐Ÿ”ง
require-composite-for-references๐Ÿ”ง
require-declaration-with-composite๐Ÿ”ง
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
๐Ÿ“ฆ module-resolutionModern and consistent module resolution settings
๐Ÿ”’ strict-modeStrict mode options beyond the base strict flag