GithubHelp home page GithubHelp logo

References wrong about flast HOT 6 CLOSED

perimeterx avatar perimeterx commented on May 29, 2024
References wrong

from flast.

Comments (6)

BenBaryoPX avatar BenBaryoPX commented on May 29, 2024 1

As I wrote a couple of hours ago, I overhauled the scoping and covered this case.
I've also taken into account issue #10, and have already merged them into main.
I really appreciate the time and effort you've put into opening the issues and PRs.

Please reopen any issue if you find they still persist.

from flast.

BenBaryoPX avatar BenBaryoPX commented on May 29, 2024 1

Yes this is intentional. If an identifier has a declNode property it means it is a reference.
If it has a references property - it is an identifier declared in the script.
If it has neither - it is not defined in the script (like window or process).

from flast.

royvandijk06 avatar royvandijk06 commented on May 29, 2024

Btw, this projects is great! It provides a much more usable datastructure than eslint-scope does.

from flast.

BenBaryoPX avatar BenBaryoPX commented on May 29, 2024

Definitely a scope issue. Thanks for reporting!
Following this I'm overhauling the scoping to cover this and other edge cases I've encountered.
I'll also be improving the tests so they'll cover more cases.
I've seen your PR and be getting to it right after I'm done with this issue.
Thanks again for taking the time to open an issue and a PR 🙏🙂

from flast.

royvandijk06 avatar royvandijk06 commented on May 29, 2024

Looks like the issue from my example is resolved now, thank you!

I don't know if this is intended, but only the declNode has references, but none of the references have the property references. Actually, this is not a bad design.

from flast.

royvandijk06 avatar royvandijk06 commented on May 29, 2024

Yes this is intentional. If an identifier has a declNode property it means it is a reference. If it has a references property - it is an identifier declared in the script. If it has neither - it is not defined in the script (like window or process).

Btw, might be worth mentioning this in the docs.

from flast.

Related Issues (2)

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.