Giter VIP home page Giter VIP logo

Comments (4)

Hirse avatar Hirse commented on August 18, 2024

This is very hard to diagnose or solve without the actual input.

Does this happen for all JS files or just one?

This extension is using Espree to parse the JavaScript code. The message you cite is shown when the file cannot be parsed. You can use https://astexplorer.net to test the parsing of your file, it might show some more detailed error information.

from brackets-outline-list.

ArielBookraft avatar ArielBookraft commented on August 18, 2024

Thanks for that link.
I ran the script through it, and it flagged 2 types of errors in the code: I was using the "with" keyword in several places, and also the "delete" keyword (to delete an element from an associative array -- is there any other way of doing it?) in local mode.
When I got rid of all lines containing "with" and "delete", the function list indeed appeared nicely in Brackets.
But neither of these are actually errors. Is there any way of allowing them through -- I think in both cases astexplorer mentioned that they were only flagged because it was in "strict" mode. Any chance of being more lenient?

Thanks, great extension, working nicely with the CSS...
Ariel

from brackets-outline-list.

Hirse avatar Hirse commented on August 18, 2024

According to MDN ...

using with is not recommended, and is forbidden in ECMAScript 5 strict mode.

In order to support parsing with, the parser's ES-version target has to be set to 3 which means newer features (=>, import, ...) would cause syntax errors. If you are targeting that version and don't use any of the ES5+ features, I would consider adding an option to the extension. Please test on AST explorer if that would actually fix the issue for you.

Regarding delete, removing properties from an object is fine, but removing a variable itself is not. See MDN reference.

from brackets-outline-list.

ArielBookraft avatar ArielBookraft commented on August 18, 2024

from brackets-outline-list.

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.