Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Robert Chang
    @cht8687
    Oh, Hello World!
    Steve Mao
    @stevemao
    Hello guys :)
    Dan Couper
    @DanCouper
    Heh, I joined this room after PRing some stuff, first sign of life. Your You-Dont-Know-Lodash-Underscore is a good idea, just loking through it now
    Robert Chang
    @cht8687
    @DanCouper thank you for your PR... :smile:
    Ady Ngom
    @adyngom
    Hello all would like to contribute but do not see any guidelines on it
    should I just fork and do a PR??
    Dan Couper
    @DanCouper
    whoah, a year later life emerges
    Ady Ngom
    @adyngom
    haha indeed :)
    i wanted to start a similar repo and I ran into this one
    I was like oh well
    might as well contribute
    Dan Couper
    @DanCouper
    I guess that's the easiest way; you could raise an issue first or just PR away ¯_(ツ)_/¯ I just PR-ed some stuff in ages ago
    Should be a fair amount that could be added
    Ady Ngom
    @adyngom
    ok will do
    Ady Ngom
    @adyngom
    hmm not so straightforward how and where to add my code
    Dan Couper
    @DanCouper
    what are you trying to add?
    Dan Couper
    @DanCouper

    if you're not modifying the ESLint plugin, there's only the README, that's the only important file.

    If you get to modifying the plugin, then add to the JSON file at lib/rules/rules.json: you just literally add an entry that corresponds to a lodash method, then fill in the property alternative; the plugin literally just warns that you could possibly just use that native method

    There isn't really any code
    there's just a list of stuff in the README and a list of stuff in the JSON file
    Ady Ngom
    @adyngom
    ah ok
    let me take a closer look
    Ady Ngom
    @adyngom

    @DanCouper so i have added this entry to lib/rules/rules.json

    "uniq": {
            "compatible": true, // not sure
            "alternative": "[... new Set(arr)]",
            "ES6": true
        }

    First is this the correct place? Second I'm not sure what "compatible" key means or refers to.

    Ady Ngom
    @adyngom
    @DanCouper I just added a pull request for what it's worth - it seems like there is not much more activity on this repo
    Karolis Grinkevičius
    @karolisgrinkevicius
    Hi. I'd like to suggest to add some new rules for array methods.
    "first": {
            "compatible": true,
            "alternative": "[0]"
        },
        "last": {
            "compatible": true,
            "alternative": "array[array.length - 1]"
        },
        "isArray": {
            "compatible": true,
            "alternative": "Array.prototype.isArray()",
            "ES6": true
        }
    Mihir Sanghavi
    @mihir478
    Hello, Can someone explain this to me? var grouped = ['one', 'two', 'three'].reduce((r, v, i, a, k = v.length) => ((r[k] || (r[k] = [])).push(v), r), {})
    I don't understand the last ,r being passed in
    where does it go?
    @stevemao
    Mihir Sanghavi
    @mihir478
    without it, it treats it as a number