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

False positive in require-mock-type-parameters rule #654

Closed
FloEdelmann opened this issue Feb 10, 2025 · 2 comments · Fixed by #661
Closed

False positive in require-mock-type-parameters rule #654

FloEdelmann opened this issue Feb 10, 2025 · 2 comments · Fixed by #661

Comments

@FloEdelmann
Copy link
Contributor

See https://github.com/FloEdelmann/vue-ts-types/pull/802/files#diff-b762127509fe80fbe15d39c56430d58dcdc3b2a8b267a4815e0ee4683698ccd7:

This is wrongly reported by the new vitest/require-mock-type-parameters rule:

const validator3 = vi
  .fn<() => string | undefined>()
  .mockReturnValue('some error message');

These are both not reported:

const validator3 = vi
  .fn<() => string | undefined>(() => 'some error message');
const validator3 = vi
  .fn<() => string | undefined>();
@marekdedic
Copy link
Contributor

Hmm, strange, let me take a look...

@marekdedic
Copy link
Contributor

Thanks, I created a PR with a fix!

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

Successfully merging a pull request may close this issue.

2 participants