cjoudrey / graphql-schema-linter

Validate GraphQL schema definitions against a set of rules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lint-disable-line doesn't work when a field has a description

vikstrous2 opened this issue · comments

linter version: 2.0.1

$ graphql-schema-linter example.graphql
<redacted>/example.graphql
1:1 A `PageInfo` object type is required as per the Relay spec.  relay-page-info-spec
4:1 The object type `Query` is missing a description.            types-have-descriptions
5:3 The field `Query.A` is not camel cased.                      fields-are-camel-cased
5:3 The field `Query.A` is missing a description.                fields-have-descriptions
7:1 The enum type `A` is missing a description.                  types-have-descriptions
8:3 The enum value `A.Wrong` should be uppercase.                enum-values-all-caps

✖ 1 error detected
$ cat example.graphql
schema {
  query: Query
}
type Query {
  A: String
}
enum A {
  """
  description
  """
  Wrong # lint-disable-line enum-values-all-caps
}

I expected the last linter violation to be ignored.

commented

Encountered the same issue. Only workaround was to disable multiple lines like:

enum A {
  # lint-disable enum-values-all-caps
  """
  description
  """
  Wrong 
  # lint-disable enum-values-all-caps
}