Skip to main content

๐ŸŽฏ lib-target

Rules that enforce consistency between target, lib, and related TypeScript downlevelling options.

Config keyโ€‹

tsconfig.configs["lib-target"]

Flat Config exampleโ€‹

import tsconfig from "eslint-plugin-tsconfig";

export default [tsconfig.configs["lib-target"]];

Rules in this presetโ€‹

  • Fix legend:
    • ๐Ÿ”ง = autofixable
    • ๐Ÿ’ก = suggestions available
    • โ€” = report only
RuleFix
consistent-target-and-libโ€”
no-deprecated-targetโ€”
no-esnext-target-in-libraryโ€”
require-downlevel-iteration-with-iterators๐Ÿ”ง
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
๐Ÿ“ฆ module-resolutionModern and consistent module resolution settings
๐Ÿ”— project-referencesCorrect TypeScript project references setup
๐Ÿ”’ strict-modeStrict mode options beyond the base strict flag