Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OperationsMustHaveNames lint rule #47

Merged
merged 3 commits into from
Mar 14, 2017
Merged

Add OperationsMustHaveNames lint rule #47

merged 3 commits into from
Mar 14, 2017

Conversation

gauravmk
Copy link
Contributor

@gauravmk gauravmk commented Mar 11, 2017

Adds a lint rule that enforces all operations are named. See #42 and https://apollographql.slack.com/archives/eslint-plugin-graphql/p1488999103000014.

This adds it as a separate rule: graphql/named-operations so that it's easier for folks to configure it on or off / warn vs error. Did a little restructuring to be more DRY

TODO:

  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests pass
  • Update CHANGELOG.md with your change
  • If this was a change that affects the external API, update the README

@apollo-cla
Copy link

@gauravmk: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/

@jnwng jnwng self-requested a review March 14, 2017 16:45
@jnwng
Copy link
Contributor

jnwng commented Mar 14, 2017

this is a great contribution @gauravmk, thank you so much — i really appreciate that you took the time to make it extensible for additional validators in the future.

@jnwng jnwng merged commit 45549a8 into apollographql:master Mar 14, 2017
@jnwng
Copy link
Contributor

jnwng commented Mar 14, 2017

@gauravmk do you mind amending the README to capture how to invoke this rule (and perhaps an example of what it lints against?)

if you're unable to do this, i can take a quick stab at this tomorrow.

@gauravmk gauravmk deleted the operations-named branch March 14, 2017 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants