js-beautify
js-beautify copied to clipboard
Excess indentation on assignment destructuring.
Description
This is the default template for bug reports, if you have a more general issue, question, or request, you may ignore this template and write freeform.
NOTE:
- Do not include screenshots! This library is a text processor, we need text inputs and outputs for debugging and fixing issues.
- Check the list of open issues before filing a new issue.
Input
The code looked like this before beautification:
const {
shouldSave = true,
Controller,
updateLinks = true
} = options;
Expected Output
The code should have looked like this after beautification:
const {
shouldSave = true,
Controller,
updateLinks = true
} = options;
Actual Output
The code actually looked like this after beautification:
const {
shouldSave = true,
Controller,
updateLinks = true
} = options;
This is coming from https://github.com/Glavin001/atom-beautify/issues/1508#issuecomment-278302531 with the debug.md at https://gist.github.com/guiguan/7ad6ac4132c18f4f1ee3c6f1138abf38
@prettydiff - Pointer to the syntax reference for this?
I am thinking it is this - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment
For the best example search the page for metadata
The fix will require adding a new "MODE", so this is basically blocked waiting on the javascript parsing project.