multi-line var asignment indentation#53
Conversation
|
Hey, I tried this out today and it seems to work fairly well. I found one problem when I tried it out on the source of d3.js: var d3_array = d3_arraySlice; // conversion for NodeListsThis line ends with a semicolon but it also has a comment and it doesn't indent the next line correctly. Could you update your script to fix that? Thanks, Darrick |
|
I think something like this really needs to be added. I'm sure I'm not the only one for who this package's javascript indent is completely useless due to the lack of supporting multi-variable-var statements. They are incredibly common especially in node applications. |
|
+1 |
|
This is super helpful except limitation 2 is kind of a dealbreaker. |
|
Usefull, thanks. |
|
Thanks for the pull request @utyf and sorry it took so long to merge in. I fixed some edge cases and added support for comma-first style as well. Check the commit for more info. |
Add complete list of JSDoc tags and synonyms
I made this changes some time ago for standard indenter and now merged them with this project.
It has some limitations:
- you need to use semicolons (it's quite common requirement)
- you need not to use multi-line variables (like objects, arrays or functions) in this variables' declaration (it's not common, but more readable)
Maybe, it contains some bugs, but I didn't meet them yet.