Fix #923 Use package.json as a last resort for eslint --fix

This commit is contained in:
w0rp
2017-09-12 09:10:26 +01:00
parent 8a374a69a3
commit c3844db973
4 changed files with 27 additions and 3 deletions

View File

@@ -9,7 +9,6 @@ function! s:FindConfig(buffer) abort
\ '.eslintrc.yml',
\ '.eslintrc.json',
\ '.eslintrc',
\ 'package.json',
\]
let l:config = ale#path#Simplify(l:path . '/' . l:basename)
@@ -19,7 +18,7 @@ function! s:FindConfig(buffer) abort
endfor
endfor
return ''
return ale#path#FindNearestFile(a:buffer, 'package.json')
endfunction
function! ale#fixers#eslint#Fix(buffer) abort