diff options
Diffstat (limited to 'ale_linters/javascript/eslint.vim')
-rw-r--r-- | ale_linters/javascript/eslint.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ale_linters/javascript/eslint.vim b/ale_linters/javascript/eslint.vim index ac88dd00..3bf88316 100644 --- a/ale_linters/javascript/eslint.vim +++ b/ale_linters/javascript/eslint.vim @@ -15,6 +15,17 @@ function! ale_linters#javascript#eslint#GetExecutable(buffer) abort return g:ale_javascript_eslint_executable endif + " Look for the kinds of paths that create-react-app generates first. + let l:executable = ale#util#ResolveLocalPath( + \ a:buffer, + \ 'node_modules/eslint/bin/eslint.js', + \ '' + \) + + if !empty(l:executable) + return l:executable + endif + return ale#util#ResolveLocalPath( \ a:buffer, \ 'node_modules/.bin/eslint', |