millermedeiros / esformatter

ECMAScript code beautifier/formatter
MIT License
970 stars 91 forks source link

Missing MethodDefinition braces #454

Closed vlork closed 8 years ago

vlork commented 8 years ago

So that:

.esformatter

"linebreak": {
    "after": {
        "MethodDefinitionClosingBrace": 4
    }
}

source:

/**
 * This is my class
 */
class Something {
    /**
     * This is my first method
     */
    first() {
        // (...)
    }
    /**
     * This is my second method
     */
    second() {
        // (...)
    }
    // (...)
}

result:

/**
 * This is my class
 */
class Something {
    /**
     * This is my first method
     */
    first() {
        // (...)
    }

    /**
     * This is my second method
     */
    second() {
        // (...)
    }

    // (...)
}
millermedeiros commented 8 years ago

just implemented this on https://github.com/millermedeiros/esformatter/commit/23c15ad2db479bc57eca546b49a3215f4834e631

please keep the bug reports and feature requests coming!