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

atom-beautify and js-beautify outputs differ #140

Closed
mansona opened this issue Nov 14, 2014 · 4 comments
Closed

atom-beautify and js-beautify outputs differ #140

mansona opened this issue Nov 14, 2014 · 4 comments
Assignees
Labels

Comments

@mansona
Copy link

mansona commented Nov 14, 2014

I'm trying to add a check to our CI to make sure any changed files are "beautiful" before they can pass the build but i'm noticing that atom-beautify has a subtly different output to js-beautify

atom beautify:

function _getChat(name) {
    Chat.findOne({
        "name": name,
        type: "add"
    }).exec()
        .then(function(chatRequest) {
            //do things
        });
}

js-beautify:

function _getChat(name) {
    Chat.findOne({
            "name": name,
            type: "add"
        }).exec()
        .then(function(chatRequest) {
            //do things
        });
}

I know it's subtle but essentially the following 3 lines have an extra 4 indent characters (spaces) in the js-beautify version:

            "name": name,
            type: "add"
        }).exec()

I can't find a setting that seems to suggest it could affect this, any guidance would be much appreciated.

@Glavin001
Copy link
Owner

The js beautify dependency version maybe be out of date on atom beautify. Will have to take a look into that later. Thanks for creating this issue!

@Glavin001 Glavin001 self-assigned this Nov 14, 2014
@Glavin001
Copy link
Owner

Updating js-beautify from 1.5.1 to 1.5.4 resolved this issue. Thanks for noticing it and reporting this issue!

@Glavin001
Copy link
Owner

Published to v0.16.0

@Glavin001 Glavin001 added the bug label Nov 16, 2014
@mansona
Copy link
Author

mansona commented Nov 16, 2014

awesome thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants