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

Would you consider adding lint for deprecated #136

Open
eMerzh opened this issue Jan 27, 2023 · 5 comments
Open

Would you consider adding lint for deprecated #136

eMerzh opened this issue Jan 27, 2023 · 5 comments

Comments

@eMerzh
Copy link

eMerzh commented Jan 27, 2023

Hello, i'm trying to add a linter for deprecrated fields on my project,

our schema is quite large, and i struggle to find a linter that could do it well...
i was wondering if you would consider adding one in the project?

i might try my hand at it

@dotansimha
Copy link

dotansimha commented Apr 23, 2023

We do have some rules around deprecations in graphql-eslint - some are from the build-in validations of GraphQL, and some are added by us. You can find it here:

It might be useful for you to integrate it, as an additional linting layer.

@eMerzh
Copy link
Author

eMerzh commented Apr 23, 2023

thanks @dotansimha ...
i know those rules indeed,
i was thinking about the client/operation lint like this one https://the-guild.dev/graphql/eslint/rules/no-deprecated

couple reasons why i would hope relayjs-eslint would add this

  • an extra dep if like me, you already have this running
  • i was hoping this project could take advantage of the rust relay-compiler somehow
  • I have issues with the-guild eslint, i can't really set it up 😬 but that's probably me...

@dotansimha
Copy link

  • I have issues with the-guild eslint, i can't really set it up 😬 but that's probably me...

feel free to create an issue, we would love to help ;)

  • an extra dep if like me, you already have this running

Agree. But I think this might be out of scope for the Relay compiler? as this is a lint issue? 🤔

  • i was hoping this project could take advantage of the rust relay-compiler somehow

Actually, that might be interesting. If relay-compiler (rust) version has some built-in rules, we can use that and integrate it directly into the IDE using the ESLint extension. @B2o5T what do you think?

@eMerzh
Copy link
Author

eMerzh commented Apr 23, 2023

@dotansimha what got me thinking it could [one-day] be possible, is these kinds of changes released in latest relay

facebook/relay@50266e1

@dimaMachina
Copy link

If relay-compiler (rust) version has some built-in rules, we can use that and integrate it directly into the IDE using the ESLint extension.

@dotansimha Yes, we can do it as we already do with graphql-js rules

I have issues with the-guild eslint, i can't really set it up 😬 but that's probably me...

@eMerzh there is nothing wrong with graphql-eslint, take a look at working examples

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

No branches or pull requests

3 participants