nikhilkalige / docblockr

DocBlockr is a package for Atom which is designed to make writing documentation faster and easier.
MIT License
406 stars 93 forks source link

JavaScript ES6 support #141

Open khizarnaeem opened 8 years ago

khizarnaeem commented 8 years ago

Any plans for JS ES6 support?

tofagerl commented 8 years ago

Specifically support for class methods would be appreciated.

Koleok commented 8 years ago

+1

PEM-- commented 8 years ago

+1

jcbvm commented 8 years ago

+1

wassname commented 8 years ago

References:

Koleok commented 8 years ago

@wassname thanks for those sir, will be helpful in the meantime

Kamilius commented 8 years ago

+1 for ES6 support

diegochavez commented 7 years ago

How we can implement a solution for this?

simonwidjaja commented 7 years ago

+1

MoritzKn commented 7 years ago

FYI: Version 0.8.0 adds support for ES2015 arrow functions

Luchanso commented 7 years ago

+1

MoritzKn commented 7 years ago

I took all ES2015 features that affect docblockr from this ES2015 feature list:

WalterWeidner commented 7 years ago

+1 really annoying not getting ES6 class method blocks.

jwickens commented 7 years ago

+1

frederickk commented 7 years ago

+1

canastro commented 7 years ago

+1

brentstrandy commented 7 years ago

+1

tykoth commented 7 years ago

+1 Hello. I copied the pattern from java and included in the file /lib/languages/javascript.js This could be useful:


    var classMethodRegex = xregexp(
        // Method name
        '(?P<name1>' + this.settings.fnIdentifier + ')\\s*' +
        // Params
        '\\((?P<args>.*?)\\)\\s*' +
        // # Throws ,
        '(?:throws\\s*(?P<throwed>[a-zA-Z_$0-9\\.,\\s]*))?'
        );

Then


    var matches = functionMatches || arrowFunctionMatches || classMethodMatches;

And voila. But i'm sure there is a better way to achieve this. class-method-regexp

prometheas commented 7 years ago

+1 😄

Gaffen commented 7 years ago

+1

MoritzKn commented 7 years ago

Since most of the people commenting here seem to be most interested in support for shorthand method definitions: version v0.9.2 now supports this (again).

abdennour commented 6 years ago

Just upgrade it .. It will work like a charm . My current version is 0.11.0 .