Skip to content

nbtPathQuote

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 paths or not.

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

Examples

Default

{
    "nbtPathQuote": null
}

👍 Good

data get entity @s Invisible
data get entity @s "Invisible"
data get entity @s "this is crazy"

False

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

👍 Good

data get entity @s Invisible
data get entity @s "this is crazy"

👎 Bad

data get entity @s "Invisible"

True

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

👍 Good

data get entity @s "Invisible"
data get entity @s "this is crazy"

👎 Bad

data get entity @s Invisible

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally