nbtCompoundKeyQuoteType - ChenCMD/datapack-helper-plus-JP GitHub Wiki

ルールの詳細

⚠️ Diagnostic: これは、校閲機能によって使用される校閲ルールです。

🔧 Fixable: これは、校閲機能によって使用される校閲ルールです。

NBT compoundのキーの引用符の種類を強制します。

  • ("always single"): 常に一重引用符を使用する (').
  • ("always double"): 常に二重引用符を使用する (").
  • ("prefer single"): 常に一重引用符を使用する (')文字列内に一重引用符が存在していない場合。
  • ("prefer double"): 常に二重引用符を使用する (")文字列内に二重引用符が存在していない場合。

Default

{
    "nbtCompoundKeyQuoteType": ["warning", "prefer double"]
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {"Invisible": 1b}
summon minecraft:armor_stand ~ ~ ~ {"crazy'key": 1b}
summon minecraft:armor_stand ~ ~ ~ {'crazy"key': 1b}

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {'Invisible': 1b}
summon minecraft:armor_stand ~ ~ ~ {'crazy\'key': 1b}
summon minecraft:armor_stand ~ ~ ~ {"crazy\"key": 1b}

Always Double

{
    "nbtCompoundKeyQuoteType": ["warning", "always double"]
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {"Invisible": 1b}
summon minecraft:armor_stand ~ ~ ~ {"crazy'key": 1b}
summon minecraft:armor_stand ~ ~ ~ {"crazy\"key": 1b}

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {'Invisible': 1b}
summon minecraft:armor_stand ~ ~ ~ {'crazy\'key': 1b}
summon minecraft:armor_stand ~ ~ ~ {'crazy"key': 1b}

無効化

{
    "nbtCompoundKeyQuoteType": null
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {"Invisible": 1b}
summon minecraft:armor_stand ~ ~ ~ {'Invisible': 1b}
summon minecraft:armor_stand ~ ~ ~ {"crazy'key": 1b}
summon minecraft:armor_stand ~ ~ ~ {'crazy\'key': 1b}
summon minecraft:armor_stand ~ ~ ~ {"crazy\"key": 1b}
summon minecraft:armor_stand ~ ~ ~ {'crazy"key': 1b}

History

このルールはDHP 2.0.0で実装されました。

⚠️ **GitHub.com Fallback** ⚠️