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

Prefer RNEA.from(Readonly)Array

Open thewilkybarkid opened this issue 4 years ago • 2 comments

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).

thewilkybarkid avatar Feb 08 '21 13:02 thewilkybarkid

Maybe the rule should be 'prefer constructor' (combining with #61 and similar).

thewilkybarkid avatar Feb 08 '21 14:02 thewilkybarkid

O.filter((array) => array.length > 0) should be covered too.

thewilkybarkid avatar Feb 17 '21 10:02 thewilkybarkid