JsFormat rule for newline in es6 import

JsFormat for Sublime Text 3 complies with most ES6 standards, however, when automatically formatting import statements, it adds a new line to the import of objects. Here's what a formatted string looks like:

import {func1, func2, func3} from 'some-module';

With automatic formatting, it turns into:

import {
    func1, func2, func3
}
from 'some-module';

Is there any way to disable this kind of formatting?

+4
source share
2 answers

Github, JsFormat js-beautify . , , . , "Pull requests welcome", , , , .

+3

http://jsbeautifier.org/ , : " / ".

enter image description here

​​ beautifier preserve-inline brace-style. ( ). (, brace-style: "collapse,preserve-inline").

+2

Source: https://habr.com/ru/post/1616271/


All Articles