eslint-plugin-fp-ts icon indicating copy to clipboard operation
eslint-plugin-fp-ts copied to clipboard

Suggested additional rules

Open jleider opened this issue 4 years ago • 0 comments

First, thanks for putting together this plugin, I already found a few places in our codebase that were simplified by the usage of this so kudos!

I have some suggestions that could make this even better. These are some common patterns I've seen as a result of refactors or just not paying enough attention:

  • Replace map + getOrElse with fold
  • Replace chain + lifting return val with map
    • e.g. O.chain(x => O.some(f(x))) ==> O.map(x => f(x))

Additionally, IntelliJ has quite a number of "inspections" for Scala that could be used as inspiration and ported over to this linter.

jleider avatar Feb 01 '21 16:02 jleider