diff options
author | w0rp <devw0rp@gmail.com> | 2017-03-29 00:21:27 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-03-29 00:21:27 +0100 |
commit | a4220b99a6f7a9184545e71f70bc280648dde586 (patch) | |
tree | eb63c7d6b677574c15a45ecaf8d7b748041f38f9 /ale_linters/javascript/eslint.vim | |
parent | 4b9b4e3338187d3bee37a11f3e7b3777533fa703 (diff) | |
download | ale-a4220b99a6f7a9184545e71f70bc280648dde586.zip |
Fix #421 Automatically detect create-react-app paths
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', |