useGraphqlNamingConvention
Summary
Section titled “Summary”- Rule available since:
v2.0.0
- Diagnostic Category:
lint/style/useGraphqlNamingConvention
- This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
- Inspired from
graphql/enum-values-all-caps
- Inspired from
Description
Section titled “Description”Validates that all enum values are capitalized.
By convention in GraphQL, enum values are all caps.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”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}
How to configure
Section titled “How to configure”{ "linter": { "rules": { "style": { "useGraphqlNamingConvention": "error" } } }}