Skip to content
New issue

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

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

Already on GitHub? # to your account

Upgrading to v6.0.2 triggers an error for "@typescript-eslint/no-floating-promises" #916

Open
Goodwine opened this issue Oct 31, 2024 · 0 comments · May be fixed by #917
Open

Upgrading to v6.0.2 triggers an error for "@typescript-eslint/no-floating-promises" #916

Goodwine opened this issue Oct 31, 2024 · 0 comments · May be fixed by #917

Comments

@Goodwine
Copy link

Goodwine commented Oct 31, 2024

I'm upgrading gts from 5.3.1 to 6.0.2 for some Sass repositories, and I'm seeing this error:

TypeError: services.getTypeAtLocation is not a function
Occurred while linting /app/source/_data/releases.ts:34
Rule: "@typescript-eslint/no-floating-promises"
    at isKnownSafePromiseReturn (/app/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js:188:35)
    at ExpressionStatement (/app/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js:113:21)
    at ruleErrorHandler (/app/node_modules/eslint/lib/linter/linter.js:1076:28)
    at /app/node_modules/eslint/lib/linter/safe-emitter.js:45:58

Looking around, it seems like it's already fixed in @typescript-eslint/parser v6.2.0 according to this issue that showed the same problem: vercel/next.js#52890

It seems gts depends on the problematic version, and I wonder if maybe this can be fixed by upgrading the same package. See - https://github.com/vercel/next.js/pull/52848/files

Running npm ls:

sass-site@2.0.0 /app
├─┬ @typescript-eslint/eslint-plugin@8.11.0
│ └── @typescript-eslint/parser@8.0.1
└─┬ gts@6.0.2
  ├─┬ @typescript-eslint/eslint-plugin@5.62.0
  │ └── @typescript-eslint/parser@5.62.0 deduped
  └── @typescript-eslint/parser@5.62.0
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant