Skip to content

toml/quoted-keys

require or disallow quotes around keys

  • ⚙️ 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 reports quoted keys that can use bare keys.

Now loading...

🔧 Options

yaml
toml/quoted-keys:
  - error
  - prefer: as-needed # or "always"
    numbers: true
  • prefer
    • "as-needed" ... Disallows quotes around key names that are not strictly required. It is default.
    • "always" ... Requires quotes around all key names.
  • numbers ... If true, requires quotes around numbers used as key names (only applies when using "as-needed"). Default true,

📚 Further reading

🚀 Version

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

🔍 Implementation