avajs / eslint-plugin-ava

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

Make `use-t-well` more auto-fixable #244

Closed GMartigny closed 4 years ago

GMartigny commented 5 years ago

Issuehunt badges

When https://github.com/avajs/eslint-plugin-ava/pull/229 is merged, use-t-well will be able to autofix falsey to falsy (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.


Note: This issue has a bounty, so it's expected that you are an experienced programmer and that you give it your best effort if you intend to tackle this. Don't forget, if applicable, to add tests, docs (double-check for typos). And don't be sloppy. Review your own diff multiple times and try to find ways to improve and simplify your code. Instead of asking too many questions, present solutions. The point of an issue bounty is to reduce my workload, not give me more. Include a 🦄 in your PR description to indicate that you've read this. Thanks for helping out 🙌 - @sindresorhus


IssueHunt Summary #### [stroncium stroncium](https://issuehunt.io/u/stroncium) has been rewarded. ### Backers (Total: $60.00) - [issuehunt 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)
sindresorhus commented 5 years ago

Sounds good. I don't think we need to make it customizable though. PR welcome.

GMartigny commented 5 years ago

If not customizable, we need to define a list of replacements that the plugin will care for.

Updated list here for convenience:

Any suggestion ?

sindresorhus commented 5 years ago

Your list looks good. I can't think of anything else.

GMartigny commented 5 years ago

I've just add regexp => regex for no particular reasons 🙄

issuehunt-oss[bot] commented 5 years ago

@issuehunt has funded $60.00 to this issue.


stroncium commented 5 years ago

@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?

issuehunt-oss[bot] commented 4 years ago

@sindresorhus has rewarded $54.00 to @stroncium. See it on IssueHunt