no-hashtag-description
â
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/no-hashtag-description
- Requires GraphQL Schema:
false
âšī¸ - Requires GraphQL Operations:
false
âšī¸
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.
Usage Examples
Incorrect
# eslint @graphql-eslint/no-hashtag-description: 'error'
# Represents a user
type User {
id: ID!
name: String
}
Correct
# eslint @graphql-eslint/no-hashtag-description: 'error'
" Represents a user "
type User {
id: ID!
name: String
}
Correct
# eslint @graphql-eslint/no-hashtag-description: 'error'
# This file defines the basic User type.
# This comment is valid because it's not attached specifically to an AST object.
" Represents a user "
type User {
id: ID! # This one is also valid, since it comes after the AST object
name: String
}