Skip to main content

๐Ÿงน include-hygiene

Rules that enforce clean include, exclude, and files patterns in your tsconfig, preventing accidental inclusion of build artifacts or node_modules.

Config keyโ€‹

tsconfig.configs["include-hygiene"]

Flat Config exampleโ€‹

import tsconfig from "eslint-plugin-tsconfig";

export default [tsconfig.configs["include-hygiene"]];

Rules in this presetโ€‹

  • Fix legend:
    • ๐Ÿ”ง = autofixable
    • ๐Ÿ’ก = suggestions available
    • โ€” = report only
RuleFix
no-allowjs-without-checkjsโ€”
no-include-distโ€”
no-include-node-modules๐Ÿ”ง
no-skip-lib-checkโ€”
require-exclude-common-artifacts๐Ÿ”ง
require-force-consistent-casing-in-file-names๐Ÿ”ง
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
๐ŸŽฏ lib-targetConsistency between target, lib, and downlevelling
๐Ÿ“ฆ module-resolutionModern and consistent module resolution settings
๐Ÿ”— project-referencesCorrect TypeScript project references setup
๐Ÿ”’ strict-modeStrict mode options beyond the base strict flag