eslint-plugin-ava
eslint-plugin-ava copied to clipboard
Allow different patterns for the `t.try()` callback argument
https://github.com/avajs/ava/pull/1947 landed a new t.try() assertion. It's experimental, one of the reasons for which is that it advocates some new usages of AVA that this plugin rejects.
t.try() takes a callback, which receives another execution object:
const attempt = await t.try(t => {
t.pass()
})
attempt.commit()
Not all linting setups allow you to shadow variables like this. I'm proposing we also allow tt, and t1 through t9. Thoughts?
I would also allow t_. I usually postfix with underscore for shadowed variables with the same name.
Yes. Looks like you're agreed with the other patterns so then we need to add support for all of these.