useUniqueVariableNames
此内容尚不支持你的语言。
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/useUniqueVariableNames - This rule doesn’t have a fix.
- The default severity of this rule is information.
- Sources:
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "useUniqueVariableNames": "error" } } }}Description
Section titled “Description”Require all variable definitions to be unique.
A GraphQL operation is only valid if all its variables are uniquely named.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”query ($x: Int, $x: Int) { field}code-block.graphql:1:7 lint/nursery/useUniqueVariableNames ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ℹ Duplicate variable name.
> 1 │ query ($x: Int, $x: Int) {
│ ^^^^^^^^^^^^^^^^^^
2 │ field
3 │ }
ℹ A GraphQL operation is only valid if all its variables are uniquely named. Make sure to name every variable differently.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
query ($x: Int, $y: Int) { field}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.