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

Request for feedback: Add eslint-plugin-graphql to example #1088

Closed
wants to merge 1 commit into from
Closed

Request for feedback: Add eslint-plugin-graphql to example #1088

wants to merge 1 commit into from

Conversation

stubailo
Copy link

I don't know if you would want to merge this or not, but I'm working on an ESLint plugin for GraphQL validation.

screenshot 2016-04-25 23 26 25

The benefit over the babel relay plugin is that you can see and fix the errors right in your editor, and there's even a nice underline!

Here's the repo for the linter plugin: https://github.com/apollostack/eslint-plugin-graphql

It's not perfect yet, but I'm curious what you think of this direction, and what improvements you would want to see in such a tool!

@stubailo stubailo changed the title Add eslint-plugin-graphql to example Request for feedback: Add eslint-plugin-graphql to example Apr 26, 2016
@ghost
Copy link

ghost commented Apr 26, 2016

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

@ghost
Copy link

ghost commented Apr 26, 2016

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@ghost ghost added the CLA Signed label Apr 26, 2016
@wincent
Copy link
Contributor

wincent commented Apr 26, 2016

This is sweet.

CC @yuzhi, who's been thinking about validation lately (eg. graphql/graphql-js#355).

@stubailo
Copy link
Author

Oh that's a great improvement, will make the error messages much more helpful!

@dguillamot
Copy link

@stubailo This looks awesome. Are you thinking of adding a warning for fragment data that is requested but not used? Similar to 'no-unused-vars' ? http://eslint.org/docs/rules/no-unused-vars

@stubailo
Copy link
Author

@dguillamot right now that's disabled, because in Relay/Lokka you often compose fragments, so you have strings like fragment on Post {...} which by themselves would trigger that error.

Do you have an app where that would be useful?

Just filed an issue, let's discuss there: apollographql/eslint-plugin-graphql#10

@wincent
Copy link
Contributor

wincent commented Jun 24, 2016

Closing this as the examples have moved into a separate relay-examples repo now (not public as of the time I write this, but will be hopefully within a day or two; we just need to get the person with the right privileges to flip a switch) so this PR won't apply here.

I don't know if you're still working on that plugin @stubailo, but I'd be welcome to adding it to the example over in the new repo.

@wincent wincent closed this Jun 24, 2016
@stubailo
Copy link
Author

Yeah the plugin pretty much just works! So I'll resubmit to the new repo.

@wincent
Copy link
Contributor

wincent commented Jun 24, 2016

Cool. I'll ping you when it's public.

@wincent
Copy link
Contributor

wincent commented Jul 5, 2016

@stubailo and it's public... https://github.com/relayjs/relay-examples

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants