🎉 Welcome to the new GraphQL-ESLint website. Try new playground page →
Rules
Description Style

description-style

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

💡 This rule provides suggestions (opens in a new tab)

  • 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