esformatter plugin: automagically wraps line when they are over a configurable length
npm install esformatter-auto-wrapesformatter plugin for
automagically wrap line when they are over a configurable length.
install it:
``sh`
npm install esformatter-auto-wrap
and something like this to your esformatter config file:
`json`
{
"plugins": [
"esformatter-auto-wrap"
]
}
The following is the default configuration for the plugin, which can be reproduced
and modified in your .esformatter config:
`json
{
"autoWrap": {
"maxLineLength": 120,
"eclipseCompatible": true
}
}
`
Register the plugin and call esformatter like so:
`js``
// register plugin
esformatter.register(require('esformatter-auto-wrap'));
// pass options as second argument
var output = esformatter.format(str, options);
Released under the MIT License.