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

Wrong lint results when running lint after moving fragment declaration to another file #2520

Open
4 tasks
lwasyl opened this issue Aug 23, 2024 · 1 comment
Open
4 tasks

Comments

@lwasyl
Copy link

lwasyl commented Aug 23, 2024

Issue looks very similar to #1232. I"m running eslint.lintFiles("Queries") repeatedly on a changing set of graphql files. It seems that when a fragment is moved from one file to another between runs, the subsequent runs fail e.g. unknown fragment check.

It looks like the following line keeps a global cache which affects subsequent runs: https://github.com/dimaMachina/graphql-eslint/blob/master/packages/plugin/src/siblings.ts#L29

Is there any way to reset that cache?

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    For example, you can start off by editng the
    'basic' example on Stackblitz.

    Please make sure the graphql-eslint version under package.json matches yours.

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

To Reproduce Steps to reproduce the behavior:

Expected behavior

Environment:

  • OS:
  • @graphql-eslint/eslint-plugin:
  • Node.js:

Additional context

@jaydenseric
Copy link

Might be related to #2511 ?

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

2 participants