Git Product home page Git Product logo

eslevels's People

Contributors

elelay avatar mazurov avatar waffle-with-pears avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslevels's Issues

allow escope options to be passed through

I've moved some of my files to ES6, with "import" statements.
This is accepted by escope only with the options { ecmaVersion: 6, sourceType: 'module' } (see this comment).
Now eslevels doesn't pass options to escope line 314.
Adding the option solved my issue (confirmed by patching in eslevels.js in /usr/lib/node_modules)

Would you consider adding the option? Maybe an escope field in the eslevels options...
Thanks,
Eric

anonymous functions have one additional character included after the final }

See in the example screenshot, where there is an anonymous function assigned to a var. Note that the ; after the assignment is included with the function scope coloring. This ; should be the same color as the parent scope. I have also seen this when passing an anonymous function as an argument to another function... the char after it is included, which is a bit confusing. It seems there may be an 'off by one' error somewhere which is including the additional character.

This may be an esprima bug..

Level detection incorrect for named function expressions

function foo() {
	var y = 3;
	var w = function baz(){
		var p = 2;
	};
}

In that code, the identifier baz should be in the same scope as var p (aka, level 2), since identifiers of named function expressions are always in their own function's scope (and read-only), not in the containing scope.

However, I tried this on the demo page (http://mazurov.github.io/eslevels-demo/) and it's incorrectly identifying it in the outer scope (level 1), the same as var y.

screen shot 2017-11-29 at 8 44 31 am

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.