jsonc/indent
enforce consistent indentation
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule enforces a consistent indentation style. The default style is 4 spaces
.
🔧 Options
json
{
"jsonc/indent": ["error",
4,
{}
]
}
Same as indent rule option. See here for details.
- First option ... Sets the indentation style. default
4
Set to2
if you prefer 2 spaces indentation.
Set to"tab"
if you prefer tab indentation. - Second option ... You can set the object to customize it further.
👫 Related rules
🚀 Version
This rule was introduced in eslint-plugin-jsonc v0.1.0
🔍 Implementation
Taken with ❤️ from ESLint core