Rules
Description Style

description-style

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

💡 This rule provides suggestions

  • Category: Schema
  • Rule name: @graphql-eslint/description-style
  • Requires GraphQL Schema: false ℹ️
  • Requires GraphQL Operations: false ℹ️

Require all comments to follow the same style (either block or inline).

Usage Examples

Incorrect

# eslint @graphql-eslint/description-style: ['error', { style: 'inline' }]
 
""" Description """
type someTypeName {
  # ...
}

Correct

# eslint @graphql-eslint/description-style: ['error', { style: 'inline' }]
 
" Description "
type someTypeName {
  # ...
}

Config Schema

The schema defines the following properties:

style (enum)

This element must be one of the following enum values:

  • block
  • inline

Default: "block"

Resources