Comments (4)
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.
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.
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.
from brackets-outline-list.
Related Issues (20)
- function does not appear in outline list if formal parameter list contains line break HOT 1
- Outline doesn't work with operator ... HOT 2
- function names are not displayed for syntax errors HOT 2
- extension Colors++ causing conflict? HOT 1
- [REQ] Remember scroll height when panel is on the right side HOT 10
- Outline for a .php document HOT 2
- Extension Error HOT 1
- plugin broke with last Brackets update HOT 2
- [Phcode.dev Bot] Publishing Release `v1.6.0` to Extension Store HOT 1
- Deconstructive assignment breaks parsing
- Not showing some classes and functions in Python.
- PHP: Multi-line strings can break function list HOT 2
- PHP Support HOT 1
- Toggling Outline HOT 18
- Toggle properties HOT 1
- Python functions with **kwargs argument are not listed in the outline HOT 1
- Python functions with float default arguments are not listed in the outline HOT 4
- No working in Vue File๏ผ HOT 3
- function with comment after the "def" does not appear in outline list HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brackets-outline-list.