๐งน 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โ
Fixlegend:๐ง= autofixable๐ก= suggestions availableโ= report only
| Rule | Fix |
|---|---|
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 | ๐ง |
Related presetsโ
| Preset | Description |
|---|---|
| ๐ก recommended | Default baseline for most TypeScript codebases |
| ๐ด strict | Recommended plus a richer set of safety rules |
| ๐ฃ all | Every rule, including experimental coverage |
| ๐ค emit-config | Best practices for TypeScript emit/output configuration |
| ๐ฏ lib-target | Consistency between target, lib, and downlevelling |
| ๐ฆ module-resolution | Modern and consistent module resolution settings |
| ๐ project-references | Correct TypeScript project references setup |
| ๐ strict-mode | Strict mode options beyond the base strict flag |