Skip to content

nbtCompoundKeyQuote

SPGoding edited this page Apr 26, 2020 · 1 revision

Rule Details

⚠️ Diagnostic: this is a diagnostic rule used by the diagnostic feature.

🔧 Fixable: violations of this rule can be fixed by Code Actions.

Whether to quote keys in NBT compounds or not.

  • (false): only quotes when necessary.
  • (true): always quotes.

Examples

Default

{
    "nbtCompoundKeyQuote": null
}

👍 Good

summon minecraft:armor_stand ~ ~ ~ {Invisible: 1b}
summon minecraft:armor_stand ~ ~ ~ {"Invisible": 1b}
summon minecraft:armor_stand ~ ~ ~ {"this is crazy": 1b}

False

{
    "nbtCompoundKeyQuote": ["warning", false]
}

👍 Good

summon minecraft:armor_stand ~ ~ ~ {Invisible: 1b}
summon minecraft:armor_stand ~ ~ ~ {"this is crazy": 1b}

👎 Bad

summon minecraft:armor_stand ~ ~ ~ {"Invisible": 1b}

True

{
    "nbtCompoundKeyQuote": ["warning", true]
}

👍 Good

summon minecraft:armor_stand ~ ~ ~ {"Invisible": 1b}
summon minecraft:armor_stand ~ ~ ~ {"this is crazy": 1b}

👎 Bad

summon minecraft:armor_stand ~ ~ ~ {Invisible: 1b}

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally