Skip to main content

eslint-plugin-tsconfig

ESLint plugin for teams that want consistent tsconfig.json configurations enforced as linting rules.

Uses jsonc-eslint-parser to statically analyze your tsconfig*.json files.

Installationโ€‹

npm install --save-dev eslint-plugin-tsconfig

Quick start (Flat Config)โ€‹

import tsconfig from "eslint-plugin-tsconfig";

export default [tsconfig.configs.recommended];

That is enough to start linting your tsconfig*.json files.

Presetsโ€‹

PresetPreset page
๐ŸŸก tsconfig.configs.recommendedRecommended
๐Ÿ”ด tsconfig.configs.strictStrict
๐ŸŸฃ tsconfig.configs.allAll
๐Ÿ”’ tsconfig.configs["strict-mode"]Strict Mode
๐Ÿ“ฆ tsconfig.configs["module-resolution"]Module Resolution
๐Ÿ“ค tsconfig.configs["emit-config"]Emit Config
๐Ÿงน tsconfig.configs["include-hygiene"]Include Hygiene
๐ŸŽฏ tsconfig.configs["lib-target"]Lib Target
๐Ÿ”— tsconfig.configs["project-references"]Project References

Next stepsโ€‹

  • Open Getting Started in this sidebar.
  • Browse Presets for preset-by-preset guidance.
  • Use Rules to review every rule with examples.