# toml/no-mixed-type-in-array

disallow mixed data types in array

# 📖 Rule Details

This rule reports mixed data types in an array.
It was prohibited in TOML v0.5.0. https://toml.io/en/v0.5.0#array (opens new window)

Now loading...

# 🔧 Options

toml/no-mixed-type-in-array:
  - error
  - typeMap:
      string: String
      integer: Integer
      float: Float
      boolean: Boolean
      offsetDateTime: Datetime
      localDateTime: Datetime
      localDate: Datetime
      localTime: Datetime
      array: Array
      inlineTable: Inline Table
  • typeMap ... Specifies the type and its actual type name. For example, if you want to check offsetDateTime and localDateTime as different types, specify different names for each.
    e.g.

    offsetDateTime: OffsetDatetime
    localDateTime: LocalDatetime
    

# 📚 Further reading

# 🚀 Version

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

# 🔍 Implementation