Code Monkey home page Code Monkey logo

Comments (7)

gajus avatar gajus commented on May 28, 2024

While it is related source line, this function should not have been called
in the first place (since the expected parameter type is function entity).

On Thu, Feb 4, 2016 at 2:36 PM, Mikołaj D. [email protected] wrote:

Related source line:
https://github.com/wix/eslint-plugin-lodash/blob/master/lib/util/astUtil.js#L114


Reply to this email directly or view it on GitHub
#23 (comment)
.

from eslint-plugin-lodash.

mik01aj avatar mik01aj commented on May 28, 2024

Yes, you're right, I realized this a minute later and deleted my comment ;)

from eslint-plugin-lodash.

ganimomer avatar ganimomer commented on May 28, 2024

Fixed in 1.0.4.

from eslint-plugin-lodash.

gajus avatar gajus commented on May 28, 2024

Now it is failing with:

/Users/gajus/Documents/dev/canonical-code-style/canonical/node_modules/eslint-plugin-lodash/lib/util/astUtil.js:114
    return func.type === 'ArrowFunctionExpression' ? !_.get(func, 'body.body') : _.get(func, 'body.body.length') === 1;
/**
 * Returns whether the node specified has only one statement
 * @param {Object} func
 * @returns {boolean}
 */
function hasOnlyOneStatement(func) {
    return func.type === 'ArrowFunctionExpression' ? !_.get(func, 'body.body') : _.get(func, 'body.body.length') === 1;
}

from eslint-plugin-lodash.

gajus avatar gajus commented on May 28, 2024

@ganimomer Can you make me a contributor? I am only interested in patching bugs such as this.

from eslint-plugin-lodash.

ganimomer avatar ganimomer commented on May 28, 2024

Hi,
I fixed the error again. I ran your code sample against all the rules and that's the only place that exploded. (It's also the only other place to call hasOnlyOneStatement).

As for your request, you can always submit a PR and we try to get to it ASAP.
We get notified of any new issues and PRs anyway, but it helps to mention @idok, @danyshaanan or me.

from eslint-plugin-lodash.

gajus avatar gajus commented on May 28, 2024

Thank you

On Feb 7, 2016, at 10:12, Omer Ganim [email protected] wrote:

Hi,
I fixed the error again. I ran your code sample against all the rules and that's the only place that exploded. (It's also the only other place to call hasOnlyOneStatement).

As for your request, you can always submit a PR and we try to get to it ASAP.
We get notified of any new issues and PRs anyway, but it helps to mention @idok, @danyshaanan or me.


Reply to this email directly or view it on GitHub.

from eslint-plugin-lodash.

Related Issues (20)

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.