Skip to content

Commit

Permalink
replace outdated doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujin Wang committed Dec 3, 2024
1 parent 8b7d753 commit 43d9101
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 75 deletions.
58 changes: 29 additions & 29 deletions mixins/graphql/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,57 +15,57 @@ module.exports = {
rules: {
/**
* A GraphQL document is only valid for execution if all definitions are either operation or fragment definitions.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/executable-definitions.md
* @see https://the-guild.dev/graphql/eslint/rules/executable-definitions
*/
"@graphql-eslint/executable-definitions": "error",

/**
* A GraphQL document is only valid if all fields selected are defined by the parent type, or are an allowed meta field such as __typename.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/fields-on-correct-type.md
* @see https://the-guild.dev/graphql/eslint/rules/fields-on-correct-type
*/
"@graphql-eslint/fields-on-correct-type": "error",

/**
* Fragments use a type condition to determine if they apply,
* since fragments can only be spread into a composite type (object, interface, or union), the type condition must also be a composite type.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/fragments-on-composite-type.md
* @see https://the-guild.dev/graphql/eslint/rules/fragments-on-composite-type
*/
"@graphql-eslint/fragments-on-composite-type": "error",

/**
* A GraphQL field is only valid if all supplied arguments are defined by that field.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-argument-names.md
* @see https://the-guild.dev/graphql/eslint/rules/known-argument-names
*/
"@graphql-eslint/known-argument-names": "error",

/**
* A GraphQL document is only valid if all @directives are known by the schema and legally positioned.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-directives.md
* @see https://the-guild.dev/graphql/eslint/rules/known-directives
*/
"@graphql-eslint/known-directives": "error",

/**
* A GraphQL document is only valid if all ...Fragment fragment spreads refer to fragments defined in the same document.
* DISABLED - does not work for GraphQL codegen
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-fragment-names.md
* @see https://the-guild.dev/graphql/eslint/rules/known-fragment-names
*/
"@graphql-eslint/known-fragment-names": "off",

/**
* A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-type-names.md
* @see https://the-guild.dev/graphql/eslint/rules/known-type-names
*/
"@graphql-eslint/known-type-names": "error",

/**
* A GraphQL document is only valid if when it contains an anonymous operation (the query short-hand) that it contains only that one operation definition.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/lone-anonymous-operation.md
* @see https://the-guild.dev/graphql/eslint/rules/lone-anonymous-operation
*/
"@graphql-eslint/lone-anonymous-operation": "error",

/**
* Require names to follow specified conventions.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/naming-convention.md
* @see https://the-guild.dev/graphql/eslint/rules/naming-convention
*/
"@graphql-eslint/naming-convention": [
"error",
Expand All @@ -92,68 +92,68 @@ module.exports = {

/**
* Require name for your GraphQL operations. This is useful since most GraphQL client libraries are using the operation name for caching purposes.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-anonymous-operations.md
* @see https://the-guild.dev/graphql/eslint/rules/no-anonymous-operations
*/
"@graphql-eslint/no-anonymous-operations": "error",

/**
* Enforce that deprecated fields or enum values are not in use by operations.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-deprecated.md
* @see https://the-guild.dev/graphql/eslint/rules/no-deprecated
*/
"@graphql-eslint/no-deprecated": "error",

/**
* Checks for duplicate fields in selection set, variables in operation definition, or in arguments set of a field.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-duplicate-fields.md
* @see https://the-guild.dev/graphql/eslint/rules/no-duplicate-fields
*/
"@graphql-eslint/no-duplicate-fields": "error",

/**
* A GraphQL fragment is only valid when it does not have cycles in fragments usage.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-fragment-cycles.md
* @see https://the-guild.dev/graphql/eslint/rules/no-fragment-cycles
*/
"@graphql-eslint/no-fragment-cycles": "error",

/**
* A GraphQL operation is only valid if all variables encountered, both directly and via fragment spreads, are defined by that operation.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-undefined-variables.md
* @see https://the-guild.dev/graphql/eslint/rules/no-undefined-variables
*/
"@graphql-eslint/no-undefined-variables": "error",

/**
* A GraphQL document is only valid if all fragment definitions are spread within operations, or spread within other fragments spread within operations.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-unused-fragments.md
* @see https://the-guild.dev/graphql/eslint/rules/no-unused-fragments
*/
"@graphql-eslint/no-unused-fragments": "error",

/**
* A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-unused-variables.md
* @see https://the-guild.dev/graphql/eslint/rules/no-unused-variables
*/
"@graphql-eslint/no-unused-variables": "error",

/**
* A GraphQL subscription is valid only if it contains a single root field.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/one-field-subscriptions.md
* @see https://the-guild.dev/graphql/eslint/rules/one-field-subscriptions
*/
"@graphql-eslint/one-field-subscriptions": "error",

/**
* A selection set is only valid if all fields (including spreading any fragments) either correspond to distinct response names or can be merged without ambiguity.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/overlapping-fields-can-be-merged.md
* @see https://the-guild.dev/graphql/eslint/rules/overlapping-fields-can-be-merged
*/
"@graphql-eslint/overlapping-fields-can-be-merged": "error",

/**
* A fragment spread is only valid if the type condition could ever possibly be true:
* if there is a non-empty intersection of the possible parent types, and possible types which pass the type condition.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/possible-fragment-spread.md
* @see https://the-guild.dev/graphql/eslint/rules/possible-fragment-spread
*/
"@graphql-eslint/possible-fragment-spread": "error",

/**
* A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/provided-required-arguments.md
* @see https://the-guild.dev/graphql/eslint/rules/provided-required-arguments
*/
"@graphql-eslint/provided-required-arguments": "error",

Expand All @@ -165,55 +165,55 @@ module.exports = {

/**
* A GraphQL document is valid only if all leaf fields (fields without sub selections) are of scalar or enum types.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/scalar-leafs.md
* @see https://the-guild.dev/graphql/eslint/rules/scalar-leafs
*/
"@graphql-eslint/scalar-leafs": "error",

/**
* Limit the complexity of the GraphQL operations solely by their depth. Based on graphql-depth-limit.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/selection-set-depth.md
* @see https://the-guild.dev/graphql/eslint/rules/selection-set-depth
*/
"@graphql-eslint/selection-set-depth": ["error", { maxDepth: 7 }],

/**
* A GraphQL field or directive is only valid if all supplied arguments are uniquely named.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-argument-names.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-argument-names
*/
"@graphql-eslint/unique-argument-names": "error",

/**
* A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-directive-names-per-location.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-directive-names-per-location
*/
"@graphql-eslint/unique-directive-names-per-location": "error",

/**
* A GraphQL input object value is only valid if all supplied fields are uniquely named.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-input-field-names.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-input-field-names
*/
"@graphql-eslint/unique-input-field-names": "error",

/**
* A GraphQL operation is only valid if all its variables are uniquely named.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-variable-names.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-variable-names
*/
"@graphql-eslint/unique-variable-names": "error",

/**
* A GraphQL document is only valid if all value literals are of the type expected at their position.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/value-literals-of-correct-type.md
* @see https://the-guild.dev/graphql/eslint/rules/value-literals-of-correct-type
*/
"@graphql-eslint/value-literals-of-correct-type": "error",

/**
* A GraphQL operation is only valid if all the variables it defines are of input types (scalar, enum, or input object).
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/variables-are-input-types.md
* @see https://the-guild.dev/graphql/eslint/rules/variables-are-input-types
*/
"@graphql-eslint/variables-are-input-types": "error",

/**
* Variables passed to field arguments conform to type.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/variables-in-allowed-position.md
* @see https://the-guild.dev/graphql/eslint/rules/variables-in-allowed-position
*/
"@graphql-eslint/variables-in-allowed-position": "error",
},
Expand Down
36 changes: 18 additions & 18 deletions mixins/graphql/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,37 @@ module.exports = {

/**
* Require all comments to follow the same style.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/description-style.md
* @see https://the-guild.dev/graphql/eslint/rules/description-style
*/
"@graphql-eslint/description-style": "error",

/**
* A GraphQL field is only valid if all supplied arguments are defined by that field.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-argument-names.md
* @see https://the-guild.dev/graphql/eslint/rules/known-argument-names
*/
"@graphql-eslint/known-argument-names": "error",

/**
* A GraphQL document is only valid if all @directives are known by the schema and legally positioned.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-directives.md
* @see https://the-guild.dev/graphql/eslint/rules/known-directives
*/
"@graphql-eslint/known-directives": "error",

/**
* A GraphQL document is only valid if referenced types (specifically variable definitions and fragment conditions) are defined by the type schema.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/known-type-names.md
* @see https://the-guild.dev/graphql/eslint/rules/known-type-names
*/
"@graphql-eslint/known-type-names": "error",

/**
* A GraphQL document is only valid if it contains only one schema definition.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/lone-schema-definition.md
* @see https://the-guild.dev/graphql/eslint/rules/lone-schema-definition
*/
"@graphql-eslint/lone-schema-definition": "error",

/**
* Require names to follow specified conventions.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/naming-convention.md
* @see https://the-guild.dev/graphql/eslint/rules/naming-convention
*/
"@graphql-eslint/naming-convention": [
"error",
Expand Down Expand Up @@ -79,37 +79,37 @@ module.exports = {

/**
* Requires to use """ or " for adding a GraphQL description instead of #. Allows to use hashtag for comments, as long as it's not attached to an AST definition.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-hashtag-description.md
* @see https://the-guild.dev/graphql/eslint/rules/no-hashtag-description
*/
"@graphql-eslint/no-hashtag-description": "error",

/**
* Enforces users to avoid using the type name in a field name while defining your schema.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-typename-prefix.md
* @see https://the-guild.dev/graphql/eslint/rules/no-typename-prefix
*/
"@graphql-eslint/no-typename-prefix": "error",

/**
* Requires all types to be reachable at some level by root level fields.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/no-unreachable-types.md
* @see https://the-guild.dev/graphql/eslint/rules/no-unreachable-types
*/
"@graphql-eslint/no-unreachable-types": "error",

/**
* A field or directive is only valid if all required (non-null without a default value) field arguments have been provided.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/provided-required-arguments.md
* @see https://the-guild.dev/graphql/eslint/rules/provided-required-arguments
*/
"@graphql-eslint/provided-required-arguments": "error",

/**
* Require all deprecation directives to specify a reason.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/require-deprecation-reason.md
* @see https://the-guild.dev/graphql/eslint/rules/require-deprecation-reason
*/
"@graphql-eslint/require-deprecation-reason": "error",

/**
* Enforce descriptions in type definitions and operations.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/require-description.md
* @see https://the-guild.dev/graphql/eslint/rules/require-description
*/
"@graphql-eslint/require-description": [
"warn",
Expand All @@ -125,7 +125,7 @@ module.exports = {
* Requires output types to have one unique identifier unless they do not have a logical one.
* Exceptions can be used to ignore output types that do not have unique identifiers.
* DISABLED - reports false-positives in modularized schemas
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/strict-id-in-types.md
* @see https://the-guild.dev/graphql/eslint/rules/strict-id-in-types
*/
"@graphql-eslint/strict-id-in-types": [
"off",
Expand All @@ -141,31 +141,31 @@ module.exports = {

/**
* A GraphQL document is only valid if all defined directives have unique names.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-directive-names.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-directive-names
*/
"@graphql-eslint/unique-directive-names": "error",

/**
* A GraphQL document is only valid if all non-repeatable directives at a given location are uniquely named.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-directive-names-per-location.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-directive-names-per-location
*/
"@graphql-eslint/unique-directive-names-per-location": "error",

/**
* A GraphQL complex type is only valid if all its fields are uniquely named.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-field-definition-names.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-field-definition-names
*/
"@graphql-eslint/unique-field-definition-names": "error",

/**
* A GraphQL document is only valid if it has only one type per operation.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-operation-types.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-operation-types
*/
"@graphql-eslint/unique-operation-types": "error",

/**
* A GraphQL document is only valid if all defined types have unique names.
* @see https://github.com/B2o5T/graphql-eslint/blob/master/docs/rules/unique-type-names.md
* @see https://the-guild.dev/graphql/eslint/rules/unique-type-names
*/
"@graphql-eslint/unique-type-names": "error",
},
Expand Down
Loading

0 comments on commit 43d9101

Please sign in to comment.