esformatter-semicolon-first
esformatter plugin to add
semicolon before [
and (
if they are the first things on the line.
created mainly to be used by standard-format
Usage
Add to your esformatter config file:
Or you can manually register the plugin if not using esformatter
directly:
// register pluginesformatter;
Config
By default we add at least one line break before the semicolon and remove line
breaks afterwards, but you can use the
lineBreak.before['esformatter-semicolon-first']
and
lineBreak.after['esformatter-semicolon-first']
to configure it tho.
Examples
Given this input program:
var x = 2123 var y = 8 { }
It will output:
var x = 2;123 var y = 8; { }
For more examples see the test files inside the test/
folder.
License
Released under the MIT License.