astro/prefer-split-class-list

require use split array elements in class:list

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule aims to use split array elements than string concatenation in class:list.

🔧 Options

{
  "astro/prefer-split-class-list": [
    "error",
    {
      "splitLiteral": false // or true
    }
  ]
}
  • splitLiteral … If true, it will also split string literals separated by whitespace. Default is false.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-astro v0.4.0

🔍 Implementation



Edit this page