Skip to content

toml/inline-table-key-value-newline

enforce placing inline table key-value pairs on separate lines

  • ⚙️ This rule is included in "configs.standard".
  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule enforces placing each key-value pair of TOML inline tables on a separate line. It is analogous to ESLint's object-property-newline but for TOML inline tables (multiline inline table syntax is available in TOML v1.1+).

Note: The rule is skipped when the parser's TOML version is v1.0 because multiline inline tables are not available in that version.

Now loading...

🔧 Options

yaml
toml/inline-table-key-value-newline:
  - error
  - allowAllPropertiesOnSameLine: false # or true
  • allowAllPropertiesOnSameLine ... when true (default), all properties may be on the same single line (e.g. { a = 1, b = 2 }). When false, each property must be on its own line.
Now loading...

🚀 Version

This rule was introduced in eslint-plugin-toml v1.3.0

🔍 Implementation

Taken with ❤️ from ESLint core