🎉 Welcome to the new GraphQL-ESLint website. Try new playground page →
Rules
No Case Insensitive Enum Values Duplicates

no-case-insensitive-enum-values-duplicates

✅ The "extends": "plugin:@graphql-eslint/schema-recommended" property in a configuration file enables this rule.

💡 This rule provides suggestions (opens in a new tab)

  • Category: Schema
  • Rule name: @graphql-eslint/no-case-insensitive-enum-values-duplicates
  • Requires GraphQL Schema: false ℹī¸
  • Requires GraphQL Operations: false ℹī¸

Disallow case-insensitive enum values duplicates.

Usage Examples

Incorrect

# eslint @graphql-eslint/no-case-insensitive-enum-values-duplicates: 'error'
 
enum MyEnum {
  Value
  VALUE
  ValuE
}

Correct

# eslint @graphql-eslint/no-case-insensitive-enum-values-duplicates: 'error'
 
enum MyEnum {
  Value1
  Value2
  Value3
}

Resources