Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ES6 support #29

Open
1 of 2 tasks
jfirebaugh opened this issue Mar 18, 2015 · 4 comments
Open
1 of 2 tasks

ES6 support #29

jfirebaugh opened this issue Mar 18, 2015 · 4 comments

Comments

@jfirebaugh
Copy link
Member

Currently blocked by lack of parser support: http://esprima.org/doc/es6.html

Running list of things to support:

  • Switch to espree

  • JSDocs in destructuring assignment:

    { /** docs */ a, /** docs */ b } = { ... }
    
@tmcw
Copy link
Member

tmcw commented Mar 23, 2015

Looks like espree does this better and doesn't break from the AST tradition like babel does

@mourner
Copy link
Contributor

mourner commented Mar 23, 2015

@tmcw
Copy link
Member

tmcw commented Apr 15, 2017

This will be actionable once #732 is merged, and I'll write a thorough summary for help wanted.

@tmcw tmcw self-assigned this Apr 15, 2017
@tmcw
Copy link
Member

tmcw commented Apr 25, 2017

I first dove in on trying to solve

function a(b /** this would have docs in it */) {}

But this is unfortunately tricky. We prefer to parse comments as leadingComments first, and that comment is a leading comment for the function body as well as a trailing comment for the param a.

Destructuring patterns don't have this problem. Looking into them.

tmcw added a commit that referenced this issue Apr 25, 2017
This allows users to add comments within destructuring patterns, ObjectPattern and ArrayPattern,
that add documentation for specific parameters.

Fixes #29
@tmcw tmcw removed their assignment Nov 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants