Skip to content

blockStateTrailingComma

SPGoding edited this page Apr 26, 2020 · 1 revision

Rule Details

🎨 Stylistic: this is a stylistic rule used by the formatting feature.

Whether there should be a trailing comma after the last key-value pair in block states or not.

  • (boolean)

Examples

Default

{
    "blockStateTrailingComma": false
}

👍 Good

setblock ~ ~ ~ minecraft:stone_button[]
setblock ~ ~ ~ minecraft:stone_button[face=ceiling]

👎 Bad

setblock ~ ~ ~ minecraft:stone_button[face=ceiling,]

True

{
    "blockStateTrailingComma": true
}

👍 Good

setblock ~ ~ ~ minecraft:stone_button[]
setblock ~ ~ ~ minecraft:stone_button[face=ceiling,]

👎 Bad

setblock ~ ~ ~ minecraft:stone_button[face=ceiling]

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally