Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.03 KB

no-case-insensitive-enum-values-duplicates.md

File metadata and controls

41 lines (29 loc) · 1.03 KB

no-case-insensitive-enum-values-duplicates

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

  • 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