Merge branch 'sindresorhus-xo'

This commit is contained in:
Chiel ten Brinke 2017-01-16 12:52:09 +01:00
commit a874207946
2 changed files with 14 additions and 1 deletions

View File

@ -157,6 +157,10 @@ Here is a list of formatprograms that are supported by default, and thus will be
It can be installed by running `npm install -g standard` (`nodejs` is required). No more configuration needed. It can be installed by running `npm install -g standard` (`nodejs` is required). No more configuration needed.
More information about the style guide can be found here: http://standardjs.com/. More information about the style guide can be found here: http://standardjs.com/.
* `xo` for __Javascript__.
It can be installed by running `npm install -g xo` (`nodejs` is required).
Here is the link to the repository: https://github.com/sindresorhus/xo.
* `html-beautify` for __HTML__. * `html-beautify` for __HTML__.
It is shipped with `js-beautify`, which can be installed by running `npm install -g js-beautify`. It is shipped with `js-beautify`, which can be installed by running `npm install -g js-beautify`.
Note that `nodejs` is needed for this to work. Note that `nodejs` is needed for this to work.
@ -307,6 +311,10 @@ contact me by creating an issue in this repository.
## Change log ## Change log
### January 2017
* Add `xo` formatter for JavaScript.
### March 2016 ### March 2016
* Don't use the option formatprg internally anymore, to always have the possible of using the default `gq` * Don't use the option formatprg internally anymore, to always have the possible of using the default `gq`
command. command.

View File

@ -156,12 +156,17 @@ if !exists('g:formatdef_standard_javascript')
let g:formatdef_standard_javascript = '"standard --fix --stdin"' let g:formatdef_standard_javascript = '"standard --fix --stdin"'
endif endif
if !exists('g:formatdef_xo_javascript')
let g:formatdef_xo_javascript = '"xo --fix --stdin"'
endif
if !exists('g:formatters_javascript') if !exists('g:formatters_javascript')
let g:formatters_javascript = [ let g:formatters_javascript = [
\ 'jsbeautify_javascript', \ 'jsbeautify_javascript',
\ 'pyjsbeautify_javascript', \ 'pyjsbeautify_javascript',
\ 'jscs', \ 'jscs',
\ 'standard_javascript' \ 'standard_javascript',
\ 'xo_javascript'
\ ] \ ]
endif endif