Skip to content

noDuplicateEnumValueNames

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

Require all enum value names to be unique.

A GraphQL enum type is only valid if all its values are uniquely named. The enum value names are case insensitive, meaning TEST & Test are seen as the same enum value name.

enum A {
TEST
OTHER
TEST
}
code-block.graphql:3:8 lint/nursery/noDuplicateEnumValueNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate enum value name.

1 │ enum A {
2 │ TEST
> 3 │ OTHER

> 4 │ TEST
^^^^
5 │ }
6 │

A GraphQL enum type is only valid if all its values are uniquely named. Make sure to name every enum value differently.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

enum B {
TEST
TesT
}
code-block.graphql:2:7 lint/nursery/noDuplicateEnumValueNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Duplicate enum value name.

1 │ enum B {
> 2 │ TEST

> 3 │ TesT
^^^^
4 │ }
5 │

A GraphQL enum type is only valid if all its values are uniquely named. Make sure to name every enum value differently.

This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.

enum A {
TEST
OTHER
}