GithubHelp home page GithubHelp logo

eslint-plugin-ramda's People

Contributors

lo1tuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

eslint-plugin-ramda's Issues

Prefer R.both over R.allPass when allPass has only two predicates

R.allPass([ a, b ]) // could be written as R.both(a, b)

Note: those functions are not equivalent with ramda 0.18.0, but in current master (see ramda/ramda#1475).


Same applies for R.anyPass and R.either

R.anyPass([ a, b ]) // could be written as R.either(a,b);

Not sure if this should be in the same rule or if we want to have two separate rules.

Warn on use of deprecated functions

The ramda documentation mentions a few functions that are officially deprecated (e.g. isSet, mapObj).
This rule should warn whenever such a rule is used.

Prefer R.when/R.unless over R.ifElse

R.ifElse(R.is(Array), R.head, R.identity) // could be written as R.when(R.is(Array), R.head)
R.ifElse(R.isEmpty, R.identity, R.toLower) // could be written as R.unless(R.isEmpty, R.toLower)

Prefer R.ifElse over R.cond

R.cond([
    [ R.is(Array), R.head ],
    [ R.T, R.identity ]
]); // could be written as R.ifElse(R.is(Array), R.head, R.identity) 

Unnecessary compose* / pipe*

All functions for composition, such as compose, composeP, composeK and their pipe equivalents should report unnecessary usages with a single argument, e.g. const fn2 = compose(fn1);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.