cjoudrey/graphql-schema-linter

Add basic validation for inline configuration inputs

オープン

#238 opened on 2020/07/04

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (61 件のフォーク)batch import
bugenhancementhelp wanted

Repository metrics

Stars
 (704 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

When specifying an invalid rule in an inline configuration, graphql-schema-linter should let the user know.

For example, this should raise an error:

# lint-disable some-invalid-rule

type Query {
  field: String
}

Perhaps the process could terminate with an error like:

The inline configuration on line 1 of `filename.graphql` references a non-existing rule: some-invalid-rule

Similarly, we should gracefully handle when an inline configuration is specified without any rules.

This currently crashes:

# lint-disable

type Query {
  field: String
}

We could either (1) make it raise an error like above or (2) support this as a feature and make it disable all rules.

/cc @mshwery in case you're bored 😄

コントリビューターガイド