Closed GMartigny closed 4 years ago
Sounds good. I don't think we need to make it customizable though. PR welcome.
If not customizable, we need to define a list of replacements that the plugin will care for.
Updated list here for convenience:
/deepequal/i
=> deepEqual/notdeepEqual/i
=> notDeepEqual/notthrows/i
=> notThrows/throwsasync/i
=> throwsAsync/notthrowsasync/i
=> notThrowsAsync/notregex/i
=> notRegexAny suggestion ?
Your list looks good. I can't think of anything else.
I've just add regexp => regex for no particular reasons 🙄
@issuehunt has funded $60.00 to this issue.
@sindresorhus this inspired me to check my basic skills and I wrote simplistic auto correction module. It is able to fix all the mentioned corrections and some more. Should I add it?
@sindresorhus has rewarded $54.00 to @stroncium. See it on IssueHunt
When https://github.com/avajs/eslint-plugin-ava/pull/229 is merged,
use-t-well
will be able to autofixfalsey
tofalsy
(a common misspell).This can be expanded further by creating a small list of common misspells that can be autofixed (
t.contxt
,t.truthey
,t.deepequal
...) I don't know what's the limit to the size of that list. It could even be allowed to customize it with an option.IssueHunt Summary
#### [ stroncium](https://issuehunt.io/u/stroncium) has been rewarded. ### Backers (Total: $60.00) - [ issuehunt](https://issuehunt.io/u/issuehunt) ($60.00) ### Submitted pull Requests - [#277 Assertion methods auto correction for use-t-well rule, makes most misspells fixable](https://issuehunt.io/r/avajs/eslint-plugin-ava/pull/277) --- ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/avajs/eslint-plugin-ava/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)