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

JS. Inline comment drives indentation wrong way. #1086

Closed
qwelias opened this issue Dec 28, 2016 · 1 comment
Closed

JS. Inline comment drives indentation wrong way. #1086

qwelias opened this issue Dec 28, 2016 · 1 comment

Comments

@qwelias
Copy link

qwelias commented Dec 28, 2016

Description

Inline comment drives indentation wrong way.

Input

const possibles = yield PrintOrder.find( {
    $and: [
        { parts: { $exists: true } },
        { status: { $ne: [ 'finished' ] } },
    ],
} )
// yay comment

Expected Output

const possibles = yield PrintOrder.find({
    $and: [{
            parts: {
                $exists: true
            }
        },
        {
            status: {
                $ne: ['finished']
            }
        },
    ],
})
// yay comment

Actual Output

const possibles = yield PrintOrder.find({
        $and: [{
                parts: {
                    $exists: true
                }
            },
            {
                status: {
                    $ne: ['finished']
                }
            },
        ],
    })
    // yay comment

Steps to Reproduce

Try it on jsbeautifier.org with default settings

@qwelias qwelias changed the title JS. Inline comment drivers indentation wrong way. JS. Inline comment drives indentation wrong way. Dec 28, 2016
@bitwiseman
Copy link
Member

See #964.

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

No branches or pull requests

2 participants