Skip to content

useGraphqlNamingConvention

Validates that all enum values are capitalized.

By convention in GraphQL, enum values are all caps.

enum MyEnum {
value
}
code-block.graphql:2:2 lint/style/useGraphqlNamingConvention ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Enum values should be in all caps.

1 │ enum MyEnum {
> 2 │ value
^^^^^
3 │ }
4 │

Change the enum value to be in all caps.

enum MyEnum {
VALUE
}
biome.json
{
"linter": {
"rules": {
"style": {
"useGraphqlNamingConvention": "error"
}
}
}
}