question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ES2016 arrow support

See original GitHub issue

Arrows are not supported:

JSDOC_ERROR: ERROR: Unable to parse index.js: Line 67: Unexpected token =>

Steps to reproduce (according to https://github.com/jsdoc2md/jsdoc-to-markdown/wiki/How-to-document-ES2016-features-like-async-&-await):

npm i -g jsdoc-to-markdown@^2.0.0-alpha
npm i jsdoc-babel babel-preset-es2015 babel-plugin-transform-async-to-generator

echo "{  
  "plugins": ["node_modules/jsdoc-babel"],
  "babel": {
    "presets": [ "es2015" ],
    "plugins": [ "transform-async-to-generator" ]
  }
}" > .jsdoc

jsdoc2md --configure .jsdoc src/index.js // echoes nothing, even though 'index.js' is full of es7 code

jsdoc2md --config .jsdoc src/index.js 
{
  "files": [
    ".jsdoc",
    "src/index.js"
  ]
}

What am I doing wrong here?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
75lbcommented, Sep 20, 2016

Hi, i’ve tested this and everything works fine. The reason you are not getting any output is because there are no documented modules or globals in your code. Read this.

1reaction
75lbcommented, Sep 19, 2016

sorry, i only just saw the edit you made to your comment above - i am testing on the code you linked to now - thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arrow function expressions - JavaScript - MDN Web Docs
An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate ...
Read more >
Arrow Functions in JavaScript: Fat & Concise Syntax - SitePoint
Learn how to use JavaScript arrow functions, understand fat and concise arrow syntax, and what to be aware of when using them in...
Read more >
babel/plugin-transform-arrow-functions
Add names to arrow functions. You can read more about configuring plugin options here · ← exponentiation-operatorNext →. Example; Installation; Usage.
Read more >
Node.js ES2015/ES6, ES2016 and ES2017 support
Yes. Yes Yes. Yes Error. Error Error. Error Error. Error Error. Error function() function() function() function() function() function() function() function() function() function() function() function() function() function()...
Read more >
ECMAScript 6 arrow function that returns an object
You must wrap the returning object literal into parentheses. Otherwise curly braces will be considered to denote the function's body. The following works:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found