Atom-beautify: Unnecessary chain method indentation

Created on 4 Mar 2016  路  8Comments  路  Source: Glavin001/atom-beautify

Description

The results of beautification are not what I expect.

Expected Results

expected:
OUTPUT

Steps to Reproduce

input:

new sql.Request().query(query.query).then((docs) => {
    res.json({
                result: true
        });
}).catch((e) => {
    e.status = e.status || 500;
    Log(e.stack || e);
    res.status(e.status).end();
});

Beautify

output:
OUTPUT

Debug

debug.md

third-party-bug update-dependency

Most helpful comment

@pietrovismara - Done.

All 8 comments

It appears the output and expected output are identical aside from the extra indentation. This would require a new option from both Pretty Diff and JS Beautify to customize this behavior differently from the default.

I recommend opening new issues with each of those projects:

Closing this as third-party issue of Pretty Diff and/or JS-Beautify. Please let me know if a new option is needed in Atom-Beautify to support this.

@Glavin001 After a long time, the enhancement has been implemented and merged by js-beautify (https://github.com/beautify-web/js-beautify/pull/1240). Any step that should be taken in order to have the latest js-beautify version in atom-beautify?

@pietrovismara - The change is not released yet. It will be in 1.7.0.

@bitwiseman I gave a look at 1.7.0 milestone.

Does this mean that it will take several months at least before having it released??

@pietrovismara Coming this weekend.

@pietrovismara - Done.

@bitwiseman. Thank you so much. Guess it's only a matter of time til i get the update in Atom.

Was this page helpful?
0 / 5 - 0 ratings