eslint-plugin-fp-ts
eslint-plugin-fp-ts copied to clipboard
Prefer RNEA.from(Readonly)Array
Thanks for the plugin, learnt a couple of things already with it.
O.fromPredicate((array) => array.length > 0)
could be replaced with RNEA.fromArray
/RNEA.fromReadonlyArray
(found a few usages in https://github.com/sciety/sciety/commit/103fe14d019960d9cc7ebd863b022f199887c02e).
Maybe the rule should be 'prefer constructor' (combining with #61 and similar).
O.filter((array) => array.length > 0)
should be covered too.