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

@graphql-eslint/alphabetize autofix need execute 3 ~ 4 time to get fix #955

Closed
neviaumi opened this issue Feb 11, 2022 · 2 comments
Closed
Labels
kind/enhancement New feature or request

Comments

@neviaumi
Copy link

Describe the bug
@graphql-eslint/alphabetize autofix on my production schema cannot get fix by execute once.

To Reproduce
Steps to reproduce the behavior:
Not sure? Just find some big enough scham and enable @graphql-eslint/alphabetize

Expected behavior
Sort the schema

Environment:

  • OS: mac
  • @graphql-eslint/...:
  • NodeJS:

Additional context

Keep get error similar to 1496:3 error "addComment" should be before "approveApplication" @graphql-eslint/alphabetize

But if i execute again, i can the error is decreasing .

@dimaMachina
Copy link
Owner

Hi @davidNHK, I think even similar rule from eslint sort-keys has similar behavior, if you have an idea how this can be fixed feel free to share

@dimaMachina dimaMachina added the kind/enhancement New feature or request label Feb 11, 2022
@dimaMachina
Copy link
Owner

I will close this issue because this cannot be improved by graphql-eslint. ESLint does not allow more than 10 autofix passes for a rule.
https://github.com/eslint/eslint/blob/b93af98b3c417225a027cabc964c38e779adb945/lib/linter/linter.js#L44

Feel free to open related issue in eslint repo if you want to make this constant configurable or use patch-package to change this value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants