jsonc/key-spacing
enforce consistent spacing between keys and values in object literal properties
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule enforces consistent spacing between keys and values in object literal properties. In the case of long lines, it is acceptable to add a new line wherever whitespace is allowed.
🔧 Options
json
{
"jsonc/key-spacing": ["error",
{
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}
]
}
Same as key-spacing rule option. See here for details.
👫 Related rules
🚀 Version
This rule was introduced in eslint-plugin-jsonc v0.1.0
🔍 Implementation
Taken with ❤️ from ESLint core