avajs / eslint-plugin-ava

ESLint rules for AVA
https://avajs.dev
MIT License
230 stars 49 forks source link

Add `prefer-t-throws` rule #345

Open Mesteery opened 2 years ago

Mesteery commented 2 years ago

Fixes: https://github.com/avajs/eslint-plugin-ava/issues/156


IssueHunt Summary ### Referenced issues This pull request has been submitted to: - [#156: Rule proposal: `prefer-t-throws`](https://issuehunt.io/repos/49722492/issues/156) ---
sindresorhus commented 2 years ago

AVA now has t.throws and t.throwsAsync. See the AVA docs.

Mesteery commented 2 years ago

AVA now has t.throws and t.throwsAsync. See the AVA docs.

So should the rule be t-throws-async instead or should I add another rule?

sindresorhus commented 2 years ago

The name should be the what it is, but you need to also support the async method.