Skip to content

toml/key-spacing

enforce consistent spacing between keys and values in key/value pairs

  • ⚙️ This rule is included in "plugin:toml/standard".
  • 🔧 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 key/value pairs.

Now loading...

🔧 Options

yaml
toml/key-spacing:
  - error
  - beforeEqual: false
    afterEqual: true
    mode: strict # or "minimum"
    # "align": "value" or "equal"
    # "singleLine": {}
    # "multiLine": {}

Same as key-spacing rule option. See here for details. However, you need to replace "colon" with "equal".

align: "equal"

Now loading...

🚀 Version

This rule was introduced in eslint-plugin-toml v0.2.0

🔍 Implementation

Taken with ❤️ from ESLint core