Skip to content

selectorKeyQuote

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 entity selector keys or not.

  • (false): never quotes.
  • (true): always quotes.

Examples

Default

{
    "selectorKeyQuote": null
}

👍 Good

kill @e[tag=foo]
kill @e["tag"=foo]

False

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

👍 Good

kill @e[tag=foo]

👎 Bad

kill @e["tag"=foo]

True

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

👍 Good

kill @e["tag"=foo]

👎 Bad

kill @e[tag=foo]

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally