Skip to main content

indent

Enforce consistent indentation.

Attributes

  • Included in configs
    • ✅ Recommended
    • 🔒 Strict
  • Fixable
    • 🔧 Automated Fixer
    • 💡 Suggestion Fixer
  • 💭 Requires type information

Warning

danger

Please read Issue #1824: Problems with the indent rule before using this rule!

Rule Details

This rule extends the base eslint/indent rule. It adds support for TypeScript nodes.

How to Use

.eslintrc.cjs
module.exports = {
// Note: you must disable the base rule as it can report incorrect errors
"indent": "off",
"@typescript-eslint/indent": "warn"
};

Options

See eslint/indent options.

Taken with ❤️ from ESLint core

Resources