diff --git a/README.md b/README.md index 3e54310..0a1ca15 100644 --- a/README.md +++ b/README.md @@ -162,11 +162,11 @@ 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. More information about the style guide can be found here: http://standardjs.com/. -* `ESlint (support local&global)` for __Javascript__. http://eslint.org/ - It can be installed by running `npm install eslint` for local project or by running `npm install -g eslint` for global use. The linter is then installed locally at `$YOUR_PROJECT/node_modules/.bin/eslint` for local or `~/.npm-global/bin/eslint` for global. - When running formatter vim will walk up from the current file to search for such local installation and a ESLint configuration file (either .eslintrc.js or eslintrc.json). When local version is missing it will fallback to global version. When both requirements are found eslint is executed with the --fix argument. - Note that the formatter's name is still `eslint_local` for legacy reason while it has already support global `eslint`. - Currently only working on \*nix like OS (Linux, MacOS etc.) requires OS to provide sh like shell syntax +* `ESlint` for __Javascript__. http://eslint.org/ + It can be installed by running `npm install eslint` for a local project or by running `npm install -g eslint` for global use. The linter is then installed locally at `$YOUR_PROJECT/node_modules/.bin/eslint` or globally at `~/.npm-global/bin/eslint`. + When running the formatter, vim will walk up from the current file to search for such local installation and a ESLint configuration file (either `.eslintrc.js` or `eslintrc.json`). When the local version is missing it will fallback to the global version in your home directory. When both requirements are found eslint is executed with the `--fix` argument. + Note that the formatter's name is still `eslint_local` for legacy reasons even though it already supports global `eslint`. + Currently only working on \*nix like OS (Linux, MacOS etc.) as it requires the OS to provide sh like shell syntax. * `xo` for __Javascript__. It can be installed by running `npm install -g xo` (`nodejs` is required). diff --git a/plugin/defaults.vim b/plugin/defaults.vim index 4f405cd..c1abf51 100644 --- a/plugin/defaults.vim +++ b/plugin/defaults.vim @@ -218,7 +218,7 @@ if !exists('g:formatdef_eslint_local') endif if (empty(l:cfg) || empty(l:prog)) if verbose - return "(>&2 echo 'No local&global ESLint program and/or config found')" + return "(>&2 echo 'No local or global ESLint program and/or config found')" endif return endif diff --git a/plugin/utils.vim b/plugin/utils.vim index 1a22b8d..e28b7b3 100644 --- a/plugin/utils.vim +++ b/plugin/utils.vim @@ -1,6 +1,6 @@ " Simple python-based random number generator -function! g:Random() +function! g:RandomInt() if has("python3") python3 << EOF import random