useConsistentGraphqlDescriptions
Este conteúdo não está disponível em sua língua ainda.
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/useConsistentGraphqlDescriptions - This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "useConsistentGraphqlDescriptions": "error" } } }}Description
Section titled “Description”Require all descriptions to follow the same style (either block or inline) to maintain consistency and improve readability across the schema.
Examples
Section titled “Examples”style: block
Section titled “style: block”Invalid
Section titled “Invalid”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}Options
Section titled “Options”This option will specify the description style.
"block": Requires triple-quoted block descriptions ("""...""")"inline": Requires single-quoted inline descriptions ("...")
Default "block"
{ "linter": { "rules": { "nursery": { "useConsistentGraphqlDescriptions": { "options": { "style": "inline" } } } } }}enum EnumValue { """ this is a description """ DEFAULT}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.