useGraphqlNamingConvention
¥Summary
-
规则生效日期:
v2.0.0¥Rule available since:
v2.0.0 -
诊断类别:
lint/style/useGraphqlNamingConvention¥Diagnostic Category:
lint/style/useGraphqlNamingConvention -
此规则没有修复方案。
¥This rule doesn’t have a fix.
-
此规则的默认严重级别为 information。
¥The default severity of this rule is information.
-
来源:
¥Sources:
-
灵感来自
enum-values-all-caps¥Inspired from
enum-values-all-caps
-
¥How to configure
{ "linter": { "rules": { "style": { "useGraphqlNamingConvention": "error" } } }}¥Description
验证所有枚举值是否都已大写。
¥Validates that all enum values are capitalized.
按照 GraphQL 的约定,枚举值全部大写。
¥By convention in GraphQL, enum values are all caps.
¥Examples
¥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.
¥Valid
enum MyEnum { VALUE}¥Related links
Biome v2.1 中文网 - 粤ICP备13048890号