Skip to content

stylus/selector-list-comma

require or disallow selector list comma.

  • ⚙️ This rule is included in "stylelint-stylus/standard". (options: "never")
  • 🔧 The fix option can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule require or disallow selector list comma.

🔧 Options

json
{
  "stylus/selector-list-comma": ["always" | "never"]
}
  • "always" ... Requires comma.
  • "never" ... Disallows comma.

"always"

styl
/* stylelint rules config: {"stylus/selector-list-comma": "always"} */
// ✓ GOOD
.foo,
.bar
  color red

// ✗ BAD
.foo
.bar color red

"never"

styl
/* stylelint rules config: {"stylus/selector-list-comma": "never"} */
// ✓ GOOD
.foo
.bar
  color red

// ✗ BAD
.foo
,
.bar color red

📚 Further reading

🔍 Implementation