Skip to main content

๐Ÿ”’ strict-mode

Rules that enforce TypeScript strict mode options beyond the base strict flag, including exactOptionalPropertyTypes, noUncheckedIndexedAccess, noImplicitOverride, and similar settings.

Config keyโ€‹

tsconfig.configs["strict-mode"]

Flat Config exampleโ€‹

import tsconfig from "eslint-plugin-tsconfig";

export default [tsconfig.configs["strict-mode"]];

Rules in this presetโ€‹

  • Fix legend:
    • ๐Ÿ”ง = autofixable
    • ๐Ÿ’ก = suggestions available
    • โ€” = report only
RuleFix
no-disable-strict-subsetโ€”
no-suppress-implicit-any-index-errorsโ€”
require-exact-optional-property-types๐Ÿ”ง
require-no-fallthrough-cases-in-switch๐Ÿ”ง
require-no-implicit-override๐Ÿ”ง
require-no-implicit-returns๐Ÿ”ง
require-no-property-access-from-index-signature๐Ÿ”ง
require-no-unchecked-indexed-access๐Ÿ”ง
require-no-unused-locals๐Ÿ”ง
require-no-unused-parameters๐Ÿ”ง
require-strict-mode๐Ÿ”ง
require-use-unknown-in-catch-variables๐Ÿ”ง
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
๐Ÿ”— project-referencesCorrect TypeScript project references setup