Revert "#1277 Try to get eslint_d to run the right version of eslint"
This reverts commit 56c7957a75
.
This commit is contained in:
parent
f5f3424fcf
commit
60917c9005
1 changed files with 1 additions and 12 deletions
|
@ -41,19 +41,8 @@ function! ale#handlers#eslint#GetCommand(buffer) abort
|
||||||
let l:executable = ale#handlers#eslint#GetExecutable(a:buffer)
|
let l:executable = ale#handlers#eslint#GetExecutable(a:buffer)
|
||||||
|
|
||||||
let l:options = ale#Var(a:buffer, 'javascript_eslint_options')
|
let l:options = ale#Var(a:buffer, 'javascript_eslint_options')
|
||||||
let l:cd_string = ''
|
|
||||||
|
|
||||||
" Change directory to where `node_modules` is, if running eslint_d.
|
return ale#node#Executable(a:buffer, l:executable)
|
||||||
" eslint_d looks up which eslint version to use based on the CWD.
|
|
||||||
if l:executable =~# 'eslint_d'
|
|
||||||
let l:node_modules_dir = ale#path#FindNearestDirectory(a:buffer, 'node_modules')
|
|
||||||
|
|
||||||
if !empty(l:node_modules_dir)
|
|
||||||
let l:cd_string = ale#path#CdString(l:node_modules_dir)
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
return l:cd_string . ale#node#Executable(a:buffer, l:executable)
|
|
||||||
\ . (!empty(l:options) ? ' ' . l:options : '')
|
\ . (!empty(l:options) ? ' ' . l:options : '')
|
||||||
\ . ' -f unix --stdin --stdin-filename %s'
|
\ . ' -f unix --stdin --stdin-filename %s'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Reference in a new issue