Skip to content

Comments

fix(no-alias-methods): Align no-alias-methods rule with Vitest by aliasing toThrow to toThrowError#832

Merged
veritem merged 2 commits intovitest-dev:mainfrom
y-hsgw:fix/no-alias-methods
Nov 29, 2025
Merged

fix(no-alias-methods): Align no-alias-methods rule with Vitest by aliasing toThrow to toThrowError#832
veritem merged 2 commits intovitest-dev:mainfrom
y-hsgw:fix/no-alias-methods

Conversation

@y-hsgw
Copy link
Contributor

@y-hsgw y-hsgw commented Nov 29, 2025

Vitest docs define toThrow as an alias of toThrowError, so the rule follows the official API.

Copy link
Member

@veritem veritem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@veritem veritem merged commit 4ea5673 into vitest-dev:main Nov 29, 2025
5 checks passed
@y-hsgw y-hsgw deleted the fix/no-alias-methods branch November 29, 2025 23:35
xDivisionByZerox added a commit to faker-js/faker that referenced this pull request Dec 26, 2025
This commit fixes the autofixable lint errors introduced through the vitest lint plugin update. This mostly reverts the changes introduced in #2098, where .toThrowError was replaced by .toThrow. Apprently, the plugin got it the wrong way around. For more information, look at the fixing PR in their plugin: vitest-dev/eslint-plugin-vitest#832
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 this pull request may close these issues.

2 participants