Closed mshwery closed 4 years ago
Wow! 😍 I can't believe this is actually happening. I'll take a closer look at the changes tonight/tomorrow, but I just wanted to say thanks @mshwery for opening this. I really appreciate the help.
I just took a look at this PR and tried it locally and it just works. 😁 Thanks again!
I found a few minor issues, but not a deal breaker for this PR.
It's seemingly impossible to disable relay-page-info-spec
when PageInfo
isn't defined.
If someone accidentally forgets to specify a list of rules following lint-disable
, the linter will crash with an unhelpful message. We could probably make that a little better.
We might want to validate that the rules passed to the inline configurations actually exist. Seems like this save someone time if they ever have a typo in their # lint-disable ...
comment.
This PR introduces the ability to disable and re-enable blocks in schema files using GraphQL comment syntax, as well as disabling rules for a single line.
Syntax is as follows:
These linter comments are file-specific, so if you have a multi-file schema they will only apply to the file where they are included.
Closes #18