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

ルールの詳細

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

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

NBT文字列の引用符の種類を強制します。

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

Default

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

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {CustomName: "123"}
summon minecraft:armor_stand ~ ~ ~ {CustomName: '"foo"'}

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {CustomName: '123'}
summon minecraft:armor_stand ~ ~ ~ {CustomName: "\"foo\""}

Always Double

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

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {CustomName: "123"}
summon minecraft:armor_stand ~ ~ ~ {CustomName: "\"foo\""}

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {CustomName: '123'}
summon minecraft:armor_stand ~ ~ ~ {CustomName: '"foo"'}

無効化

{
    "nbtStringQuoteType": null
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {CustomName: "123"}
summon minecraft:armor_stand ~ ~ ~ {CustomName: "\"foo\""}
summon minecraft:armor_stand ~ ~ ~ {CustomName: '123'}
summon minecraft:armor_stand ~ ~ ~ {CustomName: '"foo"'}

History

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

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