Перейти к содержимому

useConsistentGraphqlDescriptions

Это содержимое пока не доступно на вашем языке.

biome.json
{
"linter": {
"rules": {
"nursery": {
"useConsistentGraphqlDescriptions": "error"
}
}
}
}

Require all descriptions to follow the same style (either block or inline) to maintain consistency and improve readability across the schema.

enum EnumValue {
"this is a description"
DEFAULT
}
code-block.graphql:2:3 lint/nursery/useConsistentGraphqlDescriptions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Unexpected inline description style.

1 │ enum EnumValue {
> 2 │ “this is a description”
^^^^^^^^^^^^^^^^^^^^^^^
3 │ DEFAULT
4 │ }

To stay consistent within the project, write the description block style.

enum EnumValue {
"""
this is a description
"""
DEFAULT
}

This option will specify the description style.

  • "block": Requires triple-quoted block descriptions ("""...""")
  • "inline": Requires single-quoted inline descriptions ("...")

Default "block"

biome.json
{
"linter": {
"rules": {
"nursery": {
"useConsistentGraphqlDescriptions": {
"options": {
"style": "inline"
}
}
}
}
}
}
enum EnumValue {
"""
this is a description
"""
DEFAULT
}