# stylus/hash-object-property-comma
require or disallow commas in hash object properties.
- ⚙️ This rule is included in
"stylelint-plugin-stylus/standard". (options:["always",{"trailing":"never"}]) - 🔧 The fix option (opens new window) can automatically fix some of the problems reported by this rule.
# 📖 Rule Details
This rule require or disallow commas in hash object (opens new window) properties.
# 🔧 Options
{
"stylus/hash-object-property-comma": ["always" | "never",
{
"trailing": "always" | "never"
}
]
}
Primary Option
"always"... Requires comma."never"... Disallows comma.
Secondary Option (optional)
"trailing"... Defines the style apply to the trailing comma.
# "always"
// ✓ GOOD
foo = {
bar: baz,
baz: raz,
}
foo = { bar: baz, baz: raz, }
// ✗ BAD
foo = {
bar: baz
baz: raz
}
foo = { bar: baz, baz: raz }
# "never"
// ✓ GOOD
foo = {
bar: baz
baz: raz
}
foo = { bar: baz, baz: raz }
// ✗ BAD
foo = {
bar: baz,
baz: raz
}
foo = { bar: baz, baz: raz, }
# [ "always", { "trailing": "never" } ]
// ✓ GOOD
foo = {
bar: baz,
baz: raz
}
foo = { bar: baz, baz: raz }
// ✗ BAD
foo = {
bar: baz
baz: raz
}
foo = {
bar: baz,
baz: raz,
}
foo = { bar: baz, baz: raz, }