src/content/docs/linter/rules/no-duplicate-enum-value-names.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="GraphQL" icon="seti:graphql"> :::caution This rule is part of the [nursery](/linter/#nursery) group. This means that it is experimental and the behavior can change at any time. ::: ## Summary - Rule available since: `v2.3.12` - Diagnostic Category: [`lint/nursery/noDuplicateEnumValueNames`](/reference/diagnostics#diagnostic-category) - This rule doesn't have a fix. - The default severity of this rule is [**information**](/reference/diagnostics#information). - Sources: - Same as [`@graphql-eslint/unique-enum-value-names`](https://the-guild.dev/graphql/eslint/rules/unique-enum-value-names){
"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
}
enum B {
TEST
TesT
}
enum A {
TEST
OTHER
}